Matlab says to many Inputs calling a fucntion in app designer, even if the input is just one value.
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
please help me, Im writing an app for my schoolarship.
I want to do a fuzz and a overdrive. I created a switch, which picks the right fucntion and with an aplly button, matlab should run the function and read it in as an audio, with audiorecorder.
The funtion are working fine, if im not in app designer.
![Bildschirmfoto 2019-04-03 um 07.59.01.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/211776/Bildschirmfoto%202019-04-03%20um%2007.59.01.png)
採用された回答
TADA
2019 年 4 月 3 日
編集済み: TADA
2019 年 4 月 3 日
The first argument in a method (that's what functions are called in object oriented programming) of an object is the object instace (i.e self in Java or this in .Net)
Writing
app.fuzz(x)
Invokes the fuzz function the same as this line would:
fuzz(app, x)
So you actually need to have two arguments in that method, where the first one is app
Java and .Net sugar-coat it and hide the passing of instance arguments behind the scenes but Matlab doesn't. It takes some getting used to, but it makes sense
3 件のコメント
TADA
2019 年 4 月 3 日
Whats the exact error you get?
copy all the red text (including the stack trace) from your command window and post here please
その他の回答 (1 件)
Darko Kulic
2019 年 4 月 3 日
4 件のコメント
TADA
2019 年 4 月 3 日
An instance is a unit of some class.
When you careated the audiorecorder you got an instance of that class.
I think your best option is to save it as a property of your app
参考
カテゴリ
Help Center および File Exchange で Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!