Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Plot data through Scripts / Octave Console [closed]

0 votes
64 views

Can the Octave engine implemented in PLECS perform plots (e.g., of post-processed data from scripts) with the plot command?

These simple commands locks the console and I have to halt everything with the red power button on the top right.

x = linspace(0, 1, 100);

y = cos(x);

plot(x,y)

I thought that maybe PLECS implementation of Octave could not do plots... however if in the console/script i execute

figure

I correctly get a new figure window. 

Am I doing something wrong? Is there a more proper way to plot post-processed data in PLECS?

Thanks!

closed with the note: My bad, it works, it was just really slow for some reason.
asked Jun 26 by Gabriele Lozito (19 points)
closed Jun 26 by Gabriele Lozito
Glad you were able to find a solution.  I would not expect such a simple script to be so slow / lock the simulation script window.

Is there more going on in your script?  One thought: occasionally a missing semicolon will result in large amounts of data being printed in the PLECS Console window (Window + Show Console).  Printing large amounts of data can sometimes be a bottleneck.
Yes it is strange, the script was really just that simple mock-up to figure out the capabilities of octave. I believe the problem could be in the initialization of the Octave kernel itself, since now, after the first succesful plot everything is very smooth and quick. Thank you for the insight and the response!
Great, thanks for the update Gabriele!
...