フィルターのクリア

Multiplying unequal length vectors

2 ビュー (過去 30 日間)
Kim
Kim 2013 年 11 月 13 日
編集済み: Sean de Wolski 2013 年 11 月 13 日
I'm continuing in my Mathcad to Matlab translation of good radar equations. Now I need to work the following equation: e2(theta) = E2 * f(theta)*exp(i*phi);
The problem is f(theta) is 351 elements long and 'i' and 'phi' are only 5 elements long each.
In fortran, I'd try up sampling i and phi through interpolation, but was wondering if there is a better Matlab solution.
  1 件のコメント
Matt J
Matt J 2013 年 11 月 13 日
So phi is a function of theta? If it is a known function of theta (even an implicit one), you could use that function to generate more phi samples.

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

回答 (2 件)

Sean de Wolski
Sean de Wolski 2013 年 11 月 13 日
編集済み: Sean de Wolski 2013 年 11 月 13 日
Well what do you want to do? Do you want to multiply f(theta) by every element of phi?
If so:
exp(ii.*phi)'*(1:351)
Will give you a 5x351 matrix that has this. Otherwise, please be more clear in your goal. If you want to make exp(ii.*phi) to be the same size as a 1x351, this will inevitably involve interpolation.
More per clarification
Use interp1 to interpolate between the values you need.
doc interp1 %for more info

Kim
Kim 2013 年 11 月 13 日
Sorry bout the poor question.
Yes, I want exp(i.*phi) to be 1X351, so that I can do: e2(theta) = E2 * f(theta).*exp(i.*phi);
  1 件のコメント
Sean de Wolski
Sean de Wolski 2013 年 11 月 13 日
Use interp1.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by