how to make table of values in Maple. for example i want table of values for fun
ID: 1888655 • Letter: H
Question
how to make table of values in Maple.for example i want table of values for function
f(x)=x^2 on the interval 0 to 5 with step size of 0.5
the maple should show me
x=0 f(x)=0
x=0.5 f(x)=0.25
x=1 f(x)=1
x=1.5 f(x)=2.25
x=2 f(x)= 4
and so on
how to do this in Maple ?
is there any bulit in function there for this ?
please let me know ,because i need tables in my Numerical analysis course.
Explanation / Answer
% save as augs5.m h=0.5 ; tmax=2; n= tmax/h; x(1) =0; disp(' x f(x) ') disp('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') for i=1:(n+1 ) x(i+1) = x(1)+ i*h; f(i+1) = x(i)*x(i); fprintf('%5.2f%17.7f ', x(i), f(i) ); end >> augs5 x f(x) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0.00 0.0000000 0.50 0.0000000 1.00 0.2500000 1.50 1.0000000 2.00 2.2500000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.