What is "peaks" in tutorialApp?
5 次查看(过去 30 天)
显示 更早的评论
I am learning Matlab graphical user interface tools. I find that tutorialApp.mlapp seems to be a readily available thing, embedded in Matlab itself. I have successfully run it. Now, looking at the code, I would like to understand it better and play with it some. These lines (16-18) seem to be doing the hard work of building the graph:
value = app.AmplitudeSlider.Value;
plot(app.UIAxes, value*peaks)
app.UIAxes.YLim = [-1000 1000];
Okay, so it would appear that the data must be contained in this object called peaks. But I can't find that object defined anywhere. Where is it, and what is its type? Or if I'm wrong, where is the data, really?
1 个评论
Dyuman Joshi
2023-12-24
"Where is it, and what is its type? Or if I'm wrong, where is the data, really?"
As Voss has mentioned, it is a built-in function, i.e. it comes with MATLAB.
You can use the MATLAB Documentation to search for such functions, either online or on your MATLAB app using help like this -
help peaks
回答(2 个)
Image Analyst
2023-12-24
peaks a built-in function that you can actually open up and look at in the editor. Do this at the command line:
>> edit peaks.m
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!