Effacer les filtres
Effacer les filtres

is my code below is correct?

2 vues (au cours des 30 derniers jours)
Venkata Rama Krishna Gona
Venkata Rama Krishna Gona le 13 Août 2020
Réponse apportée : KSSV le 16 Août 2020
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 commentaires
Venkata Rama Krishna Gona
Venkata Rama Krishna Gona le 16 Août 2020
any one please help me..

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 16 Août 2020
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

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by