필터 지우기
필터 지우기

is my code below is correct?

조회 수: 2 (최근 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

답변 (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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by