question about table command??

1 回表示 (過去 30 日間)
mohamed
mohamed 2016 年 3 月 12 日
hello im trying to put several elements in a table but each time i do it this result pops out
ans =
pwf3 q3
____________ ____________
[1x6 double] [1x6 double]
i want the table to display the number inside them
this is the code i used
pr=2500
start=input('enter the starting pressure ');
interval=input('enter interval ');
maxp=input('enter maximum pressure ');
pwf3=[start:interval:maxp];
q3=((1-(0.2*(pwf3/pr)))-(0.8*(pwf3/pr).^2))*1067;
table(pwf3,q3)
thank you

採用された回答

Star Strider
Star Strider 2016 年 3 月 12 日
Transpose them to columns and it will display them as you want:
pwf3=[start:interval:maxp]'; % Transpose To A Column Vector
q3=((1-(0.2*(pwf3/pr)))-(0.8*(pwf3/pr).^2))*1067;
table(pwf3,q3)
pwf3 q3
____ ____
0.03 1067
0.04 1067
0.05 1067
0.06 1067
0.07 1067
0.08 1067
0.09 1067
0.1 1067
  3 件のコメント
Star Strider
Star Strider 2016 年 3 月 12 日
As always, my pleasure!
Dhanushka Sandaruwan
Dhanushka Sandaruwan 2017 年 4 月 14 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by