MATLAB Answers

0

Triple integral (NO with @func)

Diego Soler Polo さんによって質問されました 2019 年 10 月 10 日
最新アクティビティ Steven Lord
さんによって 回答されました 2019 年 10 月 10 日
I have a numerical function, F, depending on three variables, x,y,z, and I need to integrate it. The problem is that F does not have an explicit expression in terms of elementary functions, but rather, given (x,y,z), F(x,y,z) is calculated in a subroutine. How do I integrate numerically such a function?
Function handles don't work in this case, since I don't have a closed analytical expression for F.

  0 件のコメント

サインイン to comment.

1 件の回答

Steven Lord
回答者: Steven Lord
2019 年 10 月 10 日

integral3 doesn't care whether or not you can write your integrand in a particular way. All it cares about is that it can call the function whose handle you pass in as the first input argument with three inputs that are the same size and returns an output of that same size containing values of your integrand for the corresponding elements of the inputs. It sounds like you already have such a function: "but rather, given (x,y,z), F(x,y,z) is calculated in a subroutine."
You could theoretically have your integrand function display "Perform an experiment with these parameters: ..." and ask the user to input the integrand value measured in those experiments. Most of the time the integral* functions will ask you to evaluate the function for too many parameter values for that to be feasible, but it is possible.

  0 件のコメント

サインイン to comment.



Translated by