Select first three elements of double inside cell array
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Samar Adhikari
il 25 Mar 2025
Commentato: Samar Adhikari
il 25 Mar 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 Commenti
Risposta accettata
Stephen23
il 25 Mar 2025
C = {[56,54,36,35];[58,56,55,36];[89,60,56,45]}
D = cellfun(@(v)v(1:3),C,'uni',0)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Types in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!