How to calculate mean or variance in a string ?

조회 수: 7 (최근 30일)
Mani
Mani 2014년 8월 26일
편집: Andrew Reibold 2014년 8월 28일
Hi, I have a jumbled text and i wish to straighten it out using machine learning . I wanted to calculate the variance of the jumbled text . Can anyone suggest me a method on how to do it ?
  댓글 수: 2
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2014년 8월 26일
Hi Mani,
I've no idea how to do that.
Do yourself a favor, add this details to your question, because I'm going to remove my answer so other ppl notice your question is left unanswered.
Thanks.
Star Strider
Star Strider 2014년 8월 26일
What do you mean by ‘jumbled text’? Is it a replacement cipher, with one letter replacing another repeatedly ( i.e. a=m, g=b, q=e ) or some such?

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

채택된 답변

Andrew Reibold
Andrew Reibold 2014년 8월 26일
편집: Andrew Reibold 2014년 8월 28일
You can convert to ascii equivalent, then find variance.
jumble_text = 'alskdjbfalksjbdf'
ascii_text = double(jumble_text)
mean_text = mean(ascii_text)
squared_dif = (ascii_text - mean_text).^2
variance = mean(squared_dif)

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by