Why will matlab plot one tan function but not the other.
7 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Star Strider
on 19 Oct 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])
0 Comments
See Also
Categories
Find more on Axes Appearance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!