Why will matlab plot one tan function but not the other.

3 visualizaciones (últimos 30 días)
John
John el 18 de Oct. de 2014
Respondida: Star Strider el 19 de Oct. de 2014
Why will matlab plot tan(8856*x/9444) using ezplot but won't plot 'tan(8856906554427779*x/9444732965739290427392).
For the first one it gives me a nice tangent looking graph but for the second one I just get a diagonal line.

Respuestas (1)

Star Strider
Star Strider el 19 de Oct. de 2014
They’re not the same functions. The fraction in ‘f1’ =0.9377 (q1). The fraction in ‘f2’ =937.8E-009 (q2). Enlarging the x-axis limits as in figure(2) produces the desired plot:
f1 = @(x) tan(8856*x/9444);
q1 = 8856/9444;
f2 = @(x) tan(8856906554427779*x/9444732965739290427392);
q2 = 8856906554427779/9444732965739290427392;
figure(1)
ezplot(f1)
figure(2)
ezplot(f2, [-2E+6*pi 2E+6*pi])

Categorías

Más información sobre Axes Appearance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by