Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (raffle_snaffle):

Matlab

OpenStudy (raffle_snaffle):

@UnkleRhaukus

OpenStudy (anonymous):

?

alones (alones):

**math lab

OpenStudy (raffle_snaffle):

OpenStudy (raffle_snaffle):

% defining input variables for RLC circuit f_volt = 60; % measured in hertz W_volt = 120; % measured in volts rms R = 100; % measured in ohms L_o = 0.005:0.005:0.245; % matrix L 2D matrix incr. from left to right C_o = 5e-6:10e-10:9.5e-5; % matrix C 2D matrix incr. from top to bottom % current output for RLC circuit (I) in RLC circuit (note: j = sqrt(-1)) I = 120. / ((100 + j*2*pi(f_volt).*L_o - (j / 2*pi*(f_volt).*C_o)) % total power ouput in RLC circuit %

OpenStudy (raffle_snaffle):

My main concern is if the L_o and C_o are setup correctly?

OpenStudy (raffle_snaffle):

so I guess my matrices don't agree in dimension so...

OpenStudy (raffle_snaffle):

[x-new, y-new] = meshgrid(x,y) ?

OpenStudy (raffle_snaffle):

ahhh okay. Why wouldn't we use meshgrid?

OpenStudy (raffle_snaffle):

if you transpose cap the dimensions don't work

OpenStudy (raffle_snaffle):

nvm i will figure it out, night!

OpenStudy (anonymous):

it's not night time

OpenStudy (unklerhaukus):

yes it is.

OpenStudy (anonymous):

were?

OpenStudy (raffle_snaffle):

Did you mean: >> I = 120. / ((100 + j*2*pi(f_volt)*L_o - ((j) / (2*pi*(f_volt)*C_o)))) Error using pi Too many input arguments.

OpenStudy (zzr0ck3r):

slacker

OpenStudy (raffle_snaffle):

% defining input variables for RLC circuit f_volt = 60; % measured in hertz W_volt = 120; % measured in volts rms R = 100; % measured in ohms L_o = 0.005:0.005:0.245; % matrix L 2D matrix incr. from left to right C_o = 5e-6:10e-10:9.5e-5; % matrix C 2D matrix incr. from top to bottom [L_o, C_o] = meshgrid(L_o,C_o); % current output for RLC circuit (I) in RLC circuit (note: j = sqrt(-1)) I = 120 / ((100 + j*2.*pi(f_volt)*L_o - (j / 2.*pi*(f_volt)*C_o)) % power observed by resistor P_R = 100*abs(I.^2); @UnkleRhaukus

OpenStudy (raffle_snaffle):

@reemii

OpenStudy (raffle_snaffle):

So for some reason my current equation isn't running smoothly

OpenStudy (raffle_snaffle):

Look at the assignment above...

OpenStudy (reemii):

there's a missing parenthesis in `120 / ((100 + j*2.*pi(f_volt)*L_o - (j / 2.*pi*(f_volt)*C_o))`

OpenStudy (reemii):

`I = 120 / ((100 + j*2.*pi(f_volt)*L_o - (j / 2.*pi*(f_volt)*C_o))` on that line

OpenStudy (raffle_snaffle):

@reemii I don't know what the problem is...

OpenStudy (reemii):

my editor says that there the parenthesis starting just after `120 /` is not closed.

OpenStudy (raffle_snaffle):

>> I = 120. / ((100 + j*2*pi*f_volt*L_o) - (j. / 2*pi*f_volt*C_o)) I = 120. / ((100 + j*2*pi*f_volt*L_o) - (j. / 2*pi*f_volt*C_o)) ↑ Error: Unexpected MATLAB operator.

OpenStudy (raffle_snaffle):

I closed it and now it says the / is not valid operator

OpenStudy (raffle_snaffle):

I = 120. / (100 + j*2.*pi*f_volt*L_o - (j. / (2.*pi*f_volt*C_o)))

OpenStudy (raffle_snaffle):

do i have to put a . right after the numerator when I am dividing by a matrix?

OpenStudy (reemii):

I don't know. What is the matrix there? Also, I don't understand the meaning of the `j.` in the denominator . Why the dot?

OpenStudy (raffle_snaffle):

L_o = 0.005:0.005:0.245; % matrix L 2D matrix incr. from left to right C_o = 5e-6:10e-10:9.5e-5; % matrix C 2D matrix incr. from top to bottom

OpenStudy (raffle_snaffle):

j is an imaginary number instead of using i. Do I need to use i? Even if I use i the code shows a problem

OpenStudy (raffle_snaffle):

>> lab03 Error using / Matrix dimensions must agree. Error in lab03 (line 18) I = (120)/(100 + 1i*2*pi*60*L_o - ((1i)/(2*pi*60*C_o)));

OpenStudy (reemii):

`I = 120 / ((100 + j*2.*pi(f_volt)*L_o - (j / 2.*pi*(f_volt)*C_o)) ` without `j.` `I = 120 / ((100 + j*2.*pi(f_volt)*L_o - (j. / 2.*pi*(f_volt)*C_o))` with `j.` Try the first one. Also, are you sure you want `2.*pi*(f_volt)*C_o)` and not `(2.*pi*(f_volt)*C_o))` ?

OpenStudy (raffle_snaffle):

^as you can see above i made all of those corrections

OpenStudy (reemii):

`120. /` is not `120 ./` . You wrote `120. /`, did you try `120 ./` ?

OpenStudy (raffle_snaffle):

okay well that worked.

OpenStudy (raffle_snaffle):

so when I run the code I just get an array of calculations that go on forever how can i stop it ?

OpenStudy (raffle_snaffle):

oh nvm it stopped

OpenStudy (raffle_snaffle):

% power obsorbed by resistor P_R = 100*abs(I.^2); % stores max power inside P_R matrix max_PR = max(P_R); so how do I go about solving this part? Use your results to report which specific value for L and value for C resulted in max PR. Store these two results in the variables max L and max C, respectively. The find function should be instrumental here

OpenStudy (raffle_snaffle):

% power obsorbed by resistor P_R = 100*abs(I.^2); % stores max power inside P_R matrix max_PR = max(P_R); Max_L = find(max(L_o)) ???

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!