How to use a function I created inside integral function (int)?

I have created a function for calculating certain values according to my input. I need to use both the calculated value and the input in a definite integral. How can i do so? I tried the following:-
int(((6-y)*([~,~,~,T,~,~]=FlowArea_Jun29_01(y,CSAll{1,1},mindepth(1),SZ(1)))),y,0,6);
to which i got the error:-
Error: The expression to the left of the equals sign is not a valid target for an assignment.

4 件のコメント

KSSV
KSSV 2017 年 7 月 6 日
First you take the outputs from the function FlowArea_Jun29_01 into some variables and then you input these into the function.
Stephen23
Stephen23 2017 年 7 月 6 日
int(((6-y)*([~,~,~,T,~,~]=...
is not MATLAB syntax. You can learn MATLAB syntax by doing the introductory tutorials, which are highly recommended for all beginners:
Anav Vora
Anav Vora 2017 年 7 月 6 日
@KSSV but the output of this function changes for different values of y as this is an integration. Its not possible to save in a variable outside as far as i know.
KSSV
KSSV 2017 年 7 月 6 日
That's where loops and arrays come into picture.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

質問済み:

2017 年 7 月 6 日

コメント済み:

2017 年 7 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by