A totally lost student :)
3 ビュー (過去 30 日間)
古いコメントを表示
I have been trying to solve a problem for a while now on MATLAB but am not coming anywhere. I have made a graph that i think is good but if you compare it to solution and my graph they are not the same. The question is;
It is often quite difficult to determine the range of a function exactly. Use a graphing utility (calculator or computer) to graph the function f, and by zooming in on the graph, determine the range of f with accuracy of 2 decimal places.
f(x)= (x-1)/(x^2+x)
my code:
>> f=@(x) (x-1)./(x.^2+x);
>> x=-25:0.1:25;
>> y=f(x);
>> plot(x,y)
please help and tell my why my graph is not the same as the solution.
0 件のコメント
採用された回答
Sulaymon Eshkabilov
2020 年 9 月 8 日
Hi,
Here is the corrected solution to your exercise.
f=@(x) (x-1)./(x.^2+x);
x=[-25:0.1:-1, 0:.1:25;]; y=f(x); plot(x,y), grid on, shg
0 件のコメント
その他の回答 (1 件)
Steven Lord
2020 年 9 月 8 日
The limits of the axes in your figure are different from the limits of the axes pictured in your textbook. Try changing the axes limits to better match those of the axes in your book and the two should look a lot more similar.
xlim([-5 5])
ylim([-7 1])
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!