I had to supply a value for‘a’, assuming it is a scalar.
This works:
t = linspace(0, 4*pi);
a = 1; % Guess The Value Of ‘a’
x = @(t)(4+sin(a*t)).*cos(3*t);
y = @(t) (4+sin(a*t)).*sin(3*t);
z = @(t) cos(3*t);
figure(1)
plot3(x(t), y(t), z(t))
grid on
You need tovectorize your functions to do element-wise operations (replacing‘*’ with‘.*’). See the documentation onArray vs. Matrix Operations for details.
Best Answer