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.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…