Appdesigner, knob value
Mostra commenti meno recenti
Hello,
I have an oscilloscope-App in which I want to use 2 knobs , if I switch the knob a value to a variable should be assigned. And this value should be used in a function if a button is then pressed.
That works with one knob but not with the other. I have absolutely no idea why that is.
Does anyone have a clue?
from the appdesigner code:
function EdgeKnobValueChanged(app, event)
value = app.EdgeKnob.Value;
if strcmp(value,'rising')
app.Edge=2;
end
if strcmp(value,'falling')
app.Edge=1;
end
end
% Value changed function: CouplingKnob
function CouplingKnobValueChanged(app, event)
value = app.CouplingKnob.Value;
if strcmp(value,'AC')
app.AC=1;
app.DC=0;
end
if strcmp(value,'DC')
app.DC=1;
app.AC=0;
end
end
function StartButtonPushed(app, event)
if strcmp(app.Trigger,'Simple edge')
somefunction(app.Edge); %the value for app.Edge cant be used in the function
end
end
I would be really grateful for any kind of help.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!