Question: 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.

Please use the Matlab to fill the blanks. function harmonicosc(m,b,k) % estimate

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.) Check

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!