Select first three elements of double inside cell array
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Samar Adhikari
am 25 Mär. 2025
Kommentiert: Samar Adhikari
am 25 Mär. 2025
Given Cell array:
3x1 cell array
{[56 54 36 35]}
{[58 56 55 36]}
{[89 60 56 45]}
Output :
3x1 cell array
{[56 54 36]}
{[58 56 55]}
{[89 60 56]}
0 Kommentare
Akzeptierte Antwort
Stephen23
am 25 Mär. 2025
C = {[56,54,36,35];[58,56,55,36];[89,60,56,45]}
D = cellfun(@(v)v(1:3),C,'uni',0)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!