while T > Tf
Parse error at '>' and at 'end'
조회 수: 12 (최근 30일)
이전 댓글 표시
trying to run a simple for loop as shown in my code below but I'm not sure why I'm getting Parse Errors at '<' and 'end'. Any suggestions?
T = 473.15;
t = 0;
% initial values for temperature and time
n = 0;
% prompt for steps
Tf = 323.15;
for T > Tf
% until the temperature drops to 50 degrees Celsius
T = T + n * -7.38105;
% Heun's Method without iterations
t = t + n * 60;
% Time Progression
n = n + 1;
% Step Progression
fprintf('Temperature: %d\n', T);
fprintf('Time: %d\n', t);
fprintf(' \n')
end
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!