its giving me a matrix dimension must agree error
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
a1 = 1448.96;
a2 = 4.591;
a3 = -5.304*10.^-2;
a4 = 2.374*10.^-4;
a5 = 1.340;
a6 = 1.630*10.^-2;
a7 = 1.675*10.^-7;
a8 = -1.025*10.^-2;
a9 = -7.139*10.^-13;
T=15:2:0;
S=35;
z=500:200:4000;
%[T,z] = meshgrid(15:2:0,500:200:4000);
c = a1 + (a2.*T) + (a3.*T.^2) + (a4.*T.^3) + (a5*(S - 35)) + (a6.*z) + (a7.*z.^2) + (a8.*T.*(S - 35)) + (a9.*T.*z.^3);
plot(z,c,'-',T,c,'--');
댓글 수: 1
답변 (1개)
Sebastian Winter
2013년 9월 17일
편집: Sebastian Winter
2013년 9월 17일
0 개 추천
Hi,
your T is an empty matrix. If it should count backwards from 15 to 0 you have to select the interval -2 instead of 2:
T=15:-2:0;
but then T and z is still incompatible...
Best regards
Sebastian Winter
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!