MATLAB: EMERGENCY Cannot plot “10,000*exp(-10000*t);” help t = linspace(0,0.001,100);Impulse = 10,000*exp(-10000*t);plot(t,Impulse,'r','LineWidth',3); The plot comes up blank. Why? Best Answer Because you used a comma to define the 10000, and MATLAB sees that comma as a statement separator. MATLAB interprets this lineImpulse = 10,000*exp(-10000*t);as two separate statementsImpulse = 10000*exp(-10000*t);Get rid of the comma.Impulse = 10000*exp(-10000*t); Related SolutionsMATLAB: Code for plot figure lamda=0.2;mu=1-lamda;P1=mu^2/(mu+lamda)^2;P2=2*lamda*mu/(mu+lamda)^2;P3=lamda^2/(mu+lamda)^2;display(P1);display(P2);display(P3);t = 1:5:100 ;P11 = zeros(size(t)) ; P22 = zeros(size(t)) ; P33 = zeros(size(t)) ; for i = 1:length(t) P11(i)=((mu+lamda)^2)-( 2*lamda)*((mu-lamda)*exp(-(mu-lamda)*t(i))-mu+(lamda*exp(-2*(mu+lamda)*t(i))))-(lamda^2)*(2*exp(-mu*t(i))-2*exp(-(mu+lamda)*t(i))+1-exp(-2*(mu+lamda)*t(i))); P22(i)=((-2*lamda)*(mu-lamda)*exp(-(mu+lamda)*t(i))/(lamda+mu)^2)+(2*lamda*mu/(lamda+mu)^2)-2*(lamda)^2*exp(-2*(mu+lamda)*t(i)); P33(i)=(lamda^2)/(lamda+mu)*((2*exp(-2*mu*t(i)))-(2*exp(-(mu+lamda)*t(i)))-exp(-2*(mu+lamda)*t(i))+1);endA=P11;B=P33;C=P22;plot(t,A,t,B,t,C)legend({'A','B','C'}) MATLAB: How to plot that phi=.1;%not sure what you whatalpha=2*log(10);f=4;A=1;t=0:.001:1;f=@(t)A*exp(-alpha*t).*cos(2*pi*f*t+phi);plot(t,f(t)); Related QuestionUsing Linear congruential to generate 10,000 uniform random variablesHow to read only a specific lines from txt file and store as arrayApproximating pi with taylor series expansion to the 10,000th termCalculate average of specific values in one table column
Best Answer