Setting the initial value in a loop

3 ビュー (過去 30 日間)
Abdolvakil Fazli
Abdolvakil Fazli 2018 年 12 月 18 日
コメント済み: Abdolvakil Fazli 2018 年 12 月 21 日
I have trouble setting the initial value of the adaptation block in simulink attached in this post. I am dealing with a loop in the input of this loop I take one data x (or say a sample) and calculate y according to that x , and adaptation vector (A), in adaptation block, I would update A according to the previous value of x,y,z and A , then I report A to predistortion block , and this loop is turning. My problem is the initial value of A in the first step; It has to be set as ones(1,65) just in the first time ; I do not know how to do it. Because if you set it in Pred block as ones(1,65) in each sample you will be facing with A=ones not an updated version of A. Someone suggested me using clock and counter, I do not know how for I am beginner in simulink. If anybody has any idea about implimentation of this method, or if you have another suggestion , it would be appreciated.
Thanks in advance

回答 (1 件)

Prasanth Sunkara
Prasanth Sunkara 2018 年 12 月 21 日
Hi Fazil,
Consider connecting Initial Condition (IC) prior to the block.
Let me know if it helps
-Prasanth
  1 件のコメント
Abdolvakil Fazli
Abdolvakil Fazli 2018 年 12 月 21 日
I did another thing, that worked. As used a triggered subsystem to create a counter, in each block I will behave according to the count of the counter. I do not do any calculation in first and second step. And using a function I can save the initial value and save the value . This helped me allllooooot to organize my coding and the whole system. here I attached my file. Anyway, I will do your suggestion and I will report it to it.
Tnx

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by