Question: Write a function program and main script that perform the following steps: 1. Write a function file that takes two array (X, Y) and
Write a function program and main script that perform the following steps: 1. Write a function file that takes two array (X, Y) and one char variable (op) as inputs and it returns variable Z. Formula for Z is given below N op 1 z 2X(k)/k! = A=0 op=2 Z = X+Y X+Y op-3 Z= [X Y] N is the size of vector X and Y. if op is not one of the options above, the program will warn the user. 2. Write a main script that calls the function with two column vectors having random numbers between [0-1] with length N where N is a random integer number and a char variable taken from the user. Let assume that your main script stores the output of the function in variable T. Print the screen size of T . maximum element of T minimum element of T Hint: use num2str for converting a number to a char variable Cevap Sorunun cevabn buraya giriniz.
Step by Step Solution
3.45 Rating (148 Votes )
There are 3 Steps involved in it
Function to perform operation based on given char var... View full answer
Get step-by-step solutions from verified subject matter experts
