My graph is blank

1 次查看(过去 30 天)
Kevin Chapman
Kevin Chapman 2019-1-30
The function is n=(m-10)/m for 0(less thab or equal to)m(less than or equal to)5
>> m=0:0.1:5;
>> n=(m-10)/m;
>> plot(m,n);

采纳的回答

Star Strider
Star Strider 2019-1-30
You need to use element-wise division:
m=0:0.1:5;
n=(m-10)./m;
plot(m,n);
Replace / with ./ (note the dot operator), and it works.
See the documentation section on Array vs. Matrix Operations (link) for an extended discussion.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Directed Graphs 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by