Question

MATLAB QUESTION

Find the general solution of the given application of differential equation using MATLAB.

NOTE: Screenshot the MATLAB ENVIRONMENT together with the CODES and FINAL ANSWERS.

PLEASE SOLVE USING MATLAB CODE! PLEASE SOLVE USING MATLAB CODE! PLEASE SOLVE USING MATLAB CODE! A circuit has in series an el

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

ANSWER:

  • I have provided the properly commented code in both text and image format so you can easily copy the code as well as check for correct indentation.
  • I have provided the output image of the code so you can easily cross-check for the correct output of the code.
  • Have a nice and healthy day!!

CODE TEXT

% first order diffrential equation

% for E = 50*sin(20t), R = 5, I(inductance) = 0.4 Henrys, current=i is

% I (di/dt) + R.i = E(t)

% using syms and dsolve methods of matlab

syms curr(t)

% defining other given variables

I = 0.4;

R = 5;

E = 50*sin(20*t);

% defining equation

eqn = I*diff(curr,t) + R*curr == E;

% defining initial condition

cond = curr(0) == 0;

% solving equation using dsolve w.r.t initial condition

currSol(t) = dsolve(eqn,cond);

% finding current for T=1:100 using solution, converting sym solve to

% double

T = 1:100;

current = double(currSol(T));

% ploting the result

plot(T,current);

xlabel('Time');

ylabel('Current');

title('Time vs current for I (di/dt) + R.i = E(t)')

CODE/ENVIRONMENT IMAGE

OUTPUT IMAGE

Add a comment
Know the answer?
Add Answer to:
MATLAB QUESTION Find the general solution of the given application of differential equation using MATLAB. NOTE:...
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