Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Help in Data Envelopment in MATLAB

Status
Not open for further replies.

bruccy

Newbie level 2
Joined
Apr 29, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Hello!

I need to build a code that make a envelopment in a sin wave, but I've some errors that I cant fix. Please help me? thanks!!

Code:

fig = findobj('tag','EMGscope');

fig = figure('Position',centerfig(800,600),'Resize','off',...
'NumberTitle','off','Name','Osciloscópio Virtual',...
'Interruptible','off','tag','EMGscope','doublebuffer','on',...
'HandleVisibility','on','Color',[.7 .7 .7]);

dados.x = 0:0.1:20;
dados.y = sin(dados.x);
fig.UserData = dados


data = get(fig,'UserData');
data.Fsin = 1000;
data.hscale = .1;
data.vpos1=0;
data.vpos2=0;
data.vscale=1;
data.ordem = 50;
data.x = (0:1/data.Fsin:data.hscale)';
data.y:),1) = zeros(length(data.x),1);
data.y:),2) = zeros(length(data.x),1);

avr = filter(ones(1,data.ordem),[1],data.y:),1)); % average rectified
avr = [zeros(1,data.ordem/2) avr(data.ordem+1:length(avr))' zeros(1,data.ordem/2)];

data.line3 = plot(data.x,avr/max(avr)*max(data.y:),1))+data.vpos1*data.vscale, ...
'linewidth',2,'Color','y');
set(fig,'UserData',data);


____________________________________________________

ERROR:

??? Error using ==> get
Invalid handle object.

Error in ==> centerfig>localPlaceHGFig at 86
f2u = get(F2,'Units');

Error in ==> centerfig at 28
xy = localPlaceHGFig(F1,F2);

Error in ==> senoteste at 16
fig = figure('Position',centerfig(800,600),'Resize','off',...
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top