Division inside an array
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (2)
Pawel Jastrzebski
am 22 Jan. 2018
0 Stimmen
fri = 1:3 j = 0:6 j = j'
result = j./fri
Mohamed Musni
am 22 Jan. 2018
0 Stimmen
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

