Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So I\'m given variables and I am being asked to code Bohlin approximation and th

ID: 3890585 • Letter: S

Question

So I'm given variables and I am being asked to code Bohlin approximation and then I am provided R, but I do not know why it keeps giving me an error and I am not sure why it is giving me an error

(the equal sign is not an error; it's just asking me to put a semi-colon at the end, but I want C to be outputted.

Editor - C:UserslzkurdoDocuments MATLAB Untitled.m Untitled.m 1clear:clc 2 3a22.08877 4- a3=0.94813; a1 = 2.10444; 6- 7- 8- a4 = 1 . 372 ; a5= 3.87; a6= 4.19; R=0.2500; Command Window Subscript indices must either be real positive integers or logicals. Error in Untitled (line 9 x 7

Explanation / Answer

a1 = 2.10444;
a2 = 2.08877;
a3 = 0.94813;
a4 = 1.372;
a5 = 3.87;
a6 = 4.19;
R = 0.2500;

C = (1.0 - a1*(R) + a2*(R^3) - a3*(R^5) - a4*(R^6) + a5*(R^8) - a6*(R^10) ) ^ -1

% output

% C = 1.9789

% a1 multiplied by R should be written as a1*(R)
% a1(R) means a1 is an array and you are trying to access R index in a1. Since a1 is not an array its throwing an error.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote