필터 지우기
필터 지우기

In fi >= non-fi, or non-fi >= fi, the non-fi must be a constant

조회 수: 37 (최근 30일)
Tamer
Tamer 2015년 5월 21일
댓글: Walter Roberson 2021년 4월 26일
Hello There,
I'm converting a Matlab (.m) file to fixed point
"Function call failed."
"In fi <= non-fi, or non-fi <= fi, the non-fi must be a constant."
Here is my code -----------------
x=amp*sin_vec(2*pi*f*t); % Sinusoid input singal (Hz)
jj=-(amp-Delta):Delta:(amp-Delta);
for j=1:jx
for k=1:1:km
if (x(k)>=jj(j)) % <---- error at this line
end
end

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 21일
One of those two variables, x or jj, is in fixed point and the other one is not. You need to make both of them fixed point.
  댓글 수: 3
Essam Ali
Essam Ali 2021년 4월 26일
dears, how can I make the variables as fixed point?
Walter Roberson
Walter Roberson 2021년 4월 26일
Tamer showed
x=fi (x,true,16,16);
which is an example of making x into a fi. You would need to adjust the parameters of the fi() call to be appropriate for the situation.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by