All of those variables are scalars so x will be a scalar
y = f1 * cos(2*pi*f2+f3);
Likewise for y, it will be a scalar
plot(handles.axes1,x,[0,f4]);
Your independent variable x is a scalar. Your dependent variable [0,f4] is a vector. At most you would end up with a number of line segments drawn at a constant x and different y values.
[0,f4] as the dependent parameter does not tell plot() to evaluate a formula over the given rangeb that kind of functionality would be fplot() not plot(). But your independent variable x is not a formula, it is a numeric scalar.
You should be evaluating sin() at an expression that includes the vector f4, and your plot should be using f4 as the independent variable and the result of sin as the dependent variable.
You should be using f6 to decide whether to use sin or cos, not to plot both.
Best Answer