Given: screen(1).position = [1 2; 3 4]; screen(1).size = [5 6; 7 8]; screen(2).position = [11 12; 13 14]; screen(2).size = [15 16; 17 18]; I can execute: screen(1).position(:,2) and screen(1:2).position but not screen(1:2).position(:,2), for example to make a simultaneous assignment to the 2nd columns of the position matrices i.e. intuitively I would like to say: screen(1:2).position(:,2) = [19 20; 21 22]; What is the easiest way to accomplish the assignment?
MATLAB: Multi-level indexing
indexing
Related Question
- How to do the following in a simpler and smarter way
- Appdesigner button group problem
- How to know which radio button is selected in a radio button group in app designer of Matlab 2018a
- Remove all NaN values from an array.
- New column in matrix based on condition from other matrix
- How to add a +1 to some of the numbers in a matrix
Best Answer