C_R

1960 Reputation

19 Badges

6 years, 50 days

MaplePrimes Activity


These are replies submitted by C_R

@specter123 

evalc is missing for the big expression

@Aung 

You are right. It does not change. I have no explanation for that. You can change ticks if you additionaly toggle 

 

and press apply.

You can also achieve something by

plot(strain1, stress1, tickmarks = [6, 12])

but it seems that 5 ticks in x and y direction is also not possible. Maybe because subdividing a range of 3 with 5 ticks does not make allot of sense.

(The origin does not seem to count as a tick.)

@nm @Thomas Richard 

Update: Below is the protocol of one session

In another attempt, a session was started without errors, but then errors occurred after reexecution (with !!!) .

All with Maple 2023.

@nm 

Keep us posted. A comparison will be of interest in any case. Memory management is not identical between operating systems and could pose limits on an application

@Carl Love 

The suggestion from the third paragraph only works if one is in the possion of a former version with a different purchase code. I use a commerical version where this is the case. I do not know if other licenses come with the same purchase code for different version.

Using a former version comes with the drawback that an error with the lastest version might not manifest. 

@mmcdara 

I found a solution that works with your proc as is

subsindets(expression_with_many_unit_commands, specfunc(anything, Units:-Unit), UnitFactors_1)

I also submitted a software change request concerning the gramms.

Thanks again & Merry Xmas

@TKChang99 

I don't mind at all. Note, I have only focussed on getting most out of the help system (a bit like a modern Robin Curso on an island with a laptop and a solar pannel). I haven't recommended any books or study guides for the simple reason that I've never read one (probably a missed opportunity).

I forgot one important fact to mention: Maple calculates complex. Results are vaild in the complex domain without restrictions. If there is no result returned, assumptions on variables can make a difference. Complex calculaus is beyond normal programming languages and not only in this sense Maple provides more. Maple is more of a mathematical environment that can be used in a variety of ways, as acer has explained.

@mmcdara 

Starting a blank session:

I would say that this is incorrect since ?Units,SI defines mass as kg.

@mmcdara 

Mass is the only base unit with a prefix. Is is probably not taken into account.

However, simplify simplifies to kg

simplify(Unit(N/m))

This is what I would expect but does not fit to the definition you found. Strange indeed.

@mmcdara 

Actually I was hoping for a way without dedicated procedures. Something using subsindets and a type identifier (maybe HasUnit?) in combination with a transformer (performing the core functionality you demonstrated here) using library commands. However, your answer is valuable as always:

Your first attachment provides the core functionality to expand a Unit expression with compound units

Unit('kg'*'m'/'s'^2);
lprint(%);
UnitFactors_1(%);
lprint(%)

but does not work on subexpressions that are products like:

123.456*Unit('kg'*'m'/'s'^2);
lprint(%);
UnitFactors_1(%);
lprint(%)

If it would, it could be mapped over larger expressions. I have added to my original post an example of a larger expression with units that cannot be simplified without beeing able to expand Unit expressions with compound units.

Your second attachment is valuable to determine unit conversion factors (which I called scaling factors in my attachment) in cases where an a priory knowledge is required. Knowing, for the example, that the input to the transfer function is in Volts one gets

This is similar to what I added in my attachment by hand to get a dimensionless expression that can be plotted. Such a decomposition to base units would be a handy addition to the unit packages to help the user to convert Maple output with units into something that can be more easily interpreted. Maples simplify command must use a decomposition like that internally to simplify units.

Thank you for the answer 👍

Why it did not work:

The left hand side in

(seq('L'[q,  q+1] , q=1..2)) := (0 $ 2);

is resolved to a name but not evaluated to a sequence of Matrix elements.

 

@acer 
Thank you for the detailed reply. I tried to print the operators to see if there is any explict declaration of local variables but instead found interesting differences in attachment 2 and 3 of the first answer from you

 

I don't know if this gives a hint why the above call to fsolve did not work as the call to Maximize did.

@acer 

Among all the things I tried I did not put evalf inside the operator definition. Makes sense now.

What I do not understand is the change of variable names y=Y. Why is

F := y->evalf(Int(unapply(op(1,ig),x),rhs(op(2,ig))));

not working (I tried this as well).

I tried also nested operators which I see at last work.

As always, thank you

Update: In older versions of Maple for the search term `if`a help page is returned that explains `if`. 

https://www.mapleprimes.com/questions/237503-Sum-Of-Proper-Divisors-Procedure#comment298929

@acer 

This one is better but requires special definitions which I try to avoid AMAP. It also requires knowledge of Maple language I do not have.

Am I right that "op" in combination with the statement operator ":" is not documented (in newer versions of Maple)?

In Maple parlance, what kind of operator do you define? I can't find anything on inert operators. Is it unary and/or neutral? According to whatype, N is a procedure (without the use of a proc statement for the definition of N).

What makes it hard to understand is the use of the dito operator %, which can be used followed by exactly one of these characters: + - * . / ^ according to ?neutral.

4 5 6 7 8 9 10 Last Page 6 of 36