フィルターのクリア

having trouble with the drag on my rocket projectile

4 ビュー (過去 30 日間)
Fiona Xie
Fiona Xie 2017 年 9 月 5 日
編集済み: Fiona Xie 2017 年 9 月 14 日
Write a double “for”-loop which cycles over 5 values of alpha from [0.7, 1.3] and 5 values of beta from [0.7 and 1.3], running the simulation 25 times (by calling sim)
? Each pass through the loop should plot the control signal uRocket , and the resultant output yRocket . Use subplot so that the control signal uRocket is in one axes, and the output yRocket is in a separate axes. ? As before, use hold on in the loop (and hold off afterwards) so that all 25 plots are in each figure window. This brute-force simulating over sweeps-of-values for uncertain parameters often called a “Monte Carlo” simulation.
my template: AlphaVals = linspace(0.7,1.3,5); BetaVals = linspace(0.7,1.3,5); % for ... for i=1:3 for j=1:3 ?? % for ... % Define parameters % sim(....) % end % end subplot(2,1,1); hold off subplot(2,1,2); hold off
  1 件のコメント
Rena Berman
Rena Berman 2017 年 9 月 14 日
(Answers Dev) Restored edit

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

回答 (1 件)

Anh Tran
Anh Tran 2017 年 9 月 8 日
Hi Fiona,
You should not expect the MATLAB Answers community to give you an answer to your homework assignment.
You may want to consider using set_param function, which sets the parameter to a specified value on the block you want before running "sim()".
Also, in your template, each for-loop should iterate 5 times instead of 3.
Good luck!

カテゴリ

Help Center および File ExchangeSignal Import and Export についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by