calculation with different cell arrays
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
AA
am 15 Nov. 2014
Beantwortet: Star Strider
am 15 Nov. 2014
Hi guys, assume the following: Cell array mx (100x61), Cell array mn (100x61), Cell array a (100x61).
These cell arrays consists of multiple matrix tables. Matrix table a has 7 columns and matrix table mx/mn have one column. I want to carry out the following calculation between the corresponding matrix tables in the cell array: (a{column7row n}-mn{n})/(mx{n}-mn{n}). n=n+1 which increases after each row.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 15 Nov. 2014
This is how I would do it:
a = {randi(50,15,9)};
mx = {max(a{:},[],2)};
mn = {min(a{:},[],2)};
q = (a{1}(:,7)-mn{:})./(mx{:}-mn{:});
Obviously ‘a’ in your code is going to be different(I wanted my ‘a’ to be easily visible), but the rest of my code should work without modification.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!