How can I show to column vectors side by side?

40 ビュー (過去 30 日間)
fatima Alnaqbi
fatima Alnaqbi 2016 年 12 月 9 日
編集済み: KSSV 2016 年 12 月 9 日
disp('Magnitude'); fprintf('\b'); disp(' Phase'); Magnitude=abs(I) Phase=(pi\180)*atan2(imag(I),real(I))
Magnitude =
1.1197
0.14003
0.0012574
Phase =
-83.5704
96.4874
-19.6175
how can I show the answers as two beside columns

回答 (2 件)

Bjorn Gustavsson
Bjorn Gustavsson 2016 年 12 月 9 日
That should be as simple as:
disp([[1;2;3],[6;4;1]])
HTH

KSSV
KSSV 2016 年 12 月 9 日
編集済み: KSSV 2016 年 12 月 9 日
Mag = rand(3,1) ;
Phase = rand(3,1) ;
[Mag Phase]
or
M = rand(3,1) ; P = rand(3,1) ;
fprintf('Magnitude Phase\n') ;
for i = 1:size(M,1)
fprintf('%f %f\n',M(i),P(i)) ;
end

カテゴリ

Help Center および File ExchangePhased Array Design and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by