Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Edit-Error in calculating percentage

조회 수: 1 (최근 30일)
kash
kash 2012년 9월 2일
마감: MATLAB Answer Bot 2021년 8월 20일
In result{1,1}
'' 'c1' 'c2' 'c3'
'Par1' 'P' 'P' 'P'
'Par2' 'SPSO' 'PSO' 'MPSO'
'Par3' 'MPSO' 'PSO' 'PSO'
'Par4' 'MPSO' 'MPSO' 'MPSO'
'Par5' 'PSO' 'PSO' 'PSO'
PAr2,Par3 must be omitted because unique values in c1,c2,c3 are less than 2
'' 'c1' 'c2' 'c3' ''
'Par1' 'P' 'P' 'P' ''
'Par4' 'MPSO' 'MPSO' 'MPSO' 60
Par5' 'PSO' 'PSO' 'PSO' 60
in result{2,1}
'' 'c1' 'c2' 'c3'
'Par2' 'S' 'S' 'S'
'Par3' 'MPSO' 'PSO' 'PSO'
'Par4' 'MPSO' 'MPSO' 'MPSO'
'Par5' 'SOP' 'PSO' 'SPO'
'Par3',must be omitted(only 2 unique values)
'' 'c1' 'c2' 'c3' ''
'Par2' 'S' 'S' 'S' ''
'Par4' 'MPSO' 'MPSO' 'MPSO' 60
'Par5' 'SOP' 'PSO' 'SPO' 60
And secod question is
i want to display as VALUES FOR 60%,80%,100% in results{1,1} to results{4,1} there may exists different percentages
so i want to display for those percentage for example let us consider 60% occurs in results{1,1} and results{4,1} i want to dsplay those values
Percentage=60
D=result4{}
Percentage=80
V=result5{} and samre for 100%,please help
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2012년 9월 2일
this question was posted at http://www.mathworks.com/matlabcentral/answers/47175-calculating-the-percentage-for-unique-values and was accepted, however i made an error, i updated my code, check it at the above link
kash
kash 2012년 9월 3일
Still i get error
[] 'c1' 'c2' 'c3' 'perc'
'Par1' 'P' 'P' 'P' 60
'Par4' 'MPSO' 'MPSO' 'MPSO' 60
'Par5' 'PSO' 'PSO' 'PSO' 60
result{2,1}
[] 'c1' 'c2' 'c3' 'perc'
'Par2' 'S' 'S' 'S' 75
'Par4' 'MPSO' 'MPSO' 'MPSO' 75
'Par5' 'SOP' 'PSO' 'SPO' 75
in both the percentage must be same 60%(3/5*100)but why it differs

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by