필터 지우기
필터 지우기

how i recognize Type Definition a function like f ?

조회 수: 2 (최근 30일)
xosro
xosro 2015년 7월 2일
댓글: John D'Errico 2015년 7월 5일
i have code that input of this code is defined function whit syms order, i want code recognizes type Definition f. in fact is f handle function or syms function or inline function?

채택된 답변

John D'Errico
John D'Errico 2015년 7월 2일
f = inline('x');
w= whos('f')
w =
name: 'f'
size: [1 1]
bytes: 1130
class: 'inline'
global: 0
sparse: 0
complex: 0
nesting: [1x1 struct]
persistent: 0
f = @(x) x.^2;
w= whos('f')
w =
name: 'f'
size: [1 1]
bytes: 32
class: 'function_handle'
global: 0
sparse: 0
complex: 0
nesting: [1x1 struct]
persistent: 0
Look at w.class from the output of whos.
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 7월 2일
Or just look at class(f)
John D'Errico
John D'Errico 2015년 7월 5일
Of course. LOL

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by