How do I get the table to have the same rows.

Try to display data in a table but keep getting
Error using table
All table variables must have the same number of rows.
Here the code
A=50*sqrt(2);
Pave=(A^2)/2;
m=(0:.05:1.25)';
m1=m.^2
Pc=Pave/(1+(m1./2)+(m1./2))
USB=((m.^2).*Pc)./2;
LSB=((m.^2).*Pc)./2;
T = table(m,Pc,USB,LSB)

 Accepted Answer

if m1 is a column vector then
Pc=Pave/(1+(m1./2)+(m1./2))
involves the / "matrix right divide" operator, which is a least-square fitting operation that would return a scalar. The / operator is not element-by-element division, which is the ./ operator

More Answers (0)

Categories

Products

Release

R2022a

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!