Displaying values for more than 2 counts
이전 댓글 표시
I have values as
R =
{6x4 cell}
{5x4 cell}
{4x4 cell}
{3x4 cell}
in which R{1,1} (has taken from variable editor)
'' 'c1' 'c2' 'c3'
'Par1' 'M' 'P' 'M'
'Par2' 'SPSO' 'PSO' 'MPSO'
'Par3' 'MPSO' 'PSO' 'PSO'
'Par4' 'MPSO' 'MPSO' 'MPSO'
'Par5' 'SPSO' 'PSO' 'PSO'
R{2,1} and so on
'' 'c1' 'c2' 'c3'
'Par2' 'S' 'S' 'P'
'Par3' 'MPSO' 'PSO' 'PSO'
'Par4' 'MPSO' 'MPSO' 'MPSO'
'Par5' 'SPSO' 'PSO' 'PSO'
Taking first value in c1(in R{1,1} the first value is 'M' if 'M' is >=2 ) i want to display as
result{1,1}
'' c1' 'c3'
'Par1' 'M' 'M'
'Par2' 'SPSO' 'MPSO'
'Par3' 'MPSO' 'PSO'
'Par4' 'MPSO' 'MPSO'
'Par5' 'SPSO' 'PSO'
In R{2,1} the first value is S(two 'S' are there)so
result{2,1}
'' c1' 'c2'
'Par2' 'S' 'S'
'Par3' 'MPSO' 'PSO'
'Par4' 'MPSO' 'MPSO'
'Par5' 'SPSO' 'PSO'
and so on please help
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!