function PLAYNOTE(app,frequency) FreqString=num2str(frequency); app.Label.Text=FreqString; %https://www.mathworks.com/help/signal/ug/edit-time-information-in-the-signal-analyzer-app.html
%below details can be obtained from the above mentioned websites./
SampleRate = app.samplerate; TimeValue = app.timevalue; TimeSamples = 0:SampleRate:TimeValue; FORSINE=app.SINE.Value; FORSQUARE=app.SQUARE.Value; FORSAWTOOTH=app.SAWTOOTH.Value; if FORSINE == 1 soundVector = sin(2*pi*frequency*TimeSamples); elseif FORSQUARE == 1 soundVector = square(2*pi*frequency*TimeSamples); elseif FORSAWTOOTH == 1 soundVector = sawtooth(2*pi*frequency*TimeSamples); end sound(soundVector, 1/SampleRate) CheckRecord=app.RECORD.Value; if CheckRecord == 1 SOUNDCOMPOSE=app.Soundvector; if SOUNDCOMPOSE == 0 SOUNDCOMPOSE=soundVector; else SOUNDCOMPOSE=cat(2,SOUNDCOMPOSE,soundVector); end app.Soundvector=SOUNDCOMPOSE; end end methods (Access = private)%showing error at this line....Illegal use of reserved keyword"methods"
MATLAB: Illegal use of reserved keyword
app designermatlab gui
Related Question
- App Designer How to “StartUp” within the App
- Plotting in App designer
- Sampling Audio at 11025 sample/sec in MATLAB
- How can the app inherit from the classes
- Using a trained neural network in app designer for image classification
- How to properly call a public function within an App Designer generated class
Best Answer