I have continual problems using mupad code in live scripts. for example, when I make a live script using: l := plot::Lsys(PI/3, "R", "L" = "R+L+R", "R" = "L-R-L", "L" = Line, "R" = Line, Generations = 7): plot I get unexpected Matlab operator
Show older comments
I cannot get any mupad code to work in live scripts. For example, when I make a live script using:
l := plot::Lsys(PI/3, "R", "L" = "R+L+R", "R" = "L-R-L", "L" = Line, "R" = Line, Generations = 7): plot
I get "unexpected Matlab operator". I have never been able to run any code from a mupad notebook, either. I have tried the code that translates mupad notebooks to live scripts and none will evaluate. I can't continue to use mupad notebooks since they are not now supported in 2017b and in my own version at home R2015b the mupad notebooks take up to 7 or 8 minutes at least to evaluate for the first time. I like using the mupad animations especially and am very frustrated now when I try to use them. Please tell me what I can do. Thanks. Neal
Answers (1)
Walter Roberson
on 14 Nov 2017
You need to write that MuPAD code to a file, and then use
evalin(symengine, 'fread', sprintf('"%s"', NameOfMuPadFile))
That will cause the MuPAD code to execute inside of MuPAD. The results you get back will probably not be displayable. I suspect plots will fail; certainly they will not look like they did in MuPAD.
You cannot execute MuPAD code directly in a Live Script.
"I can't continue to use mupad notebooks since they are not now supported in 2017b"
mupad notebooks are still there in R2017b, and I would expect them to continue to exist for several releases further. You might not be able to get technical support for notebook-specific problems, perhaps, but with student licenses you cannot get that kind of technical support anyhow...
Categories
Find more on Get Started with MuPAD in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!