Hello, I didn't get the following code:
Show older comments
M = reshape(linspace(11,18,8),[2,2,2])
M([1,2],[2,1],[2,1])
A1 = [2,2;2,1]; v = [2,1];
M(A1,v,1)
*****************************
ans =
14 12
14 12
14 12
13 11
i didnt get this ans, more precisely, im confused that what A1=[2,2;2,1] in M(A1,v,1) do???
************************************************************************
1 Comment
KSSV
on 30 Oct 2018
It is indexing the matrix..read about MATLAB indexing.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!