In: Computer Science
I need to get the MATLAB calculation for this but I can't. I past the exact same thing into MATLAB R2016b Editor but it gives me error. Please write your answer and telling what is wrong with the code. What should I add or remove in this code to get the answer and calculations. Please explain step by step this is the first time ever that I am using MATLAB. Thanks
I need to get the MATLAB calculation for this but I can't. I past the exact same thing into MATLAB R2016b Editor but it gives me error. Please write your answer and telling what is wrong with the code. What should I add or remove in this code to get the answer and calculations. Please explain step by step this is the first time ever that I am using MATLAB.
Thanks
>> V=5; R1=270; R2=470; R3=560; R4=220; R5=330;
>>Req1= R4+R5;
>>Req2=1/((1/R1)+(1/R2)+(1/R3));
>>Ieq=V/(Req1+Req2);
>>Veq1=Ieq*Req1;
>>Veq2=Ieq*Req2;
>>V1=Veq1*(R4/(R4+R5));
>>V2=Veq1*(R5/(R4+R5));
>>V3=Veq2;
>>I1=V3/R1;
>>I2=V3/R2;
>>I3=V3/R3;
all these commands are correct but you need to enter one command at a time in command window which already contains the angular brackets like (>>) after that you need to submit the command and press enter
like this
semicolon at the end of a
command means not to display the result after the execution of
command
as you can see that i entered a=1
then it printed a
=1
but if i type a=1;
it will not print anything
all these lines are correct but the lines whose output you wanna see those must not have that semicolon at the end
and remember you need to enter the commands one by one
like first you enter
V=5; R1=270; R2=470; R3=560; R4=220; R5=330;
this will not print anything
then
write this
Req1= R4+R5
(not to add semicolon at the end )
this will print
Req1=
550
and so on so that you can get your answer
my matlab is not working thats why i can post the image of solved answer but you can try this in your system and can comment if you struck somewhere or find something not working.
Thanks hope this help