How can I plot more than 1 signal in the same axes within the GUI figure?

35 ビュー (過去 30 日間)
Eva
Eva 2017 年 5 月 25 日
編集済み: Eva 2017 年 5 月 26 日
I have created a GUI which includes options to select the signals to be represented and a single axes window. I would like to represent all the selected signals in the axes at the same time. How can I do that? Any advice would be helpful. Thank you!

採用された回答

MathReallyWorks
MathReallyWorks 2017 年 5 月 25 日
Hello Eva,
Use "hold on" in your code to plot multiple signals on same axis.
For example, see this:
clear;
clc;
t = -pi : 0.1 : pi;
x = sin(t);
y = cos(t);
plot(t,x,'color','r');
hold on;
plot(t,y,'color','b');
  6 件のコメント
Eva
Eva 2017 年 5 月 25 日
編集済み: Eva 2017 年 5 月 26 日
It was what I thought, but it didn't work until I called axes().
MathReallyWorks
MathReallyWorks 2017 年 5 月 26 日
Hahaha Stephen, that was rude buddy. Anyways you said the truth.
Hello Eva, don't feel sorry if you are a newbie. We are here to correct you and support you.
Keep exploring!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by