Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm debugging code that our teacher gave us and I'm basically stuck at line 13 where it tells me that the index exceeds matrix dimensions

I'm debugging code that our teacher gave us and I'm basically stuck at line 13 where it tells me that the index exceeds matrix dimensions (see pictures below) It's either j or i but I have no idea what to change and I know this sounds like a dumb question but any help would be appreciated! Thank you!

(This is MATLAB by the way).

image text in transcribed

image text in transcribed

2 clear; clc 3 n 2 5 501 5 nn-720 6 angle linspace (-2 pi, 2 *pi, nn) 8 L for j 1:720 z n (j) for i F1:nn-1 10 for k 1 z ns 2 +1 12 S (j, i) S (j, i) (1) k* (angle (i) (ns) factorial (ns) 14 end end 16 end 17 18 19 yl sin (angle) 20 3 0; 21 22 clf grid On 23 hold. on 24 plot (angle yl, 'b', angle, S (1 g', angle, y3 k', 'LineWidth' 2 25 plot (angle, S (2 m', agle, S (3, --y', "Line Width' ,2 26 hold. off 27 axis (C-2 pi 2 pi -1.5 1 5]) 28 xlabel ('Angle (rad) 29 ylabel ('sin (x) 30 title ('Taylor Series Approximation of Sine

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

Define safety and health.

Answered: 1 week ago

Question

Question What is the advantage of a voluntary DBO plan?

Answered: 1 week ago

Question

Question How is life insurance used in a DBO plan?

Answered: 1 week ago