Scott03

774 Reputation

10 Badges

19 years, 327 days

MaplePrimes Activity


These are answers submitted by Scott03

First, pi is not ever going to give a positive value since pi is just the symbol and has no numeric number associated with it.  I believe what you want it Pi.  If you try checking the type by executing

type(Pi,positive)

you will get false while

type(evalf(Pi),positive)

returns true.

 

I believe this comes down to the following point from the help pages:

  • from the type,positive help page

The functions type(x, positive), type(x, negative), type(x, nonnegative), and type(x, nonpositive) return true if x is a positive, negative, non-negative, or non-positive extended_numeric number, respectively.

  • from the type,extended numeric help page

"The type(x, extended_numeric) function returns true if x is a numeric, infinity, -infinity, or undefined"

 

Scott

What version of MapleTA do you have?  Also, have you reported this to Maplesoft Technical Support yet?

 

Scott

Sadly I don't have a Maple 8 on my computer but from Maple 9.5 up to Maple 11 there are options for avoid (so that you could avoid a solution that you already know) or specifying the interval to solve over.  For Maple 9.5 these options are described on the fsolve help page while on Maple 10 and 11 these are described on the fsolve,details page.

 

Scott

Below is a worksheet that should give the numerical results you were looking to find.  I have replaced the references to y_c to sol2 and replaced the references to L from Delta_s with sol1.

View 185_Chan McMinn B-sb.mw on MapleNet or Download 185_Chan McMinn B-sb.mw
View file details

Scott

Looking at the code that you wrote, fsolve is not the problem and it actually does evaluate to a number.  The problem is that in your code you substitue in the value of L in your solution then throw it out by assigning sol2 to the equation without L being substituted.  Change the assignment for sol2 to this

sol2 := subs(L = sol1, y_c);

 

Edit: You may also want to look at some of the rest of the code that refers to y_c instead of your solution sol2.  One other example is the assignment of delta and Delta_s that uses y_c which will have L not being substituted for.

Scott

I believe the function that you are looking for is called textplot and is part of the plots package.  This allows you to specify a location for the text to start.  So by combining the textplot with the plot generated by pointplot you should get the results you are looking for.

 

As a quick example try the following:

 

> with(plots):
> pts := [[1, 1], [2, 5]]:
> p1 := pointplot(pts):
> p2 := textplot(zip((i, j) -> [op(i), j], pts, ["A", "B"]), align = above):
> display(p1, p2);
 

 

Scott

In your procedure you are calling SetCellFormula and CreateSpreadsheet which require you to load the package before calling it.  You could start off the whole worksheet with a

with(Spread):

but I belive the better way is to use the 'use Spread' at the beginning of the procedure so that the procedure will not need the with statement (if you want to copy this procedure, to another worksheet, you won't need to worry about the with(Spread) being executed first).

Also, at the end of the worksheet, when testing the procedure you are calling SetSelection() and GetValuesMatrix() which also need the same package to be loaded.

 

Scott

Maple is built on Java and on other operating systems, Maple installs its own Java. On a Mac, it is forced to use the system Java and that is why it is one of the System requirements on a Mac. To find the version of Java you are using, just open a terminal window and run java - version If you are on Leopard and you don't know of this, I bet you have a version of Java 1.5 but you may not have 1.4 on your computer. You can also find the versions of Java on your machine by going to the /Applications/Utilities/Java/ folder and you can see the versions that are on your machine. To switch back to Java 1.4, you can use the preferences window found in /Applications/Utilities/Java/J2SE 5.0/Java Preferences. You will have to go to Apple's website to get the version of Java 1.4. I hope this helps, Scott
There is a known issue with Mac OSX Leopard with printing (either printing to a printer or to the pdf). It appears to be either a something up with the Java that Leopard is using or the operating system change. I understand that by telling the system to use Java 1.4 instead of 1.5 fixes the problem. If this doesn't work, I would suggest contacting Maplesoft Technical Support and they would be able to walk you through possible fixes. Scott
Could you let us know what OS you are using? Are you using a MacOS, Windows, or one of Linuxs? If you are running a Mac OS, what version of Java do you have on that machine? Scott
Could you explain what you wish to do? Are you wanting to create the matrix and move it into Maple? Or are you trying to re-create the Matrix in Maple? If you would like to re-create the Matrix in Maple, then you will likely need to let us know how you are creating the Matrix in Matlab or show us the code. If you just want to just open the Matrix that you already created you could save the Matrix from Matlab (for example using dlmwrite) and use the ImportData Assistant from the Tools> Assistants menu or the ImportMatrix command in Maple (see the ImportMatrix help page). If you have Maple's Maple Toolbox for Matlab, then you could use the setmaple command from that toolbox to make the matrix available in the Maple session. Scott
I believe the function that you are trying to use is called arctan So you can enter simplify(arctan(tan(x)),symbolic) and you will get the value of x. Scott
For the plot you will need some initial conditions. So if y(0)=2 you could do something like the following: with(DEtools): eq := y'(t) = 1-y(t): ivs := [y(0) = 2]: DEplot(eq, y(t), t = 0 .. 20, ivs); the solution can then be found by executing dsolve({eq, op(ivs)}); which gives y(t) = 1+exp(-t) I hope this helps getting you started. Scott
Try setting the environment variable _EnvAllSolutions to true before the loop. According to the solve,details help page, this warning comes up when "the solve command cannot confirm that the solution set returned is complete, it sets the global variable _SolutionsMayBeLost to true and issues a warning." Since this warning is coming out of a loop where the solve routine is executed 11 time, this could be as a result of any or many of the solve calls. Have you checked only the j=2 case outside of the loop? Scott
Where do you find this procedure call call_external? Is this just the return of when you call define_external? If that is the case, please see the help page for 'external_calling'. On the last point in the Description section it states: 'The procedure returned by define_external contains a call to the built-in call_external command. The arguments to call_external are internally generated and may contain address pointers, so the procedure is saved in a special way.' Scott
First 13 14 15 16 17 18 19 Last Page 15 of 30