if x=[0:0.2:2]; and y=[-0.4:0.1:0.2]; and the equation of y=x/(x+r)-1/(1+r) and r is non linear it is many of curves and the values of r is r=0.1, 1, 10, 100 how can i plot it in matlab please help me i am trying many methods but still has a problem
4 views (last 30 days)
Show older comments
Ashrakat Adel
on 6 Oct 2018
Commented: Ashrakat Adel
on 6 Oct 2018
if x=[0:0.2:2]; and y=[-0.4:0.1:0.2]; and the equation of y=x/(x+r)-1/(1+r) and r is non linear it is many of curves and the values of r is r=0.1, 1, 10, 100 how can i plot it in matlab
6 Comments
KALYAN ACHARJYA
on 6 Oct 2018
I have answered the question what I have understood, now you can modify the code as per your requirements
Accepted Answer
KALYAN ACHARJYA
on 6 Oct 2018
Edited: KALYAN ACHARJYA
on 6 Oct 2018
Are you looking for this one? Considering y is finding function wrt x and r.
x=0:0.2:2;
%y=-0.4:0.1:0.2;
r=[0.1 1 10 100];
for i=1:4
y=x./(x+r(i))-1/(1+r(i));
plot(x,y);
hold on;
end
legend('r=0.01','r=1','r=10','r=100');

More Answers (0)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox 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!