Question: i am getting this error and i dont know how to resolve this. thanks! Lab_2.m + function sum = geomsumi(r,a,n) Sum=; for x=0:1:n; sum sum+a*rx;
i am getting this error and i dont know how to resolve this. thanks!Lab_2.m + function sum = geomsumi(r,a,n) Sum=; for x=0:1:n; sum sum+a*rx; end end geometric series equation geomsum1.1/9.4.11): 46 - % b) e functions - geomsumir,a,n) geomsum2=sum(a*r.(n-1)) end geomsum2.1/9.4.11): 47 - Command Window Function definitions in a script must appear at the end of the file. Move all statements after the "geonsuml" function definition to before the first local function definition. >> Lab_2 Error: File: Lab_2.m Line: 42 Column: 1 Function definitions in a script must appear at the end of the file. Move all statements after the "geomsuml" function definition to before the first local function definition. script Ln 48 Col 20 PHY 132
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
