Azzera filtri
Azzera filtri

Setting a Range of X values to Plot

52 visualizzazioni (ultimi 30 giorni)
Nasir Holliday
Nasir Holliday il 6 Mar 2020
Risposto: santosh il 15 Mag 2024
Hi. I have a range of very small numbers to plot in a graph but MATLAB isn't accepting what I want.
For example, if I wanted to plot from -5 to 5, I would input x=[-1:4] and it would have x = -1 0 1 2 3 4.
I'm trying to plot a range from 10E-10 to 10E-07. When I code x=[10E-10:10E-07], it only returns the function as x=10E-10 and not the range.
What am i supposed to do?

Risposte (3)

Keerthana Chiruvolu
Keerthana Chiruvolu il 17 Mar 2020
Hi,
Kindly use xlim([10e-10 10e-7]) to set the x axis range.
Refer the xlim()documentation for further information.

santosh
santosh il 15 Mag 2024
>>X=[-10:10]; >>y=2*x=10 >>Plot(x,y)

santosh
santosh il 15 Mag 2024
plot the following linear graph y=3x+10 within rang of [-10,10]

Categorie

Scopri di più su 2-D and 3-D Plots 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