I have this function
function comas_a_puntos (filepath)
datos=readtable(filepath);
and in the command window I write
comas_a_puntos ("/Users/cristinaserrrano/Documents/TFM/Ensayos ruido/18173_L2_corregirarchivosruido.xlsx")
but after that in the command window appears an error
Not enough input arguments.
Error in comas_a_puntos (line 2)
datos=readtable(filepath);
I don't know where or what the error is

 採用された回答

Stephen23
Stephen23 2018 年 6 月 27 日
編集済み: Stephen23 2018 年 6 月 27 日

1 投票

comas_a_puntos ("/Users/cristinaserrrano...")
^ get rid of this space character!
Why the space makes a difference:
And in the function definition too:
function comas_a_puntos (filepath)
^ get rid of this!
Standard practice in MATLAB does not have space characters between function names and the parentheses.

3 件のコメント

Cristina Serrano
Cristina Serrano 2018 年 6 月 27 日
I have tried it
comas_a_puntos("/Users/cristinaserrrano/Documents/TFM/Ensayos ruido/18173_L2_corregirarchivosruido.xlsx")
But the error is the same
Not enough input arguments.
Error in comas_a_puntos (line 2)
datos=readtable(filepath);
Stephen23
Stephen23 2018 年 6 月 27 日
編集済み: Stephen23 2018 年 6 月 27 日
@Cristina Serrano: how many copies of this function do you have? Please show the output of this command:
which comas_a_puntos -all
Please upload the complete function file by clicking the paperclip button.
Cristina Serrano
Cristina Serrano 2018 年 6 月 27 日
Thank you for your quick answers. Finally I get it with out errors!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by