Hi all.. I have a multiple input scope data containing voltages, currents and powers saved in the workspace.
When I try to plot or save it ((Error using plot Not enough input arguments.)) and
((Error using save Must be a string scalar or character vector.)) warnings are shown.
How can I save the data and plot in as a figure ? Thanks..

4 Kommentare

M
M am 3 Mär. 2020
Can you please post your code and the exact error message you obtain ?
FG
FG am 3 Mär. 2020
Hi M ! I don't have any code.. The exact message is ''Error using plot Not enough input arguments'' and ''Error using save Must be a string scalar or character vector''
M
M am 3 Mär. 2020
I don't have any code..
What causes these error messages ?
How do you try to plot and save your data ?
FG
FG am 3 Mär. 2020
Dear M.. In simulink I have scope screens of voltages and currents. I want to save the scope view as an M file but I can't..

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Jesus Sanchez
Jesus Sanchez am 3 Mär. 2020

0 Stimmen

Without the code, we cannot do much. However, for the save I think that you are not wrting the variable name as a string. See Save, load and delete variables from workspace. As an example, if I want to save the variable result in a workspace named storedResult, the following code gives an error:
result = 1;
save('storedResult.mat',result); % ERROR!
The correct form is to write result in save as a string variable:
result = 1;
save('storedResult.mat','result'); % This works
Regarding your plot problem, I would check how to plot variables in matlab plot, or include a piece of your code so we can see what is failing

4 Kommentare

FG
FG am 3 Mär. 2020
All_Together in workspace is the file I want to plot and save..
Jesus Sanchez
Jesus Sanchez am 3 Mär. 2020
I apologize if I sound rude but have you ever worked with MATLAB? To save Al_together you just need to write it in the example that I gave you:
ave('storedResult.mat','Al_Together'); % This works
With plot, you need to access the propierties of Al-Together using dots. For example:
figure
hold on
plot(Al_together.x,Al_together.y1);
plot(Al_together.x,Al_together.y2);
plot(Al_together.x,Al_together.y3);
hold off
and so on
FG
FG am 3 Mär. 2020
No, you are not rude.. I've never studied MATLAB before. Just trying to simulate with simscape and learn things about MATLAB on the way. By the way plot did'nt work but saving is OK.
FG
FG am 3 Mär. 2020
I thank you for your effort..

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Gefragt:

FG
am 3 Mär. 2020

Kommentiert:

FG
am 3 Mär. 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by