I am having trouble getting this script to run on Matlab. This script is straigh
ID: 3703972 • Letter: I
Question
I am having trouble getting this script to run on Matlab. This script is straight from my textbook. I was curious if anyone could use this script to find the answer to the question on the lefthand side of the screen.
D 4. MATLAB R2017b-academic use H. A. Search Documentation Log In CSecure https./ Find Files Run Section Compano Program20.26 ) Help Save &Exit; Submit New Open Sav Breakpoints Run Run andAdvanceRun and Find " Advarce Time 3 ÷ a ? l C. Users ahmcc OneDrive Documents MATLAB Editor-CUsers Romberg,m ×| trap.m ×1 + Required information function ,ea,iter]- Romberg (func, a,b,es, maxit,varargin) Part 3 of 3 Consider the Romberg Integration algorithm 3-1 if narginExplanation / Answer
It is not a script file. It is a function file. You need to run it in the command window by passing it arguments
To get answer, type the next command in command window
I=Romberg(@(x)(x+1./x).^2,1,2,.005)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.