tomleslie

13876 Reputation

20 Badges

15 years, 168 days

MaplePrimes Activity


These are replies submitted by tomleslie

Preferably in mw(s) format using the big green up-arrow in the MaplePrimes editor

@jan123 

Produce a Maple worksheet showing how what you have so far and upload it using the big green up-arrow in the MaplePrimes window.

BTW A cursory reading of online references to the Cournot competition appears to suggest it is an algebraic problem (ie does not involve differential equations). Are you sure that your interpretation of symbols/quantities is correct?

@dorna01 

To get anywheree with this we need to know the values of all the constants, please upload them

 

@dorna01 

You now have one (very long) equation in eleven unknowns: situation still hopeless

If you plot your function from x=-100..100 using

plot( (2*cos(0.5*x)*sin(0.5*x)*cos(3.775*x)+2.2075*((cos(0.5*x))^2)*sin(3.775*x)-0.453*((sin(0.5*x))^2)*sin(3.775*x)),
       x=-100..100);

then you will see that this function has many, many "roots, even in this range. So if I use solve() with no restriction on the range of roots, I would not be surprised if there were an infinite number of "roots".

How do you sensibly expect Maple to supply you with an infinite number of roots???

Maybe you should restrict the range over which you require solutions?

@michjoh 

restart;
M:=50: N:=1500: R3:=rand(1..3):
P:=Matrix(N+1, M, fill=[0,0]):
P[2,1..M]:=[1,0]:
gostraight:= (p,q)-> `if`( p[1]=q[1], p+~[ 0,p[2]-q[2]], p+~[p[1]-q[1], 0]):
turnLeft:=   (p,q)-> `if`( p[1]=q[1], p+~[ q[2]-p[2], 0], p+~[0, p[1]-q[1]]):
turnRight:=  (p,q)-> `if`( p[1]=q[1], p+~[ p[2]-q[2], 0], p+~[0, q[1]-p[1]]):
dirs:=[`gostraight`, `turnLeft`, `turnRight`]:
for i from 3 by 1 to N+1 do
    for j from 1 by 1 to M do
        P[i,j]:=dirs[R3()]( P[i-1,j], P[i-2,j]);
    end do:
end do;
plot([seq( convert(P[1..N,j], list), j=1..50)] );

  1. I1(t) is real-valued from 0-100, and complex between 100(ish)-200
  2. I2(t) is real valued from 100-200, and complex between 0-100(ish)
  3. So you can only plot when they are real; also sounds like you want to "combine" them, so the following works

c:=t-> piecewise( t>0 and t<100, I1(t), I2(t));
plot( c, 0..200);

The procedure S is missing an 'end do' statement.

However your original code for S contains the statement

S(i)=L(i)^(2)-5*F(i)^(2)

whihc is going to recusively call itself - indefinitely - just look at the left hand side. S(i) will call the procedure S with the argument i, whihc will hit the above statement again and so will call S again - indefinitely. It isn't obvious what you are trying to with this procedure, so I took a wild guess on what you might mean and came up with

S:= proc(n::nonnegint)
              local i, ans;
              for i from 1 by 1 to n do
                   ans[i]:=L(i)^(2)-5*F(i)^(2);
                   printf("%a\n",ans[i]);
             end do:
             return ans;
        end proc:

(but I'm probably wrong - because I'm bad at guessing!)

If I have a text file, containing

+2.000000E-10 +1.636232E-05
+3.017707E-05 +4.531920E-05
+6.065973E-05 +7.586885E-05
+9.096636E-05 +1.059570E-04
+1.208671E-04 +1.357189E-04

and I park this text file in J:/Users/TomLeslie/myMaple/testMat.txt (obviously specific to my machine - choose your own). Note also,

  1. there are no blank lines between entries: blank lines just confuse the "read" process, o I'd recommend tha  you use your editor to remove blank lines ( or modify the program producing the data so that blank lines are not produced
  2. within a line the only delimiter is a space - so use delimiter=" "

Then within Maple I use the command

M:= ImportMatrix( "J:/Users/TomLeslie/myMaple/testMat.txt",
                             source=delimited,
                             delimiter=" "
                          );

The data  is imported correctly and assigned to the matrix M;

@AmirHosein Sadeghimanesh 

As in

plot( x^2,
        x=-5..5,
        labels = ["Total Ligand Concentration(L[T])arbitrary units",
                      "Steady-state units (arbitrary concentration)"],
        labeldirections=[horizontal, vertical],
        labelfont=[times, bold, 12]
     );

(NB with labels this long you might have to drop the font size to avoid the text from "wrapping"!)

Do you want someone to rewrite the contourplot help page?

What aspect of of your requirement is not covered by this help page?

An example would be useful

In teh MaplePrimes editor, use the big green uparrow to load the code you are trying to debug.

Loading "pictures" of code which cannot be read/executed/debugged is a waste of everyone's time

So far as I can tell this cannot be achieved through the interactive controls for a pre-existing plot. However this can be achieved in the basic plot command using the labeldirections option. See the toy example below

plot( x^2,
        x=-5..5,
        labels=[xvalues, yvalues],
        labeldirections=[horizontal, vertical],
        labelfont=[times, bold, 18]
      );

If I check the maximum value of Digits in Maple2015.1 running on Win7/64-bit, using

kernelopts(maxdigits);

then it returns 38654705646.

Only conclusion I can come up with is that OP must be using 'Digits' as a name for a variable somewhere in his/her worksheet!

@Christopher2222

(Not) Spreadsheets
I was incorrect in my comments about resizing spreadsheets - what I was actually referring to was the inability to resize the thingy which is used to display matrices larger than whatever one has set up for the default maximum for "in-line" display. I find Maple's value of 10x10 about right as the "in-line" display default. However I do occasionally find it annoying that if I want to look at  a 20x20 matrix, it appears in fixed-size window which will only display 13x7 entries and one has to use scrollbars to move around. Why can't I resize this display window????

Code-Edit region

I know that I can zoom (in various ways) the whole worksheet as a means of resizing the text in a code-edit region, but this is a kludge. How hard can it be to enable font-size control in a code-edit region. Like I said, my workaround is simply to stick with the method I used before code-edit regions were "invented". This usage model can be defined as

  1. develop/debug procedure/module interactively in a Maple worksheet
  2. keep worksheet "tidy" by copying out such procedures to external .mpl, files which if subsequent corrections/additions are needed I perform using an external editor.
  3. probably do a little reformatting in the external editor, because copying 1-D Maple input, never seems to format quite right in the external editor
  4. add appropriate read() statements to the main Maple worksheet

All of this house-keeping type stuff I could avoid, if only I could use code-edit regions for more than an hour or so without getting a headache! I'm pretty sure I only need about a 2pt increase in font size. (BTW Something would also have to be done about the size of the descriptive text appearing to the right of the code-edit thumbnail, when the region is collapsed, cos that is *really* small)

Debugger

This annoys me even more than either of the other two, simply because the font size in the debugger window is too small (even smaller than the  code-edit region!), and there is no acceptable workaround. I guess like most non-pro users, my natural tendency is to avoid debuggers and just insert print() statements where I think the problem is.

However sometimes one really needs a debugger :-(

Having one whose I/O windows are close to illegible is a serious pain. I only have two options for this

  1. Stick with the defaults and get very close to the screen - about 15minutes before my eyes start to hurt
  2. Drop the monitor resolution, which makes the text appear bigger. However this also makes the text a bit blurry, so it takes about an hour before my eyes start to hurt.
First 172 173 174 175 176 177 178 Last Page 174 of 207