1x7 double
Show older comments
I'm trying to create a table using certain equations.
%V = voltage across nth resistor
%Resistor = value of nth resistor
%Requal = total sum of resistors
%VS = voltage source = 120 volts
VS=120
Resistor=[200,140,120,180,80,150,100];
Requal=sum(Resistor)
Vn=(Resistor/Requal)*VS;
%Vn = votage across nth resistor
Pn=Vn.^2./[Resistor]
%Pn=power dissipated in nth resistor
T=table(Resistor,Vn,Pn)
I so far have this however every time I run the program it gives me a 1x7 double under the columns. How do I get rid of the 1x7?
Answers (1)
Make Resistor a column vector instead of a row vector,
VS=120
Resistor=[200,140,120,180,80,150,100].'; %<---Column vector
...
T=table(Resistor,Vn,Pn)
1 Comment
Noora Muhamad
on 22 Sep 2015
Categories
Find more on Dynamic System Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!