- #1
Aydashka
- 4
- 0
New poster has been reminded to show their work on schoolwork problems
Hi! I really need help with the following Matlab problem.
What does this code do? I need to comment what the important lines of this code do. Also the code contains several errors which i need to find. Here is the program:
Thank you so much in advance!
What does this code do? I need to comment what the important lines of this code do. Also the code contains several errors which i need to find. Here is the program:
Matlab:
clear all; close all; clc;
Maxi=50; tab=[1 :Maxi] ; tab(1)=0;
while 0==0
i=1;
while tab(i)==0
i=i+1;
end
p=tab(i) ; disp( [num2str(p)] ) ;
for k=p:p:Maxi
tab(k)=0;
end
end
Last edited by a moderator: