is my code below is correct?

3 ビュー (過去 30 日間)
Venkata Rama Krishna Gona
Venkata Rama Krishna Gona 2020 年 8 月 13 日
回答済み: KSSV 2020 年 8 月 16 日
Xp=zeros(f,2);
F=zeros(f,2);
Nu=zeros(1,f);
f=2;
i=1;
while i<=f
disp(['For force F01',num2str(i)]);
F0(i,1)=input('enter the amplittude of forces column matrix in row wise--');
i=i+1;
end
the need the code to store the matrices values as F011 and F012. please help me out.Thanks
  2 件のコメント
Venkata Rama Krishna Gona
Venkata Rama Krishna Gona 2020 年 8 月 16 日
any one please help me..

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

回答 (1 件)

KSSV
KSSV 2020 年 8 月 16 日
Try this:
n=input('number of elements = ') % n = 4
for i=1:n;
a(i)=input('elements-'); % 1 2 5 7
end
a=reshape(a,n/2,n/2)' % not should be even for this example

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by