"input of argument types 'double'" meaning?

186 ビュー (過去 30 日間)
Evan
Evan 2014 年 2 月 6 日
回答済み: Namto 2022 年 7 月 9 日
Hi,
What exactly does 'double' mean? I have googled this error but people only respond with ways to fix the error, not what it actually means. Or if someone could point me in the right direction for reading, that would be great. I am trying to understand what the MATLAB errors mean so I can troubleshoot them myself in the future.
Thanks.
  2 件のコメント
James Burrow
James Burrow 2016 年 2 月 22 日
Hi, did you ever figure this out? Just now starting to work with MatLab and confused.
Stephen23
Stephen23 2016 年 2 月 22 日
編集済み: Stephen23 2016 年 2 月 22 日
The internet is a great tool. Use any search engine and search for "MATLAB double", and you will get this as the very first result:
At the bottom is a link to this very informative page:
and if that is not enough the internet is full of pages explaining what "double precision floating point numbers" are. Time to do some reading (and learning!).

サインインしてコメントする。

採用された回答

Amit
Amit 2014 年 2 月 6 日
編集済み: Amit 2014 年 2 月 6 日
Double is the type of precision Matlab store numeric values in (unless specified).
You would get this error for the cases like F(x) where function F is not defined and x is a variable.

その他の回答 (4 件)

Jan
Jan 2016 年 2 月 22 日
If you call a function, e.g. F(x) and x has the type double, Matlab searches the current directory, the list of folders in the path, the subfolders called "@double" and the "/private" subfolder to find a corresponding function. Therefore the error message:
Undefined function 'F' for input arguments of type 'double'.
means, that there is no F.m file in the path and no function "F" in the currently processed M-function or script. Usually this is either a typo in the name of the function, or the user forgot to append the parent folder to the path. See:
help addpath
help pathtool

Amin Arabi
Amin Arabi 2017 年 3 月 7 日
Hi there! I have the same problem with a variable(a certain matrix already written). The script is only this: Vg=log(V) V is a matrix (173,42) already defined. the error is: Undefined function 'Log' for input arguments of type 'double'. Looking forward to your help. Thanks a lot!
  1 件のコメント
Stephen23
Stephen23 2017 年 3 月 7 日
MATLAB is case sensitive: you need to use log, not Log (read the error message!)

サインインしてコメントする。


marwan alasali
marwan alasali 2017 年 5 月 25 日
編集済み: Walter Roberson 2017 年 5 月 25 日
hi friends why this program no run i get this massage
Undefined function 'barcycle' for input arguments of type 'double'.
Error in Untitled2sd (line 10) barcycle(data) % Plots the load cycle)
data = [ 0 1 8 ;1 2 6; 2 3 4; 3 4 2; 4 5 6 ;5 6 12; 6 7 16; 7 8 14; 8 9 10; 9 10 4 ;10 11 6; 11 12 8];
P = data(:,3); % Column array of load
Dt = data(:, 2) - data(:,1); % Column array of demand interval
W = P'*Dt; % Total energy, area under the curve
Pavg = W/sum(Dt) % Average load Peak = max(P) % Peak load
LF = Pavg/Peak*100 % Percent load factor
barcycle(data) % Plots the load cycle
xlabel('time, month'), ylabel('P, MW'), grid
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 5 月 25 日
barcycle() is not a Mathworks provided function.
You can find a couple of functions with that name in the File Exchange, such as https://www.mathworks.com/matlabcentral/fileexchange/10150-power-load-cycle-using-gui?focused=5068105&tab=function

サインインしてコメントする。


Namto
Namto 2022 年 7 月 9 日
I faced the same problem but what was the problem for me was that the function files was not appearing at the side folder so i copy it and resave as in same name then the file appear and after running the main code error was not appearing

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by