フィルターのクリア

Dimensions do not agree??

2 ビュー (過去 30 日間)
Kevin
Kevin 2014 年 7 月 9 日
回答済み: Mads 2014 年 7 月 9 日
Hi,
I have the following equation in Matlab:
F=(2/3.14)*ACos(exp(-(((B/2)*(1-(X)))/((X)*sin(Phi)))));
where
X =
0.1111
0.2222
0.3333
0.4444
0.5556
0.6667
0.7778
0.8889
1.0000
and
Phi =
0.7684
0.5628
0.4290
0.3416
0.2819
0.2392
0.2073
0.1828
0.1633
but when I run the code I am promted to say that my matrix inner dimensions must agree to solve this equation. Can anybody please help me with this?
Thanks, Kevin

回答 (1 件)

Mads
Mads 2014 年 7 月 9 日
Anywhere you have a "*" or "/", replace that with ".*" and "./".
I assume you are doing the calculation of F for each pair of X and Phi. Only when you do vector and matrix products use the "*" or "/". Otherwise always ".*" and "./".

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by