Info

此问题已关闭。 请重新打开它进行编辑或回答。

Non-liniar function. Why is that?

2 次查看(过去 30 天)
Alexandru Miculescu
Alexandru Miculescu 2014-10-18
关闭: MATLAB Answer Bot 2021-8-20
Hi! I'm new here, and i think I have a little problem. How it is possible to divide two liniar functions and get a non liniar function. Check the code below!
if true
% t1 = [0:0.1:60];
t2 = [60:0.1:90];
t3 = [90:0.1:110];
t4 = [110:0.1:140];
f1 = 10*ones(size(t1)) + t1/2;
f2 = 40*ones(size(t2));
f3 = 40*ones(size(t3))-2*(t3-90*ones(size(t3)));
f4 = 30*sin(pi*(t4-110*ones(size(t4)))/30);
t = [t1 t2 t3 t4];
f = [f1 f2 f3 f4];
m1 = 20*ones(size(t));
a1 = f./m1;
m2 = 5*ones(size(t)) + 15*ones(size(t)) - 0.03*t;
a2 = f./m2;
m3 = 5*ones(size(t)) + 15*ones(size(t)) - 0.5*t;
m3(m3<=5)=5;
a3 = f./m3;
plot(t,f,t,m3,t,a3);
grid on;
end

回答(1 个)

Image Analyst
Image Analyst 2014-10-18
Why should it be? It's like (20-0.5*x)/(10+0.5*x). That's not linear in x. The numerator and denominator are, individually , but the ratio is not. Why do you think it should be?

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by