hey, i need help with this assignment, more importantly, I want an explanation h
ID: 3349157 • Letter: H
Question
hey, i need help with this assignment, more importantly, I want an explanation how and is the like what expected especially the graph about the code I want to be documented.
MATLAB Assignment Submit the following items All MATLAB code & m-file Begin with a block of comments including your name, assignment name, problem o Include comments throughout each program. Use comments to indicate units for variables o All graphs should be nicely formatted, including titles, axis labels, gridlines, and text with name and problem number All required MATLAB outputs (result script & plots) 1) Ist-order differential equations Write a MATLAB program to solve each differential equation belo. Graph the results using ezplot() . No hand analvsis is required A) + 500v(t) 5000,tz0 where v(0)-5V dt di B) + 2000 i(t) = 100, t dt 0 where i (0)--20 mA 2) 2nd-order differential equations Write a MATLAB program to solve each differential equation below Graph the results using ezplot() No hand analysis is required A)2000+2.6-10 v(t)-5.2-108,tz0 where v(0)-5V dt di dt dt dt +100_ +25001(t) = 5.2-108,20 dt where i(0)-0A, B) 2 dtExplanation / Answer
1)
a)
clc;
close all;
clear all;
syms v(t)
%%declare function is in terms of t
ode =(diff(v,t)+500*v) ==5000;%write the diffrential equation
cond=v(0)==5; %%give the initial condition
vSol(t) = dsolve(ode,cond)
b)
clc;
close all;
clear all;
syms i(t)
%%declare function is in terms of t
ode =(diff(i,t)+2000*i) ==100;%write the diffrential equation
cond=i(0)==-20*10^-3; %%give the initial condition
iSol(t) = dsolve(ode,cond)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.