Borrar filtros
Borrar filtros

How to use functions? why it is showing error?

2 visualizaciones (últimos 30 días)
surabhi sachdeva
surabhi sachdeva el 4 de Feb. de 2018
Respondida: Jan el 4 de Feb. de 2018
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 comentarios
Walter Roberson
Walter Roberson el 4 de Feb. de 2018
What function are you trying to use on whatever is in that .mat file?
Jan
Jan el 4 de Feb. de 2018
@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

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 4 de Feb. de 2018
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.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by