필터 지우기
필터 지우기

How to use functions? why it is showing error?

조회 수: 2 (최근 30일)
surabhi sachdeva
surabhi sachdeva 2018년 2월 4일
답변: Jan 2018년 2월 4일
I have a query why is it so I am unable to use a function in this? Please help me rectify my problem. How to use functions? I am trying to use a funcion [mu]
function [mu] = distrmu(distr, dpar)
please suggest
Regards
Surabhi
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 2월 4일
What function are you trying to use on whatever is in that .mat file?
Jan
Jan 2018년 2월 4일
@surabhi sachdeva: You did not explain any details about the problem, but posted the input data only and mentioned, that there is a problem. Currently it is impossible to help you due to the absence of any details. See: Tutorial: How to ask a good question

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

답변 (1개)

Jan
Jan 2018년 2월 4일
distrmu is not a Matlab function. But if you ask an internet search engine, you will find a function with this name in the FileExchange: https://www.mathworks.com/matlabcentral/fileexchange/2492-random-numbers-from-simple-distributions
To use this function, download it at first from the given link. Then save it to a folder on your disk. If this folder is not contained in your Matlab path already, use
addpath(FolderName, '-end')
and if you want to store the modified path permanently
savepath
For both commands you find exhaustive help in the documentation. Alternatively use the GUI
pathtool
Nevertheless, maybe you have another problem. You have posted this line already: "function [mu] = distrmu(distr, dpar)". This might mean, that you do have the function already. Then please mention, what you try to do and which problem you have. Currently we know only, that you "try to use this function", but neither how you do it or what you observe instead of which expected result.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by