I do not know why this does not works.
clc
clear
t=0:0.5:50;
%Grafica de y(t)=x1(t) y x2(t)
x1= 1 - (exp(-(t/4)))*(cos(0.322748612*t))-((1/2)/sqrt(5/48))*(exp((-t/4)))*(sin(0.322748612*t));
x2= ((1/6)/sqrt(5/48))*exp((-t/4))*sin(sqrt(5/48));
subplot(2,1,1);
plot(t,x1)
grid on;
subplot(2,1,2);
plot(t,x2);
grid on

 채택된 답변

James Tursa
James Tursa 2020년 4월 29일

0 개 추천

Use element-wise operators (with the dot .) instead of matrix operators (without the dot .), e.g.,
x1= 1 - (exp(-(t/4))).*(cos(0.322748612*t))-((1/2)/sqrt(5/48))*(exp((-t/4))).*(sin(0.322748612*t));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by