function handle for random function

조회 수: 1 (최근 30일)
Rightia Rollmann
Rightia Rollmann 2018년 8월 18일
댓글: Rik 2018년 8월 18일
If I want to know the integral of the function log(x) from 0 to 1, I do the following:
fun = @(x)log(x);
q1 = integral(fun,0,1)
but, how can I calculate the integral of the function randn() for x between 0 and 100?
  댓글 수: 1
Rik
Rik 2018년 8월 18일
You have to separate the two notions of what a function is: you can use integral for a mathematical function, but randn is a Matlab function.
So you need to explain what would you even mean by taking the integral of the randn function.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by