Question: 1 Problems: Problem 1 Auto differentiating function - single order Step 1 Write a m - file function named y = Diff ( v ,
Problems:
Problem
Auto differentiating function single order
Step Write a mfile function named Diff where
is a symbolic single variable
is a positive integer representing the order of differentiation
is the th derivative of the variable in the form of
For example.
Step Check for the positive and integer condition of the input and if is is not satisfied, then throw an error for it For this purpose, look for isinf floor, and error functions.
Step You should convert the symbolic variable and the number to strings, and then concent rate that with The result string can be turned to a symbolic variable using the mat lab builtin function sym
Hint: Check the matlab builtin functions sym char, and numstr help documents. Also, check how can you concentrate multiple strings in MATLAB.
Step write a test script, name it testDiff, m that check the output of the function as the above test script.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
