How do I select a point in the graph generated using the scope? I want to know the magnitude of the graph.

 採用された回答

Paulo Silva
Paulo Silva 2011 年 2 月 28 日

1 投票

For what I can see you can't do it directly in the scope (matlab 2008b), some options:
#1 Export the signals to matlab and analyse them in there, you can save the scope data in a scope option or use the To Worspace block.
#2 Using the MinMax Running Resettable you can see the magnitude max and min of your signal, send the output of that block to one display block.

8 件のコメント

Kai Hao Then
Kai Hao Then 2011 年 2 月 28 日
I couldn't even save the graph as image file i.e. in jpeg format. Besides, I couldn't find the way to export the signals. Mind showing the way? I am using Matlab 2010a.
Paulo Silva
Paulo Silva 2011 年 2 月 28 日
Go to the sinks library, take the To Worspace block and connect it to the place where you need to analyse the signal, now go the block To Workspace parameters (right click on it, it's one of the options), select the output format Structure with time.
Run the simulation, and plot the data like this:
plot(simout.time,simout.signals.values)
Paulo Silva
Paulo Silva 2011 年 2 月 28 日
After plotting go to the figure toolbar and click on the Data Cursor, this will enable you to see info about the point on the line where the cursor is, click on the plot line.
Kai Hao Then
Kai Hao Then 2011 年 2 月 28 日
Thanks Paulo!
Kai Hao Then
Kai Hao Then 2011 年 2 月 28 日
I labelled the X axis and Y axis but how come when I used the data cursor to find the points, it still showed X and Y?
Paulo Silva
Paulo Silva 2011 年 2 月 28 日
The datacursor does that by default
Paulo Silva
Paulo Silva 2011 年 2 月 28 日
Here's another of Doug's excellent video tutorials, he must have special powers to know what tutorials do we need http://blogs.mathworks.com/videos/2011/02/25/creating-a-custom-data-cursor/
Kai Hao Then
Kai Hao Then 2011 年 3 月 1 日
Thanks!

サインインしてコメントする。

その他の回答 (3 件)

Paulo Silva
Paulo Silva 2011 年 3 月 1 日

1 投票

Here's one way I just learned using the simplot function, example
vdp
set_param(gcs, 'SaveOutput', 'on')
set_param(gcs, 'SaveFormat', 'StructureWithTime')
sim(gcs)
simplot(yout)
I'm sorry for discovering this only now but it works great :)

1 件のコメント

Kai Hao Then
Kai Hao Then 2011 年 3 月 1 日
Hey no problem. Everyone learns. =)

サインインしてコメントする。

Kai Hao Then
Kai Hao Then 2011 年 3 月 1 日

0 投票

I have tried this command:
plot(simout.time,simout.signals.values)
It works great.
Now let's say I have 3 simout(s) i.e.
(a) simout
(b) simout1
(c) simout2
How do I type the command to show these 3 graphs?

2 件のコメント

Paulo Silva
Paulo Silva 2011 年 3 月 1 日
%in diferent axes
subplot(311)
plot(simout.time,simout.signals.values)
subplot(312)
plot(simout1.time,simout1.signals.values)
subplot(313)
plot(simout2.time,simout2.signals.values)
%in the same axes
hold on
plot(simout.time,simout.signals.values)
plot(simout1.time,simout1.signals.values)
plot(simout2.time,simout2.signals.values)
legend('simout','simout1','simout2')
Kai Hao Then
Kai Hao Then 2011 年 3 月 2 日
Thanks!

サインインしてコメントする。

Angelina
Angelina 2024 年 8 月 28 日

0 投票

bagaimana cara mengembalikan workspace pada matlab

カテゴリ

ヘルプ センター および File ExchangeGraphics Object Properties についてさらに検索

タグ

質問済み:

2011 年 2 月 28 日

回答済み:

2024 年 8 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by