Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Check - function for testing the linearity of ODEs Step 7 Write a m - file function name y = CheckLinearity ( odes , var

Check-function for testing the linearity of ODEs
Step 7 Write a m-file function name y= CheckLinearity (odes, var) that check the linearity of a given symbolic ODEs, where
odes is the given symbolic expression.
var is the symbolic expression for the function of the given odes
y is boolean: true if ode is linear.
For example,
.
syms x
D 2x=Diff(x,1);
CheckLinearity (D2x+x,xStep 8 Use the technique that you learned in the class: substitute all the x and its derivatives with a dummy variable s (use the matlab build-in function subs). As a result, you obtain an expression like f(s).
Step 9 Check if the final expression f(s) is linear respect to s. This can be done by taking the first derivative of the expression with respect to s and check if the resultant has any s.
Hint: you should use the matlab built-in function has for the last step.
Step 10 Write a test script, name it testCheckLinearity, m that check the output of the function as the above test script.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions