## plot function in matlab?

Najmeh Eskandari

### Najmeh Eskandari (view profile)

さんによって質問されました 2018 年 8 月 5 日

### Jan (view profile)

さんによって コメントされました 2018 年 8 月 5 日
KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

さんの 回答が採用されました
I want to plot qi=q0+3*(qf-q0)*t^2-2*(qf-q0)*t^3 as defined in the picture.i use plot or ez plot but the figure that is drawn is not correct.
q0=10(degree)
qf=-20(degree)
t=0 to 1 second

KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

on 5 Aug 2018
Check the answer, I have edited. Pls confirm?
Jan

### Jan (view profile)

on 5 Aug 2018
@Najmeh Eskandari: Please post your code and the output. Then explain what "not correct" means, such that we can give you an advice how to improve your code.

サインイン to comment.

## 1 件の回答

### KALYAN ACHARJYA (view profile)

Answer by KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

on 5 Aug 2018
Edited by KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

on 5 Aug 2018

q_o=10;
qf=-20;
t=0:.1:1;
qi=q_o+3*(qf-q_o)*t.^2-2*(qf-q_o)*t.^3;
plot(t,qi);
title('Cubic Polynomial Trajectory');
xlabel('Time(sec)'); ylabel('Angle(deg)');

KALYAN ACHARJYA

### KALYAN ACHARJYA (view profile)

on 5 Aug 2018
Confirm?

サインイン to comment.

Translated by