Activating help for sub function

조회 수: 1 (최근 30일)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2016년 8월 25일
댓글: Gopalakrishnan venkatesan 2016년 8월 25일
I have a function named mystats which calls two functions mymean and mymedian. All these three function are saved in the single mfile named mystats.m. Now my problem is when press f1 by selecting mystats i can see the documentation written there. But when i select the subfunction called mymean and press f1 i could not see the documenation written and i am getting the error as ''NO help found for mymean''. How can i solve this issue?
function [avg, med] = mystats(x)
% Description - xxxxxxxxxxxxxxx
% Input parameter - xxxxxxxxx
n = length(x);
avg = mymean(x,n);
med = mymedian(x,n);
end
function a = mymean(v,n)
% Description - YYYYYYYYY
a = sum(v)/n;
end
function m = mymedian(v,n)
% Description - zzzzzzzzz.
w = sort(v);
if rem(n,2) == 1
m = w((n + 1)/2);
else
m = (w(n/2) + w(n/2 + 1))/2;
end
end

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 25일
편집: Azzi Abdelmalek 2016년 8월 25일
mymean is not saved as a file, If you want to see the documentation inside mymean, you have to save it in a file mymean.m, or put all the help in the main function
  댓글 수: 1
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2016년 8월 25일
Apart from saving it in seperate file is no other way to handle this issue ?

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by