필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

it is not plotting

조회 수: 1 (최근 30일)
Meva
Meva 2015년 5월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
I try this;
beta1 = 0.4*pi;
alphabar = 1;
dx=0.01;
for i=1:101
xx(i) = (i-1)*dx
end
dt=0.0001;
for nt=1:10001
t=(nt-1)*dt
...
if t==0.1
for i=1:101
t
if xx(i) < t
dp2dx(i) = -beta1-3*beta1^2.*xx(i);
else
dp2dx(i) = -beta1+2.*xx(i)*(-beta1*alphabar-1.5*beta1^2) + ...
t*2*beta1*alphabar;
end
end
figure(16)
plot(xx,dp2dx)
where xx(i) = (i-1)*0.01. But it is not plotting. Any suggestions??
  댓글 수: 10
Meva
Meva 2015년 5월 9일
편집: Meva 2015년 5월 9일
I now see the reason of not plotting. It is because dp2dx is 1 dimensional just a value not 1*101 array. But I have used this in a for loop. It is supposed to be 1 *101 array.
Meva
Meva 2015년 5월 9일
I solved the problem. Thanks guys.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by