What is "peaks" in tutorialApp?
6 views (last 30 days)
Show older comments
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 Comment
Dyuman Joshi
on 24 Dec 2023
"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
Answers (2)
Image Analyst
on 24 Dec 2023
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 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!