Log display problem semilogx

3 次查看(过去 30 天)
Hi i want to show graph with log scale on x . this is my code:
a=5;
b=2;
x=0.0001:1000000;
y=@(x) ax+b;
figure
semilogx(x,y)
hold off
and this is my error:
Error using semilogx
Invalid data argument.
Error in Untitled1 (line 6)
semilogx(x,y)
i read how use semilogx and have no idea where i make mistake

采纳的回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019-11-19
a=5;
b=2;
x=0.0001:1000000;
y=a*x+b;
figure
semilogx(x,y)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Object Programming 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by