1. Engineering
  2. Computer Science
  3. 2 write a matlab program using for loop that computes...

Question: 2 write a matlab program using for loop that computes...

Question details

2. Write a Matlab program using FOR loop that computes the sum of the even-indexed numbers of an array. load Array1. Use the length command to know the elements in the array.

3. Write a Matlab program using FOR loop that computes the largest element of an array. Load Array1, and use Array1 as the sample array to test your program. Use the length command to know the elements in the array.

4. Write a nested FOR loop (using two for loops & two fprintf statements to generate the following pattern:

5. Using a FOR loop write a program that given a vector of numbers computes how many numbers are greater than 10. Use Array2 to check your program.

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

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution