Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Envelope curve of hysteresis plot

Subject: Envelope curve of hysteresis plot

From: medo_sk Churilov

Date: 7 Dec, 2010 14:58:05

Message: 1 of 10

Hello,

I have a plot of x and y values in form of hysteresis curve. Is it possible to extract the positive and negative envelope from such curve with a routine in Matlab?

Thanks in advance,
medo_sk

Subject: Envelope curve of hysteresis plot

From: Sean de

Date: 7 Dec, 2010 15:09:05

Message: 2 of 10

"medo_sk Churilov" <curilov@gf.ukim.edu.mk> wrote in message <idli1t$hde$1@fred.mathworks.com>...
> Hello,
>
> I have a plot of x and y values in form of hysteresis curve. Is it possible to extract the positive and negative envelope from such curve with a routine in Matlab?
>
> Thanks in advance,
> medo_sk

Please see the engine in the last post in this thread:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/296817

Subject: Envelope curve of hysteresis plot

From: medo_sk

Date: 8 Dec, 2010 14:46:05

Message: 3 of 10

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <idlimh$199$1@fred.mathworks.com>...
> "medo_sk Churilov" <curilov@gf.ukim.edu.mk> wrote in message <idli1t$hde$1@fred.mathworks.com>...
> > Hello,
> >
> > I have a plot of x and y values in form of hysteresis curve. Is it possible to extract the positive and negative envelope from such curve with a routine in Matlab?
> >
> > Thanks in advance,
> > medo_sk
>
> Please see the engine in the last post in this thread:
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/296817



Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?

Subject: Envelope curve of hysteresis plot

From: medo_sk

Date: 8 Dec, 2010 14:47:20

Message: 4 of 10

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <idlimh$199$1@fred.mathworks.com>...
> "medo_sk Churilov" <curilov@gf.ukim.edu.mk> wrote in message <idli1t$hde$1@fred.mathworks.com>...
> > Hello,
> >
> > I have a plot of x and y values in form of hysteresis curve. Is it possible to extract the positive and negative envelope from such curve with a routine in Matlab?
> >
> > Thanks in advance,
> > medo_sk
>
> Please see the engine in the last post in this thread:
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/296817



Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?

Subject: Envelope curve of hysteresis plot

From: Sean de

Date: 8 Dec, 2010 15:17:05

Message: 5 of 10


> Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?

Show us your data...

Subject: Envelope curve of hysteresis plot

From: medo_sk

Date: 8 Dec, 2010 15:42:03

Message: 6 of 10

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido7hh$ggi$1@fred.mathworks.com>...
>
> > Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?
>
> Show us your data...

Here is the data saved in m.file. Column 1 contains values for y axis, while column 2 has values for x-axis.
http://www.4shared.com/file/RfUZPdYZ/hysteresis.html

Subject: Envelope curve of hysteresis plot

From: Sean de

Date: 8 Dec, 2010 15:57:05

Message: 7 of 10

"medo_sk " <curilov@gf.ukim.edu.mk> wrote in message <ido90b$nsk$1@fred.mathworks.com>...
> "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido7hh$ggi$1@fred.mathworks.com>...
> >
> > > Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?
> >
> > Show us your data...
>
> Here is the data saved in m.file. Column 1 contains values for y axis, while column 2 has values for x-axis.
> http://www.4shared.com/file/RfUZPdYZ/hysteresis.html

Is this what you want:
x = hysteresisCopy(:,1);
y = hysteresisCopy(:,2);
k = convhull(x,y);
plot(x(k),y(k),'r-',x,y,'b--')

Subject: Envelope curve of hysteresis plot

From: medo_sk

Date: 9 Dec, 2010 08:14:04

Message: 8 of 10

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido9sg$oeu$1@fred.mathworks.com>...
> "medo_sk " <curilov@gf.ukim.edu.mk> wrote in message <ido90b$nsk$1@fred.mathworks.com>...
> > "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido7hh$ggi$1@fred.mathworks.com>...
> > >
> > > > Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?
> > >
> > > Show us your data...
> >
> > Here is the data saved in m.file. Column 1 contains values for y axis, while column 2 has values for x-axis.
> > http://www.4shared.com/file/RfUZPdYZ/hysteresis.html
>
> Is this what you want:
> x = hysteresisCopy(:,1);
> y = hysteresisCopy(:,2);
> k = convhull(x,y);
> plot(x(k),y(k),'r-',x,y,'b--')

No, I did try 'convhull' also, but it is not what I want.
Please check the following link to see shat I need to plot.
http://www.4shared.com/photo/sP7qtXyo/env.html
The solid bold line is the envelope with both positive and negative part of the diagram. The hysteresis from some other data is plotted in gray.

Subject: Envelope curve of hysteresis plot

From: medo_sk

Date: 13 Dec, 2010 13:37:05

Message: 9 of 10

"medo_sk " <curilov@gf.ukim.edu.mk> wrote in message <idq34c$a0$1@fred.mathworks.com>...
> "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido9sg$oeu$1@fred.mathworks.com>...
> > "medo_sk " <curilov@gf.ukim.edu.mk> wrote in message <ido90b$nsk$1@fred.mathworks.com>...
> > > "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ido7hh$ggi$1@fred.mathworks.com>...
> > > >
> > > > > Nope, this is not want I want. I want to plot envelope curve from data set points of x and y axis. Any suggestion?
> > > >
> > > > Show us your data...
> > >
> > > Here is the data saved in m.file. Column 1 contains values for y axis, while column 2 has values for x-axis.
> > > http://www.4shared.com/file/RfUZPdYZ/hysteresis.html
> >
> > Is this what you want:
> > x = hysteresisCopy(:,1);
> > y = hysteresisCopy(:,2);
> > k = convhull(x,y);
> > plot(x(k),y(k),'r-',x,y,'b--')
>
> No, I did try 'convhull' also, but it is not what I want.
> Please check the following link to see shat I need to plot.
> http://www.4shared.com/photo/sP7qtXyo/env.html
> The solid bold line is the envelope with both positive and negative part of the diagram. The hysteresis from some other data is plotted in gray.

Does anyone has an idea for this problem?

Subject: Envelope curve of hysteresis plot

From: Mirek

Date: 28 Dec, 2010 19:22:23

Message: 10 of 10

On pon, 13 gru 2010 14:37:05 in article news:<ie57i1$8dm$1@fred.mathworks.com>
medo_sk wrote:
>> No, I did try 'convhull' also, but it is not what I want.
>> Please check the following link to see shat I need to plot.
>> http://www.4shared.com/photo/sP7qtXyo/env.html
>> The solid bold line is the envelope with both positive and negative part of the diagram. The hysteresis from some other data is plotted in gray.
>
> Does anyone has an idea for this problem?

This is what you need?

load hysteresis.mat

x=hysteresisCopy(:,2);
y=hysteresisCopy(:,1);

x1=x/std(x);
y1=y/std(y);
z=(x1.^2+y1.^2).^.5;

% look for min peak
plot(z);
pause;

M=0.4; % min peak
i=2:length(z)-1;
j=i(find( z(i-1)<z(i) & z(i)>z(i+1) & z(i)>M ));

% delete spurious peaks
i=1;
while i<length(j);
  if z(j(i))/2>z(j(i+1)); j(i+1)=[]; else i=i+1; end;
end

% check results
plot(z,'-',j,z(j),'r+')
pause

[i,i]=sort(x(j));
js=j(i);

% final envelope
plot(x,y,'c',x(js),y(js),'r*-')

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us