Azzera filtri
Azzera filtri

why won't Matlab plot anything?

2 visualizzazioni (ultimi 30 giorni)
saeed alkaabi
saeed alkaabi il 13 Giu 2023
Modificato: Walter Roberson il 13 Giu 2023
thetaP=linspace(0, 2*pi);
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')
when R1 and R2 are defined

Risposte (1)

Kojiro Saito
Kojiro Saito il 13 Giu 2023
Your code works fine.
R1=5;
R2=7;
thetaP=linspace(0, 2*pi);
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')
Possibly, figure is being off. Please try adding figure before plot.
figure;
plot(R1*cos(thetaP), R1*sin(thetaP), '-b', ...
R2*cos(thetaP), R2*sin(thetaP), '-r')

Categorie

Scopri di più su Graphics Objects in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by