OT central is a flop

MuFu

New Member
Well I've been staring at shit like this...

function quant_err(t,sig,period)
% analyses quantisation error
sh_sig=samphold(t,sig,period); %sample & hold

bits=4;
% scale signals over bit range
sig2=(2^bits-1)*sig/(max(sig)-min(sig));
sig3=(2^bits-1)*sh_sig/(max(sig)-min(sig));
% quantize
sig3=round(sig3);

subplot('position',[0.15 0.6 0.8 0.35]);
set(gca,'FontSize',16);
h1=plot(t,sig2,t,sig3);
ylabel('Quantized S/H','FontSize',16);
grid on;

subplot('position',[0.15 0.1 0.8 0.35]);
set(gca,'FontSize',16);
h2=plot(t,sig2,t,sig2-sig3);
ylabel('Error','FontSize',16);
grid on;

% firstdemo_dac
figcol=[0.8 0.8 0.8];
txtsize=14;

% Position and dimensional parameters
wnd=[80 80 500 600];

% Divide window into dialog frame and graphics frame
edge=20;
gfrm=[wnd(3)-edge-3*wnd(3)/4 edge 3*wnd(3)/4 wnd(4)-2*edge];

h0 = figure('Name','Zero Order Hold DAC',...
'NumberTitle','off',...
'Color',figcol, ...
'Resize','on',...
'Position',wnd);

% Information for all buttons
labelColor=[0.8 0.8 0.8];
top=0.95;
left=0.80;
bottom=0.02;
midx=0.1;midy=0.5;
btnWid=0.12;
btnHt=0.03;

% The slider bars
slider1=uicontrol(...
'Parent',h0,...
'Style','slider',...
'Units','normalized', ...
'Position',[0.15 0.1 0.8 btnHt],...
'SliderStep',[0.005 0.05],...
'Max',[0.99],...
'Min',[0.4],...
'Value',[0.5],...
'Callback','dac(t,sig,get(slider1,''Value''),get(slider2,''Value''))');

slider2=uicontrol(...
'Parent',h0,...
'Style','slider',...
'Units','normalized', ...
'Position',[0.15 0.2 0.8 btnHt],...
'SliderStep',[0.005 0.05],...
'Max',[0.25],...
'Min',[0.001],...
'Value',[0.2],...
'Callback','dac(t,sig,get(slider1,''Value''),get(slider2,''Value''))');

% The CLOSE button
uicontrol( ...
'Parent',h0,...
'Style','push', ...
'Units','normalized', ...
'Position',[left bottom btnWid btnHt], ...
'String','Close', ...
'Callback','close(gcf)');

t=0:0.001:1; %seconds
sig=5*(1+sin(4*pi*t)); %signal
dac(t,sig,0.5,0.2);



...for 8 hours now. Believe me, it has the same effect as any mind-fucking drug I've ever tried. :circle:

MuFu.
 

krusty

Window Licker
Originally posted by outside looking in
Has he started any other threads other than "otc sucks" threads? :D Looking now....

Don't bother..I wouldn't ask you guys an opinion for shit... I'm just an independent critic... and nothing here says this place is any better than xibase... buncha fuckin brown nosers is all I see.

oooh I'm 7 now.. I have 1000 posts... look at my aeroplane picture ...aint it cool.

jebus.
 

samcurry

Screwing with the code...
Staff member
I dont know krusty, ive seen some of your work. and im glad we dont pay you for your critic abilities. :rolleyes:
 

ol' man

New Member
Originally posted by MuFu
Nope...?

MuFu.


Casue in the mid west it is largely made from chicken feed which contains ephedrine. Supposedly the ephedrine makes chickens lay eggs faster.

:D
 
G

Guest

Guest
Originally posted by krusty

Don't bother..I wouldn't ask you guys an opinion for shit... I'm just an independent critic... and nothing here says this place is any better than xibase... buncha fuckin brown nosers is all I see.

oooh I'm 7 now.. I have 1000 posts... look at my aeroplane picture ...aint it cool.

jebus.

I am not a brown noser. Never have been. Never will be. By the way, my aeroplane picture is cool. :p
 
Top