From: khan Sim on
hi,
i want to model the following matalb code in simulink.

I=find(afsb0 > A);

where
A is a scalar quantity
fsbo is a matrix of of 1xM and has a double data type.
Kindly help/hints required.

Thanx
From: khan Sim on
"khan Sim" <akhun85(a)yahoo.com> wrote in message <hs06db$7cn$1(a)fred.mathworks.com>...
> hi,
> i want to model the following matalb code in simulink.
>
> I=find(afsb0 > A);
>
> where
> A is a scalar quantity
> fsbo is a matrix of of 1xM and has a double data type.
> Kindly help/hints required.
>
> Thanx


kindly any one help.. why no one is helping in this community????
From: Walter Roberson on
khan Sim wrote:
> "khan Sim" <akhun85(a)yahoo.com> wrote in message
> <hs06db$7cn$1(a)fred.mathworks.com>...
>> hi,
>> i want to model the following matalb code in simulink.
>>
>> I=find(afsb0 > A);
>>
>> where
>> A is a scalar quantity
>> fsbo is a matrix of of 1xM and has a double data type. Kindly
>> help/hints required.
>>
>> Thanx

> kindly any one help.. why no one is helping in this community????

It's only been 2 1/2 hours since you asked your question the first time.
It is currently 2:30 AM here, and I'm only online because i'm having
trouble sleeping. It's after midnight everywhere in North America, and
it is just the beginning of the working day in Western Europe.

I don't know the answer to your question, as I have never used Simulink.
Won't the fact that you will get out a varying length answer present
problems?

Is it important to _model_ the code, or just important to get the effect
of the code? Because if you just need the effect of the code, I
understand you can use an embedded matlab S function and put the
expression in directly.
From: khan Sim on
sir,
Walter Roberso !

thank you very much for your reply, i ve posted many problems before aswell but i got no reply. Ur awakening was of great use to me.. :) thanx.


actually, i want to embedd matlab code on fpga, for that i have to make a simulink model and then use HDL coder to convert that model to verilog. i am new to matlab, specially simulink. i ve got a code in matlab and want to model that code to simulink.

now i am facing different problems. to make a simulink design is first step and to implement it on fpga is second step. thanx for ur reply.

Hope you ve a sound sleep tomorrow.. :)
From: Walter Roberson on
khan Sim wrote:

> actually, i want to embedd matlab code on fpga, for that i have to make
> a simulink model and then use HDL coder to convert that model to
> verilog. i am new to matlab, specially simulink. i ve got a code in
> matlab and want to model that code to simulink.

I know little about HDL, but I have to ask: is it even possible in HDL
to have a varying-length result? find() returns only as many values as
are non-zero (and in this case, non-zero corresponds to the test being
true). You might find the algorithm easier to code if you just return
the logical result of the comparison and use that as a mask in the next
steps.