A function that outputs multiple plots?

4 commentaires

David Hill
David Hill le 13 Août 2020
There are already many Matlab functions that output plots.
alpedhuez
alpedhuez le 13 Août 2020
For example?
hosein Javan
hosein Javan le 13 Août 2020
alpedhuez for example the function "step" plots step response of a system. or the function "spectrogram" plots the fourier transform spectrum.
alpedhuez
alpedhuez le 13 Août 2020
Let me work on it.

Connectez-vous pour commenter.

 Réponse acceptée

hosein Javan
hosein Javan le 13 Août 2020
function plotoutput()
x = 1:10;
y = x.*x;
plot(x,y)
when you call the function, it shows a figure.

3 commentaires

alpedhuez
alpedhuez le 13 Août 2020
Multiple plots, not just one!
hosein Javan
hosein Javan le 13 Août 2020
Modifié(e) : hosein Javan le 13 Août 2020
function plotoutput()
x = 1:10;
y1 = x.*x;
y2 = x + 1;
figure(1);plot(x,y1)
figure(2);plot(x,y2)
alpedhuez
alpedhuez le 13 Août 2020
Let me work on it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Labels and Styling dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by