Plot data through Scripts / Octave Console

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.

[b]x = linspace(0, 1, 100);

y = cos(x);

plot(x,y)
[/b]

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

[b]figure[/b]

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!

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!