Compress all the files as a single .zip file and upload to Blackboard. Complete the following tasks in MATLAB, and save all the .m files along with all the output .dat files (i.e. save(‘A1.dat’, ‘A1’, ‘-ascii’)). For all open-ended questions, write clear responses in LaTeX.
Problem 1: Practice with Loops and Vectors
(a) Using a for-loop, find all the odd numbers from 1 to 100 and store it as a vector called x. Save x in the file A1.dat.
(b) Using a for-loop, find all the even numbers from −1 to −100 and store it as a vector called y. Save
y in the file A2.dat
Get Free Quote!
405 Experts Online