I need to divide two matrix with different rows and column
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
rajasekar dhandapani
le 18 Juin 2019
Modifié(e) : Adam Danz
le 19 Juin 2019
Hi Everyone,
I have two Matrix
A= 1x12
B=11x12
I want to divide D=A(of 1st element) / B(of complete Row)
now D should have 11 Rows which all divided by 1st element in A
Is it possible to do with for loop?
Thanks a lot..!
0 commentaires
Réponse acceptée
Adam Danz
le 18 Juin 2019
Modifié(e) : Adam Danz
le 18 Juin 2019
Your description asks for two different things.
"I want to divide D=A(of 1st element) / B(of complete Row)"
% Fake data
A = randi(20,1,12);
B = randi(20,11,12);
D = A(1,1)./B
"D should have 11 Rows which all divided by 1st element in A"
D = B / A(1,1);
Or do you want to divide each column of A by the columns in B?
D = A ./ B;
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!