MATLAB: Plotting a function with input and output butterflyinputoutput here is my code. hw prompt below. what do you recommend i do? t=0:0.01*pi:20*pi; function [x,y]=bird(t) x(t)=sin(t)*(e.^cos(t) -2*cos(4*t)-sin.^5(t/12)) y(t)=cos(t)*(e.^cos(t) -2*cos(4*t)-sin.^5(t/12)) plot(x,y) Best Answer You need to change * to .* and change e to exp(), and you need to move the 5 exponent:t=0:0.01*pi:20*pi; % Create t[x, y] = bird(t); % Call the function.function [x,y] = bird(t)x = sin(t) .* (exp(cos(t)) - 2*cos(4*t)-sin(t/12).^5)y = cos(t) .* (exp(cos(t)) - 2*cos(4*t)-sin(t/12).^5)plot(x,y)end Related SolutionsMATLAB: Problem creating an equation f = exp(cos(t)) - 2*cos(4*t) - sin(t/12).^5;The change to exp() without the ^ is necessary. The change to .^5 instead of ^5 is not necessary if t is a scalar but it is necessary if t is not a scalar. MATLAB: How to plot a periodic signal f(t)= t.^3 , -pi<=t x = linspace(-2*pi,2*pi,1000);y = (mod(x+pi,2*pi)-pi).^3;plot(x,y) Related QuestionHow to solve a non-linear equation system as function handle with fsolve
Best Answer