フィルターのクリア

how to declare

1 回表示 (過去 30 日間)
Pugazhendhi
Pugazhendhi 2012 年 2 月 10 日
編集済み: Matthew Crema 2013 年 10 月 8 日
Hi All,
I would like to declare the following code in Matlab.
r = 4/pi atan((R-G)/(R+G))
Any one please help.
Thanks,
Pugazh

採用された回答

William
William 2012 年 2 月 10 日
Do you have the symbolic toolbox? If yes than
syms R G
r = 4/pi * atan((R-G)/(R+G));
else you're more than likely going to hve to define R and G in terms of domains. For example
R = 0:0.01:1;
G = 0:0.1:10; %Make sure the matrix dimensions agree.
r = 4/pi * atan((R-G)/(R+G));
Matrix manipulation is what matlab was designed to do at its basic level. the symbolic stuff is an add on that works pretty well.
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 2 月 10 日
Probably you meant
r = 4/pi * atan((R-G) ./ (R+G));
Pugazhendhi
Pugazhendhi 2012 年 2 月 11 日
Thanks, its working.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by