acer

32747 Reputation

29 Badges

20 years, 110 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Adam Ledger If you want to get a string then you could use a TextArea Component.

MAPLE_PLEASE_HELP_1.mw

@das1404 please keep followup questions that are so closely related as this to the same thread. 

@Jameel123 
 

NULL

restart

u := proc (x, t) options operator, arrow; 1/2+I*sqrt(2)/(exp(-t+x)+2*exp(t-x))+(1/2)*(exp(-t+x)-2*exp(t-x))/(exp(-t+x)+2*exp(t-x)) end proc

proc (x, t) options operator, arrow; 1/2+I*sqrt(2)/(exp(-t+x)+2*exp(t-x))+(1/2)*(exp(-t+x)-2*exp(t-x))/(exp(-t+x)+2*exp(t-x)) end proc

plots:-complexplot3d([Re(u(x, t)), Im(u(x, t))], x = -3 .. 3, t = -3 .. 3)

Download plot33_b.mw

Could you upload an actual worksheet using the green up-arrow in the Mapleprimes editor, rather than just showing us inlined images?

@vv I agree. I was thinking about the given example, rather than in general.

Perhaps better would have been to take the result from `solve` without fancy options, apply `simplify`, and then put that into a piecewise manually constructed to return NULL except for x in the stated domain.

The `real` option is related to the `parametric` option of `solve`. See ?solve,parametric for a help page. It's weird that sometimes it has an effect for input other than polynomial systems, and that no error message is emitted in cases where it will have no effect. (bugs that I've reported previously...)

Having said all that, the following is produced (in Maple 14, since the Question is marked for that) even without the `real` option.

restart;

kernelopts(version);

`Maple 14.01, X86 64 LINUX, Oct 15 2010, Build ID 535952`

simplify(solve({y>1,y<2,3^665/2^x=y}, {x}));

piecewise(y <= 1, [], y < 2, [{x = (665*ln(3)-ln(y))/ln(2)}], 2 <= y, [])

 

Download solve_res.mw

@ganelon Use the command evalf to approximate to floating-point.

@Jameel123 Yes, there are lots of ways.

Please tell us what you want.

Do you want a 2D or a 3D plot? Do you want a single shape which changes color? Or which changes with time as an animation?

Do you want a density plot whose color or hue or intensity vary with complex argument or magnitude?

Or a single surface where the height represents the real component and the shading represents imaginary component?

Or a 2D curve with horizontal and vertical values taking the real and imaginary values parameterized by the "x" in u(x,t), and the whole thing animated by the "t".

Or something else?

@tomleslie Is the link now fixed? [I corrected it.]

@Muhammad Usman It works for me using Maple 2015.2 on either 64bit Linux or 64bit Windows 7 Pro.

On Windows 7 I saved the file to my Desktop, so that the call to ExcelTools:-Import would look the same (except for our user names).

You might want to re-check the filename extension, so ensure that it is really "Employees.xlsx". The following ought to return true, if it's really there and named as you say.

FileTools:-Exists("C:/Users/Usman/Desktop/Employees.xlsx");

Perhaps someone else could try it.

Perhaps you could consider the point-release upgrade from Maple 2015.0 to Maple 2015.2.

What happens if you instead reference the file by its location explicitly when calling Import? Or if you change currentdir() to that file's location before calling Import?

I mean, where is it? Is it something like, umm, "C:/Users/Usman/Desktop/Employees.xlsx" or similar?

@Kitonum I wrote a procedure which searches for more compact representations and optionally informs me of the command which obtained the smallest result, under a supplied time limit. Trying various combinations of collect (with various simplifications on the coefficients) is one part of it.

It can be told to try other things too, such combination of actions like simplify, rationalize, radnormal, expand, etc., as well as combine restricted to various subsets of the trig terms and to a limited depth, and even applying a proc generated by codegen[optimize](...,tryhard) following unapply. It can use several metrics, such as length and `simplify/size/size` and LeafCount

I am hoping to find time to clean it up and add it to a modest package of utilities in the maplecloud.

@abdulganiy The purpose of the call to the command kernelopts(version) is to let you know what version of Maple I was using. I just wanted to show that I has used Maple 2016, since you did.

The names alpha[1],..,beta[2],...gamma[2] were assigned the original coefficients, just for some ease of manipulating the expressions. You can unassign them as follows:

map(unassign,['alpha[1]','beta[0]','beta[1]','beta[2]','gamma0','gamma1','gamma2']):

You could then print your original equations on separate lines, using the results in all2, as follows:

map(print,Equate([alpha[1],beta[0],beta[1],beta[2],gamma0,gamma1,gamma2],all2)):

But you don't really need to assign those names, in order to get your task done. Here is an attachment that is more like your original.

simp_ex2.mw

 

Why have you asked about this in 3 separate postings??

@Ronan If your procedure creates a Matrix (or Array) and associates it with a DataTable then your procedure should return that very same Matrix (or something that points to the same data in memory) and not a copy of it.

Calling convert(mat,Array) or copy(mat) are just two kinds of copying. Both break the association link with the DataTable. and both prevent subsequent updates to either DataTable or Matrix to be mirrored by changes in the other.

If you really need to construct the DataTable while using a Matrix for the variable=mat option (for performance reasons, apparently) then I suggest that you either return that same Matrix or try to use ArrayTools:-Alias to construct an Array.

The command ArrayTools:-Alias allows you to construct a new rtable (shell) that points to the very same data position in memory as another rtable. In contrast, the Reshape command makes a wholly new rtable (only copying the data over, which you don't want).

So you can construct an Array that points at the same data in memory as does some Matrix. So you could have an Array with indexing from zero, while still having your DataTable be associated with a Matrix, and updates to all three would be mirrored. That's what I understand to be your goal: data entry via DataTable, and, subsequently, zero-based programmatic access of the data.

I'm away from a computer right now, but I'll try and confirm later.

I changed all the references in your Question from "Maple 16" to "Maple 2016", since that is the version in which your attachment was last saved and is likely what you meant.

Maple 2016 was released in the year 2016, whereas Maple 16 was four major releases earlier and released in the year 2012.

I am looking forward to the year 2019.

First 265 266 267 268 269 270 271 Last Page 267 of 600