how can I set double-value array input in a function?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jimaras
am 2 Feb. 2014
Kommentiert: Walter Roberson
am 3 Feb. 2014
Hello,
I want to create a function with inputs 2 arrays (with double values) and one value and i get the following message:
'Undefined function 'HighestPrice' for input arguments of type 'double'.
Any ideas?
Thank you.
0 Kommentare
Akzeptierte Antwort
Wayne King
am 2 Feb. 2014
Bearbeitet: Wayne King
am 2 Feb. 2014
This error message indicates that you have the function HighestPrice.m in a folder that is not on the MATLAB path.
Let's say you have this file in c:\mfiles. You have to add this folder to the MATLAB path.
Either
>>addpath 'c:\mfiles'
or use
>>pathtool
and add the folder.
If you have done it correctly, you can enter
>>which HighestPrice
and MATLAB will return the path to the .m file.
3 Kommentare
Wayne King
am 3 Feb. 2014
Bearbeitet: Wayne King
am 3 Feb. 2014
Then that folder is not on the path, or you do not have the function in the folder. One or both of those is true.
Enter
>>path
and look for that folder. Then go to the folder and make sure you have saved the function where you think you have.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!