Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i do this?

1 回表示 (過去 30 日間)
m
m 2014 年 11 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
hey guys, i must make a plot like as follows: L=ax. x is constant. a is changing linearly in some intervals so L is changing like that also (in the picture for theta=-180:-120 and 0:60 a is decreasing linearly, -60:0 and 120:180 a is increasing linearly, -120:-60 and 60:120 a is equal to zero). How can i do this there are three parameters: a, L and theta. And L is changing with variation of theta and a.

回答 (2 件)

Orion
Orion 2014 年 11 月 10 日
Hey,
Just do :
% amplitude
Lmaks = 10;
% coordinates vectors
theta = [-180 -120 -60 0 60 120 180];
L = [Lmaks 0 0 Lmaks 0 0 Lmaks];
% plot
figure('Position',[59 544 756 220]);
plot(theta,L);
axis([-180 180 -5 15]);
xlabel('\theta_m')
ylabel('L_{11}(\theta_m)')
grid

m
m 2014 年 11 月 10 日
編集済み: m 2014 年 11 月 10 日
thanks a lot. I wonder if there is a method like a simulation. for example theta is position of motor and when the motor starts to rotating then L is changing with them is it possible in matlab? i won't do this, i wonder only
  1 件のコメント
Orion
Orion 2014 年 11 月 10 日
Sure, you can do that with something like
time = 0:0.01:5;
MyAngularValue = 2*180/pi*sin(2*pi*time);
MyLvalue = interp1(theta,L,MyAngularValue);
figure;
subplot(211)
plot(time,MyAngularValue,'b')
ylabel('theta')
subplot(212)
plot(time,MyLvalue,'r')
ylabel('L')
xlabel('time')

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by