Yea that makes sense.
I'm still pretty easily confused when it comes to for loops but here's what I think should be closer.
students=input('Enter number of students: ')
locker=zeros(1,students);
index=1;
for i=1:1:students
for j=1:1:students
if mod (index,students(j))==0...
Homework Statement
(see attached files)
basically, I have to solve a puzzle game simulated by matlab. In a school of n students with n lockers, each student opens and closes a locker they walk by. all the lockers start the game closed. the first student changes every locker's status...
Updated attempt since class this morning
shapesFunc.m
clc
clear
shape = menu('Choose a shape','1: Sphere','2: Isosceles Triangular Pyramid','3: cylinder','4: Cone','5: Rectangular Prisim','-1: Exit');
if (shape<-1||shape>5||shape==0)
disp('Invalid Entry')
end
while shape~=-1...
Homework Statement
*see attachment*
Homework Equations
The Attempt at a Solution
Alright, so we just began messing with functions in our class and I'm kinda struggling to grasp this assignment. I believe it should begin like this:
shape = menu('Choose a shape','1...
Homework Statement
(see attached file)
Homework Equations
(see attached file)
The Attempt at a Solution
isbn=input('Enter 9 Letter ISBN number: ','s');
for i=1:1:length(isbn)
(%indent)num=str2num(cat);
(%indent)check=num*i
%somewhere in...
Hey guys. First time posting on here. Hope I don't step on any toes with this post; not to familiar with how things work around here.
Basically, I'm super frustrated with this programming assignment I've been given. Been working for about 4-5 hours in between classes and can't seem to...