Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 

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

Step: 1

Function to perform operation based on given char var... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Programming questions

Question

Solve the IVP with y(0) = 0 using ode45. dy dt = e~! (4.10.1)

Answered: 1 week ago