필터 지우기
필터 지우기

Removing cell arrays from code

조회 수: 1 (최근 30일)
Jess
Jess 2013년 3월 28일
Hi all,
I've been trying to convert some code to be Matlab Coder compliant, therefore having to remove cell arrays.
I've got this line of code:
myvalues = unique({input_variable.(thefield)});
disp(size(myvalues));
disp(myvalues);
The output this code gives me is:
1 1
'mystring1'
1 1
'mystring2'
Just trying to find a solution on how to remove the cell arrays ( {} ) from the code, so it would work with Matlab Coder. Been trying out structures, and arrays of structures, however with no great luck. So any tips and suggestions would be appreciated! Thanks.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 3월 28일
So to confirm, each input_variable.(thefield) is a string ?
Jess
Jess 2013년 3월 28일
Yes, it is!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by