Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple values inside a matrix element matlab?

Tags:

matlab

I want to define a matrix in MATLAB such that each element in matrix has 3 elements ,like if i have a matrix m=[a b;c d] a 2x2 matrix such that the element a has values (k,l) like wise b has value (j,m) and so on .

like image 242
Boris Avatar asked Mar 07 '26 03:03

Boris


1 Answers

You can introduce 3-dimensonal matrix. If your matrix size is NxM and each element of this matrix contains k elements, you define matrix B of the size NxMxK. By calling B(2,3,:) you will access all the elements of the entry (2,3).

Alternatively, you can define a cell matrix, so that every entry is cell array.

If you want each element of your matrix to be consisted of only two real elements, you can define complex-valued matrix.

like image 200
Mikhail Genkin Avatar answered Mar 09 '26 12:03

Mikhail Genkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!