Division inside an array
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Pawel Jastrzebski
el 22 de En. de 2018
0 votos
fri = 1:3 j = 0:6 j = j'
result = j./fri
Mohamed Musni
el 22 de En. de 2018
0 votos
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

