convert arraycell in array string

조회 수: 2 (최근 30일)
aldo
aldo 2023년 7월 11일
편집: aldo 2023년 7월 12일
>> class(risulRankingResult)
ans =
'cell'
it's possibile to convert in string?
  댓글 수: 1
James Tursa
James Tursa 2023년 7월 11일
What would be your desired output?

댓글을 달려면 로그인하십시오.

채택된 답변

Stephen23
Stephen23 2023년 7월 11일
"it's possibile to convert in string?"
Probably. I am guessing that you want something like this:
C = {1;[2,34];[56,7,89]}
C = 3×1 cell array
{[ 1]} {[ 2 34]} {[56 7 89]}
F = @(v)join(string(v),',');
S = cellfun(F,C)
S = 3×1 string array
"1" "2,34" "56,7,89"
  댓글 수: 6
Stephen23
Stephen23 2023년 7월 12일
"i want to use Sis.Rank_DisplayIdxSis (in a structure) now i must to convert it in arraycell..."
I presume by "arraycell" you actually mean a cell array.
It is unclear to me what you want to convert and what the problem is.
aldo
aldo 2023년 7월 12일
편집: aldo 2023년 7월 12일
I presume by "arraycell" you actually mean a cell array. ==> yes
n Rank_DisplayIdxsis i use it for 2 solution:
1) display in a table in app designer and with your first statement i saved with comma in strings
2) now i want to use them as array of numbers (matrix) so I have to get from Rank_DisplayIdxsis an array of numbers

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by