Question

Homework 3 - Arrays, Masking, Systems of Equations, Plotting, and Numerical Methods Function Name: sysEq Inputs: 1. (double)

MATLAB code help!!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

solution

SMatlab code sysEq.m function x = sysEq (A,b) x A\b; Edisplay the output decimal values sprintf (4.2f\n ,x); x end Smain.m\

//output

Save it Show input Run it (F8) Absolute running time: 0.29 sec, cpu time: 0.56 sec, x = 1.10 0.90

//copyable code

%Matlab code

%sysEq.m

function x = sysEq(A,b)

x = A\b;

%display the output decimal values

x = sprintf('%.2f\n ',x);

end

%main.m

%representing an A matrix

A = [0 -21; 16 -36];

%representing b matrix

B = [-19; -15;];

%call sysEquation

x = sysEq(A,B)

Add a comment
Know the answer?
Add Answer to:
MATLAB code help!! Homework 3 - Arrays, Masking, Systems of Equations, Plotting, and Numerical Methods Function Name: s...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT