Recent content by GE2014

  1. G

    What is the concept of xor in MATLAB?

    Alright I'll give it a try. Could you possibly explain a little more what xor does exactly? I've never heard of it
  2. G

    What is the concept of xor in MATLAB?

    @RoshanBBQ Probably wouldn't be good if I used your method. The point of the exercise is to practice for loops and arrays.
  3. G

    What is the concept of xor in MATLAB?

    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...
  4. G

    What is the concept of xor in MATLAB?

    sorry bout that. Just uploaded it
  5. G

    What is the concept of xor in MATLAB?

    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...
  6. G

    MATLAB function creation and application

    Update: 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 switch shape case 1...
  7. G

    MATLAB function creation and application

    lolwow I am a dumbass. might want to put Function in the function file huhh?
  8. G

    MATLAB function creation and application

    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...
  9. G

    MATLAB function creation and application

    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...
  10. G

    MATLAB programming assignment (for loop)

    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...
  11. G

    MATLAB assignment help (first time poster)

    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...
Back
Top