how to find ascending and descending of hysteresis loop?

15 views (last 30 days)
I had ploted tow vectors: current=[........]; flux=[.........], which is hysteresis loop. plot(current,flux) I want to find the ascending and descending points in loop. note: see the attachement

Accepted Answer

Star Strider
Star Strider on 17 May 2014
Edited: Star Strider on 17 May 2014
This code:
s = load('Zaid_20140517.mat')
x = s.current;
y = s.flux;
z = linspace(min(x),max(x),length(x))
[cmin,cxix] = (min(x))
[cmax,cnix] = (max(x))
[fmin,fxix] = (min(y))
[fmax,fnix] = (max(y))
figure(1)
plot(x, y)
hold on
plot([cmin cmax], [fmin fmax], '+r', 'MarkerSize', 5, 'LineWidth',1.5)
hold off
grid
text(cmin-0.2,fmin-0.02, sprintf('(%.3f, %.3f)',cmin, fmin), 'FontSize',8, 'FontName', 'Consolas', 'FontWeight', 'bold')
text(cmax-0.4,fmax+0.02, sprintf('(%.3f, %.3f)',cmax, fmax), 'FontSize',8, 'FontName', 'Consolas', 'FontWeight', 'bold')
produces this plot:
  4 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!