필터 지우기
필터 지우기

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

조회 수: 47 (최근 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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by