Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use the Matlab to fill the blanks. function harmonicosc(m,b,k) % estimate behavior to homogeneous equation my..+by'+ky d-discriminant(m,b,k) rl-(-b+sqrt (d))./(2.*m) r2-(-b-sqrt(d))./(2.*m); homognode-@(r,t) exp (r.*t); disp(I'The
Please use the Matlab to fill the blanks.
function harmonicosc(m,b,k) % estimate behavior to homogeneous equation my..+by'+ky d-discriminant(m,b,k) rl-(-b+sqrt (d))./(2.*m) r2-(-b-sqrt(d))./(2.*m); homognode-@(r,t) exp (r.*t); disp(I'The discriminant is num2str(d) '.']) t-linspace(0,10,1000); y-homognode (r1,t)+homognode (r2,t) y-real(y); plot(t,y) function d-discriminant (m,b,k) d-b. "2-4*m.*k; Save this file Execute >> help harmonicosc Type exactly the message that appears in the command window This script contains a nested function (discriminant). Once you have saved harmonicosc to your current folder, execute discriminant(3,2,5) in the command window. What happens? Undefined function or variable 'discriminant' On what line of code is the nested subfunction actually used? What is the discriminant if you run harmonicosc 10,2,60)7 How many "outputs" occur if you occur if you run harmonicosc(10,2,60)? (Hint: look at the workspace.) CheckStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started