Question: 1. Write a Matlab program using 'for' or 'while' Matlab commands to compute the sum: S 200 n=1 1 n2 2. Write a Matlab program

1. Write a Matlab program using 'for' or 'while' Matlab commands to compute the sum: S 200 n=1 1 n2 2. Write a Matlab program using 'for' or 'while' to compute the product of the components of V=[v1,v2....,VN] P = v1*v2*..... *vN , for a given vector. Run your program for the vector defined by vn = (1+1), for n=1,2,....,N=50. 3. Write a Matlab program that computes the product of positive components of a vector V=[v1,v2,v3......,VN). Run your code on a vector V with vn= sin(n^2), for n=1,2,...,N=25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
