Scott03

784 Reputation

10 Badges

19 years, 234 days

MaplePrimes Activity


These are answers submitted by Scott03

If you had a long expression that you wanted to use as a signal source, I would suggest using the custom component template with the tip found in the other post.

Scott

One way of creating a PWM component can be found here on the Maplesoft Application center.

Scott

On procedure that you may want to try is ArrayTools[Concatenate] (see the online help here).  This assums that the a, b, c,d, and e are all Arrays, Matrices, or Vectors.

Scott

Could you provide an example of what you are trying to do so that if there is a problem we can point out the source?  Also, what version of MapleSim are you using?

Scott

As the RungeKutta (?Student[NumericalAnalysis][RungeKutta]), the ODE needs to be first order ordinary differential equation of the form .  For this, you may want to try the dsolve command.  For example you can try the following:

dsolve([accx, accy, IC], numeric, method = rkf45);

 

Scott

Yes you can define functions in Maple.

As for the difference, see the following point from the type/function help page:

  • Note the distinction between an expression of type procedure and one of type function, which might be better called a "function call". In Maple it is the "procedure" type, rather than "function" that corresponds to what you think of as a "mathematical function".

Another point from the function help page says:

  • In an expression f(a,b,c...) of type function, the applied expression f is often a Maple procedure, or a name that evaluates to a procedure.

Scott

The following should do what you are looking for

L:=[1,3,6,7];

L:=[op(L),5];

Or you can change the last line to the following

L:=[L[],5];

 

Scott

You should be able to use one of the worksheet components to do this.  For example you can use the text box component and write messages to it.  Each time your code writes to this box it can overwrite the previous statement so you will have just the most up-to-date information in it.

Scott

Can the equation in the proc be described as one continuous function?  If so, you should be able to use the equation in the custom component template to create your block.

-Scott

It appears that the values of text fields A and B are not being used in your evaluation, so the false you are getting is as a result of evaluating if the letter A is the same as the letter B.  The following maplet code works:

>with(Maplets[Elements]):
>myLogicProc:=proc()
evalb(Maplets[Tools][Get]('A')=Maplets[Tools][Get]('B'));
end proc:
myMaplet := Maplet(Window(title="Logic Test",
[
["A : ", TextField['A'](5),
 "B : ", TextField['B'](5)],
["A = B?", TextField['TF'](10)],
[Button['EX']("Do", onclick=ACT),
 Button['QT']("Quit", enabled=true, Shutdown())]
 ]),
Action[ACT](Evaluate('TF'=myLogicProc))
):
>Maplets[Display](myMaplet);
 

Scott

s:=parse("[[1,2,3],[4,5,6]]");

 

-Scott

If you have purchased and installed the Maple toolbox for Matlab you will should be able to do this.  Once this done, you can open your Matlab and execute "maple()" to launch the Maple connection (and this will open a Maple interface where you can open and execute your worksheet with the equations).  Once this is done you can then go into matlab and call sym and then the equation name then you can use the name of the equation to reference it in Matlab.

There is a recorded webinar found on the Maplesoft website here (http://www.maplesoft.com/demo/streaming/symboliccomputingusingmtm.aspx).

Scott

I would check out the Clickable Calculus application here (http://www.maplesoft.com/applications/view.aspx?SID=5170).  They aren't using the exact functions you are, but this should give you a starting point.  If you have any problems, please come back with what you have up to that point and we should be able to point you in the correct direction.

Scott

One way to print the values of the matrix is to set the interface(rtablesize) to a number equal or greater than the largest dimension of the Matrix.  For example in your case, if at the beginning of the worksheet you execute
 

> interface(rtablesize=20);

then you will be able to see all the values of the matrix.  By default this number is set to 10.  Alternatively you can also run something like

>printf("%d", M);

This will work if you have a Matrix (not a matrix, notice this has a capital M and is the structure that is used by the LinearAlgebra package).

-Scott

You should try the _passed parameter.  For example the following works in Maple 13:

 

MyProc := proc ()
print(args);
end proc;

 

See the ?using_parameters help page to discuss some of the options you can use.

 

-Scott

First 7 8 9 10 11 12 13 Last Page 9 of 30