PDA

View Full Version : نمی تونم این کد رو توی متلب اجرا کنم؟؟؟؟



samadblaj
پنج شنبه 10 دی 1394, 12:07 عصر
سلام لطفا راهنمایی کنید اجرای کد زیر روی متلب مشکلش نمی دونم چیه.



t_s=input('enter the t_s value=');
t_0=input('enter the t_0 value=');
k=input ('enter the temprature constant of matter=');
for t=0:100
tem=t_s+(t_0-t_s)*exp(-1*k*t);
if abs(tem -50)<=2
disp ('-------------------');
disp ('the target time is');
t
disp ('----------and also----------');

rahnema1
شنبه 12 دی 1394, 18:05 عصر
سلام
تو متلب در انتهای if و for باید end بذارید