Division inside an array
Afficher commentaires plus anciens
these are the two arrays i have
fri =
1 2 3
j =
0 1 2 3 4 5 6
i want to divide each element inside fri by one value of j at once. ex : 1/0,2/0,3/0 after that 1/1,2/1/3/1 and so on.
when i perform Xij = j./fri it gives an error that matrix sizes must be equal.(logically this is wrong as i see). is there any way to perform this operation and get values? any help will be highly appreciated.
Réponse acceptée
Plus de réponses (2)
Pawel Jastrzebski
le 22 Jan 2018
0 votes
fri = 1:3 j = 0:6 j = j'
result = j./fri
Mohamed Musni
le 22 Jan 2018
0 votes
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

