i want to write a matlab code for an user defined input for finding rise time,peak time and fall time which i then need to convert to vhdl. Input can be upto 16bit.

4 Kommentare

Geoff Hayes
Geoff Hayes am 1 Jan. 2015
Yash - what have you tried so far?
yash sharma
yash sharma am 2 Jan. 2015
Bearbeitet: Geoff Hayes am 2 Jan. 2015
i have used interpolation to find the rise time n peak time for already defined values but this cannot be converted to vhdl so we need some variables
x=-4:4;
y=[0 0.15 0.4 1.2 2.3 2.36 1.3 0.9 0]
cs=spline(x,[0 y 0]);
plot(x,y,'o');
x2=interp1(x(1:4),y(1:4),0.9,'spline')
x1=interp1(x(1:4),y(1:4),0.1,'spline')
xr=x2-x1
x4=interp1(x(5:9),y(5:9),0.1,'spline')
x3=interp1(x(5:9),y(5:9),0.9,'spline')
xf= x4-x3
As it can be seen i have defined y already with some numbers so in place of that i want to use y1,y2,y3..so on
Geoff Hayes
Geoff Hayes am 2 Jan. 2015
Are y1, y2, etc. vectors or just scalars? If you want to use them in place of y then why not do so?
yash sharma
yash sharma am 4 Jan. 2015
y1 y2 etc correspond to scalar values they are each a bit like 0 or 1

Melden Sie sich an, um zu kommentieren.

Antworten (1)

mouh nyquist
mouh nyquist am 2 Jan. 2015

0 Stimmen

there is a gooood file in matlab file exchange ; I hope that will help you

2 Kommentare

yash sharma
yash sharma am 4 Jan. 2015
file named what?
mouh nyquist
mouh nyquist am 16 Jan. 2015
tape vhdl ; all the best

Melden Sie sich an, um zu kommentieren.

Tags

Gefragt:

am 1 Jan. 2015

Kommentiert:

am 16 Jan. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by