plot not displaying figure

6 Ansichten (letzte 30 Tage)
Opariuc Andrei
Opariuc Andrei am 18 Jan. 2021
Kommentiert: Opariuc Andrei am 19 Jan. 2021
how can i plot func between the interval below , i don't have an image of the function anymore but the exact way the function was given was sin(3*x^2) , i'm not receiving any errors just a blank figure
x=-23:.1:23;
func=sin(3*x.^2);
plot(x,func);grid on;axis tight;
  1 Kommentar
Bob Thompson
Bob Thompson am 18 Jan. 2021
The code you posted worked fine for me. Is there some additional code you have with this? Perhaps the issues lies there.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 18 Jan. 2021
shg % at the end perhaps?
  5 Kommentare
Opariuc Andrei
Opariuc Andrei am 18 Jan. 2021
Bearbeitet: Opariuc Andrei am 18 Jan. 2021
ok so i did it without the subplot and it works ,but the figure is supposed to be there in the top left corner , it's a requirement , i tweaked it's position to (2,2,2/3/4) and still no display , how can i make it function ?
Opariuc Andrei
Opariuc Andrei am 19 Jan. 2021
ok so i moved the subplot 2 lines up and put it before the plot and got it to work
x=-23:.1:23;
func=sin(3*x.^2);
subplot(2,2,1);
plot(x,func);grid on;axis tight;
title('func=sin(3*x^2)');

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by