Division inside an array
古いコメントを表示
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.
採用された回答
その他の回答 (2 件)
Pawel Jastrzebski
2018 年 1 月 22 日
0 投票
fri = 1:3 j = 0:6 j = j'
result = j./fri
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

