How do I pass variables from MATLAB into Maple?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How do I pass variables from MATLAB into Maple?
Here is an example of code that will not work as expected:
a = 2.323423;
b = 4.324323;
maple('c:=a'); %The variable a is matlab variable
maple('d:=b'); %The variable b is matlab variable
maple('evalb(a<b)')
Here is the output:
a-b < 0
Maple does not recognize the variables 'a' and 'b' from MATLAB's workspace.
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
The following example demonstrates how you can pass in the variables from MATLAB into the Maple function:
a = 2.323423
b = 4.324323
maple(['am:=' num2str(a)]); % The variable a is matlab variable
maple(['bm:=' num2str(b)]); % The variable b is matlab variable
maple('evalb(am<bm)')
PLEASE NOTE: The variables 'a' and 'b' are passed into MAPLE and now they are called 'am' and 'bm'. As expected the result is:
true
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!