Borrar filtros
Borrar filtros

forループのモデル化について

5 visualizaciones (últimos 30 días)
Hideo Suzuki
Hideo Suzuki el 17 de Mayo de 2018
Respondida: Atsushi Matsumoto el 22 de Mayo de 2018
c言語等のforループをSimulinkモデルで実装するにあたって、
"For Each Subsystem"を用いて実装は可能でしょうか?
背景:MATLAB FunctionがHDL Coder非対応のため、 中身の処理をモデルで実装しようとしていますが、
"For Iterator"ブロックも非対応であったため、上記で代用できないか質問。

Respuestas (1)

Atsushi Matsumoto
Atsushi Matsumoto el 22 de Mayo de 2018
ForループをSimulinkモデルで実装する方法はいくつか考えられます。&nbsp
ただし、ループの依存性がない場合(前の計算結果に依存せず並列化出来る場合)に限りますが。 &nbsp
  1. For Eachサブシステムを使う
  2. MATLAB Functionブロックを使い、For文を記述する&nbsp
2. に関しては、ドキュメント付属のデザインパターン
>> hdlcoder_eml_design_patterns
のSortersが参考になると思います。 &nbsp
&nbsp
ループの依存性がある場合はややこしく、前の処理結果を次の回路で計算する必要があるので、回路をシリアライズするか、フィードバック系を構築して結果出力を制御する必要があります。

Categorías

Más información sobre モデル化 en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!