フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I do this data conversion in both Matlab and Simulink?

1 回表示 (過去 30 日間)
Christian
Christian 2013 年 6 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I need some help with converting a variable in matlab to fixed point.
I have a variable that should start from 0 and step up in increments of 0.03 to at least 300, preferably even higher than that. I also want it to take up as little resources as possible. I have tried:
x=fi(0,0,16,0.03,0,'SumMode','SpecifyPrecision','SumWordLength',28,'SumFractionLength',19);
y = fi(0.03,0,16,0.03,0,'SumMode','SpecifyPrecision','SumWordLength',28,'SumFractionlength',19);
and then looping:
x = x + y;
Then I get to 300 in 10,000 steps which is what I want. But as you can see I need a SumWordLength of 28 to achieve this...
I have som trouble to achieve this conversion in a simlink data conversion block too. Does anyone know of a way to make the variable a bit more 'lean' but still be able to convert to the same format using a simulink data conversion block?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by