Question: 1 . ( 1 0 % ) Use a for loop to create vector X which has 3 elements, and the element value is square

1.(10%) Use a for loop to create vector X which has 3 elements, and the element value is square of counter value. 2.(10%) Develop a function to accept an arbitrary vector provided by the user and by using a loop to find if there is any non_zero value of element in the vector. Test the function on a vector V=zeros(1,5).3.(10%) Using a double for loop, create a matrix 2x3 with random elements with values between 0 and 1.4.(10%) Using a double for loop, create an anti-identity" matrix, the size of which is an input from the user. The anti-identity matrix is an identity matrix where the ones are replaced by zeros and the zeros are replaced by ones (Note: the term anti-identity matrix does not exist).5.(10%) Create a function using a "while loop. The function asks the user to input a number between 10 and 20. If the number is not within the specified limits, the user must change his/her input until he/she enters the correct value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!