Question
1. Write a Matlab program using WHILE loop that computes the sum of the elements of an array. Load the lab7.mat file and from it,
1. Write a Matlab program using WHILE loop that computes the sum of the elements of an array. Load the lab7.mat file and from it, use Array1 as the sample array to compute the sum. Use the length command to know the elements in the array.
Write a Matlab program using WHILE loop that computes the largest element of an array. Load lab7.mat, and use Array1 as the sample array to test your program. Use the length command to know the elements in the array.
Use a while loop to write a program that given a vector of numbers computes how many numbers are greater than 10. Use Array2 to check your program.Write a program that reads numbers from the user and computes their sum until the user enters a negative number. Test program to illustrate functionality.
Array1 =
71 3 28 5 10 82 69 32 95 3 44 38 77 80 19
Array2 =
7 5 10 3 11 4 1 12 15 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started