Como se evalúa y grafica una función en App Designer
3 次查看(过去 30 天)
显示 更早的评论
Tengo mi codigo asi
Quiero evaluar esta funcion "sign(cos(2*pi*x))"
funcion =@(x) eval(app.FxEditField.Value);
f = funcion;
maxn = app.HarmonicsSpinner.Value;
xmin = str2double(app.StartEditField.Value);
xmax = str2double(app.EndEditField.Value);
x = linspace(xmin, xmax, 100);
y = polyval(f,x);
plot(app.UIAxes,x,y);
app.UIAxes.XLim = [xmin, xmax];
0 个评论
回答(1 个)
Asvin Kumar
2021-3-19
y = f(x);
This should work.
Esto debería funcionar (Spanish from Google Translate)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!