why there is only one value at my plot

조회 수: 3 (최근 30일)
Hakan Güngör
Hakan Güngör 2020년 6월 9일
댓글: darova 2020년 6월 12일
syms t
t = 0:0.1:15;
a = ((30-30.*exp(-2.*t)).*(30.*t+15.*exp(-2.*t)+35))/(sqrt(490000-(30.*t+15.*exp(-2.*t)+35).^2));
plot(t,a)
here is my code. it just calculate a for t=15 and just show it on plot. i am new in matlab. could you help me?

답변 (1개)

Tommy
Tommy 2020년 6월 9일
Without the below period, MATLAB is performing right matrix division on two 1x151 vectors, resulting in a scalar value.
t = 0:0.1:15;
a = ((30-30.*exp(-2.*t)).*(30.*t+15.*exp(-2.*t)+35))./(sqrt(490000-(30.*t+15.*exp(-2.*t)+35).^2));
% ^ period added here
plot(t,a)
  댓글 수: 2
Hakan Güngör
Hakan Güngör 2020년 6월 9일
Thank you so much!!! it works now :3
darova
darova 2020년 6월 12일

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by