Question: help pls!! 1. Open MATLAB Exit Fullscreen 2. Select New > Script (or Ctrl+N) to open a new script in MATLAB. Save it as lab
help pls!!


1. Open MATLAB Exit Fullscreen 2. Select New > Script (or Ctrl+N) to open a new script in MATLAB. Save it as lab 2. 3. Give the MATLAB expression that would create a vector (in a variable called vec) of 100 elements that range, equally spaced, from 10 to 30: 4. Write an expression using linspace that will result in the same as 15: 0.01: 30. Hint: use length, min, and max on the original vector. 5. Generate a 2 x 3 matrix of random real numbers, each in the range (0, 23) integers, each in the inclusive range from 18 to 25. 6. A nutritionist would like to easily calculate the average calories for a certain client. Create a matrix called calories, where the rows represent breakfast, lunch, and dinner respectively and the columns represent each day. Give reasonable values for each element of the matrix, assuming the data is for one week. Using the sum function calculate the total calories for each day and store the result in a matrix called day. Finally, use the mean function to calculate the average calories. Store the result in a variable called avg. 7. Using the day vector created above, give the average calories for the weekend and the average calories for the weekday. Store the results in variables weekend and weekday respectively. element of the matrix, assumin Exit Fullscreen ne week. Using the sum function calculate the total calories for each day and store the result in a matrix called day. Finally, use the mean function to calculate the average calories. Store the result in a variable called avg. 7. Using the day vector created above, give the average calories for the weekend and the average calories for the weekday. Store the results in variables weekend and weekday respectively. 8. For the following matrices A, B, and C: A=(1348),B=[311652),C=[471638] give the result of 2*B give the result of B*C Are there any other matrix multiplications that can be performed? If so, list them. WHAT TO TURN IN: Once you have completed the procedure, all results should be stored as comments and code in the M-file created in 2. Turn in the M-file as a text file (.txt)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
