A function that outputs multiple plots?

2 Ansichten (letzte 30 Tage)
alpedhuez
alpedhuez am 13 Aug. 2020
Kommentiert: alpedhuez am 13 Aug. 2020
  4 Kommentare
hosein Javan
hosein Javan am 13 Aug. 2020
alpedhuez for example the function "step" plots step response of a system. or the function "spectrogram" plots the fourier transform spectrum.
alpedhuez
alpedhuez am 13 Aug. 2020
Let me work on it.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

hosein Javan
hosein Javan am 13 Aug. 2020
function plotoutput()
x = 1:10;
y = x.*x;
plot(x,y)
when you call the function, it shows a figure.
  3 Kommentare
hosein Javan
hosein Javan am 13 Aug. 2020
Bearbeitet: hosein Javan am 13 Aug. 2020
function plotoutput()
x = 1:10;
y1 = x.*x;
y2 = x + 1;
figure(1);plot(x,y1)
figure(2);plot(x,y2)
alpedhuez
alpedhuez am 13 Aug. 2020
Let me work on it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by