Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am trying to plot this function in MATLAB and this error keeps coming up. What should I change in my code to get the
I am trying to plot this function in MATLAB and this error keeps coming up. What should I change in my code to get the function to plot?
2 - CmacQ5. mx + i function C = Cmacos(x) * Creating a function Cmacos n = 50; 4 Creating and initializing variable n 3- C = 0.0; % Creating and initializng variable C 4 - for j = 1:n Creating "for" loop to calculate the Maclaurin series 5- C = C + (-1)^(-1) + x^(2*(1-1)) / factorial(2*(1-1)); % Equation for Mclauri 6- end Ending the "for" loop 7 - end & Ending the loop HW1Q5. mx +. clc;clear;close all; CmacQ5(pi/6) CmacQ5(pi/2) CmacQ5 (5*pi/6) y = [-pi:0.01.pil; z=Cmaco5ly); plot(y,z) Command Window -0.8660 Error using * (line 51) Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.'. Error in Cmac05 (Line 5) C = C + (-1)^(1-1) * X^{2*(1-11) / factorial12 (1-1)]; Equation for Mclaurin series Error in HW105 (line 6) z=Cmacos(y)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started