フィルターのクリア

Find the area with equtions

1 回表示 (過去 30 日間)
Arthur II
Arthur II 2017 年 12 月 9 日
編集済み: Arthur II 2017 年 12 月 10 日
It's my way to find area, but there's an error ' Undefined function or variable 'x'. what's your idea?
x0 = pi / 2 - 1 ;
x1 = 0.8317 ;
x2 = pi / 2 ;
y = int ((sqrt (1 - ( x - x2 )^2)) , x0 , x1);
z = int (cos(x), x1 , x2 );
A = z + y ;

採用された回答

Walter Roberson
Walter Roberson 2017 年 12 月 9 日
You can use the symbolic toolbox to attempt a closed-form integration if you command
syms x
However, you are probably expected to use numeric integration, which uses integral() of a function handle, not int() with a formula.
Also, for numeric work you need to use .^ instead of ^
y = integral( @(x) (sqrt (1 - ( x - x2 ).^2)) , x0 , x1);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by