{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Error - Error in inline expression ==> x^2e^-x^2 Error...

This preview shows page 1. Sign up to view the full content.

>> %This program uses the Composite Trapezoidal Rule to approximate the integral% >> a=0; b=2; h=.25; n=8; %These are the initial values given to approximate the integral % >> sum = 0; >> f = inline ('x^2e^(-x^2)') f = Inline function: f(x) = x^2e^(-x^2) >> for i=0:n, x = a + i*.25; f = f(x); if i==0 | i ==n, sum = sum + .5*f; else sum = sum +f; end; end; ??? Error using ==> inlineeval
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Error in inline expression ==> x^2e^(-x^2) ??? Error: Expected a variable, function, or constant, found "incomplete floating-point number". Error in ==> C:\MATLAB6p5\toolbox\matlab\funfun\@inline\subsref.m On line 25 ==> INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr); >>...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern