Error in using Integration, How to fix it ?
이전 댓글 표시
I am trying to plot a function with integration in it, and it always gives me an error in using the integral, I tried using function handle for the first argument (according to the error) , but the error remaind.
t = 0:0.02:20;
y = 0:1000;
x = @(t,y) (y/((4*t*0.02/1000)^0.5));
fun = @(x)(exp(-x.^2));
erf = (2/pi^(0.5)) *integral(fun,0,x); % the error is in this line
erfc= 1 - erf;
VProfile= 10*erfc;
plot(t,VProfile)
title('Velocity Profile')
xlabel('time (sec)')
ylabel('Velocity (cm/sec)')
so what did I do wrong? and how can I fix it ? and if the code has another error I didnt notice, please point it out.
thank you.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Bartlett에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!