How can I implementation Array factor in matlab?
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
採用された回答
Sulaymon Eshkabilov
2019 年 10 月 11 日
Hi,
In your exercise, you can use [for .. end] or [while ... end] loops with two nested iteration loops.
Good luck.
8 件のコメント
ANIKET CHAUHAN
2019 年 10 月 12 日
編集済み: ANIKET CHAUHAN
2019 年 10 月 12 日
This is how i implemented ...any suggestion or correction?
You would need to change a little bit your code formulation:
[M, N] = size(phi); AF(1,1) = 0;
for m=1:M-1
for n = 1:N-1
AF(m+1,n+1) = AF(m,n)+ ..phi(m,n)..;
end
end
Good luck.
ANIKET CHAUHAN
2019 年 10 月 12 日
編集済み: ANIKET CHAUHAN
2019 年 10 月 12 日
Hello..
I implemented as you said, If you think i implementing it in a wrong direction then correct me with right implementation.
By the way thank you for replying and correcting me though
Sulaymon Eshkabilov
2019 年 10 月 13 日
編集済み: Sulaymon Eshkabilov
2019 年 10 月 13 日
Hi,
Based on my quick scan, you have employed [ ]. Use () instead of [ ]. Another point is in one point you have used (m,n) index for phi and in another you have missed the index (m,n).
Good luck.
ANIKET CHAUHAN
2019 年 10 月 13 日
i have updated as you said ..is this look perfect now?
Sulaymon Eshkabilov
2019 年 10 月 13 日
still, the index (m, n) are missing for phi() in two more places. Moreover, your given index for phi in one place (M, N) is not correct. Your nested loop works correctly only if you assign indices corrrectly. Pl., work on your indices carefully.
Good luck.
ANIKET CHAUHAN
2019 年 10 月 13 日
[M,N] = size(phi) and phi(M,N) i have change this as [1,1] = size(phi) and inside the for loop phi(1,1)
but matlab shows an error "An array for multiple LHS assignment cannot contain M_NUMBER."
How can i assign value to [M,N] = size(phi) and phi(M,N) so my code works fine.
ANIKET CHAUHAN
2019 年 10 月 14 日
is this changes are okay ?or i have to change indices again?
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
参考
2019 年 10 月 11 日
2019 年 10 月 14 日
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)

