Can I rewrite 'summary' command for categorical variable?

조회 수: 3 (최근 30일)
kiarash Dousti
kiarash Dousti 2016년 3월 28일
댓글: kiarash Dousti 2016년 3월 28일
I need the output of 'summary' command in table format. I tried to rewrite the 'summary' command codes in local copy of it but i have some error that does not let me use it. The error returns to 'subsref.m' function that has to parameters (subsref(a,s)), a is the categorical variable and s is a structure with the fields:
type -- string containing '()' specifying the subscript type.
Only parenthesis subscripting is allowed.
subs -- Cell array or string containing the actual subscripts.
Error reason is that s.type is .(dot) in my local copy named summaryFun!!
How can i fix it?
  댓글 수: 5
Walter Roberson
Walter Roberson 2016년 3월 28일
regexp(), strsplit(), sscanf() -- there are a lot of different ways to parse a char array.
kiarash Dousti
kiarash Dousti 2016년 3월 28일
Tank you dear Walter I used strsplit() and the problem was solved

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by