Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with this MATLAB problem. I don\'t get it at all. (Reprieve of a pro

ID: 1843003 • Letter: I

Question

I need help with this MATLAB problem. I don't get it at all.

(Reprieve of a problem from an earlier homework.) The curve below shows the voltage across an incandescent light-bulb versus time. The current through the bulb has the same shape. The functions for the voltage and current are v(t) = 150 cos(2pi(60)t) V and i(t) = 4/3 cos(2pi(60)t) A. Use MATLAB to create a plot of the power versus time as follows: Create a vector of time, t, containing values from 0 to 1/60 of a second, spaced by 1/6000 of a second. Compute a vector for v(t) and a vector for i(t) by applying the cos () function to vector t. Use names of your choice for v(t) and i(t) in MATLAB. Use the .^* operator in MATLAB to compute the power p(t), which is the product of i(t) and v(t). Use the name p for the vector containing p(t). Use plot (t, p) to plot the waveform of the power versus time.

Explanation / Answer

{ The soultion presented below is  with the assumption that the student has basic knowledge of matlab. ( if the student does not then plz feel free to comment below and i will edit this answer to best possible explanation with screen shots) }

i will explain the relations given in the problem step by step (as mentioned in the second half of the question)

Step1)Defining variables V(t), I(t), P(t) and t

Step2) Defining the relation of variable P(t)

Above mention relation is Power = Voltage * current (a standard result) where P,V,I are functions for "t".

Step3) Defining the graph construct (meaning defining the axis and interval for "t")

Step4) Plot.

Below is a rough " main syntax " (u can refine it )

.........................................................................

Function graphs = graph (t)

Clc

t = 0:1/6000:1/60; .........................% (wt is just a variable to define the length of time axis)

V (t) = 150 cos (2*pi*60*t);

I (t) = 4/3*(cos (2*pi*60*t) ;

Xline = zeros (1, length (t));

P (t) =V (t) *I (t);

subplot(2,1,1);

Plot (t, P (t));

Title ( Power v/s time);

grid

hope this helps