Imaginary parts of complex X and/or Y arguments ignored

2 views (last 30 days)
> %computation of lambda - i curve
clear all
close all
%assign parameters
cm = 1e-2;
mm = 1e-2;
w=1*cm; %core width
Ws=5*cm; %slot width
ds=2*cm; %slot depth
d=5*cm; %depth
g=1*mm; %air gap
N=100; %number of turns
muo=4e-7*pi; %perm of free space
Bsat=1.3; %sat flux density
mur=1500; %init rel permeability
Am=w*d; %mag cross section
%start with flux linkage
lambda= linspace(0,0.08,1000);
%find flux, B, mu
phi=lambda/N;
B=phi/(w*d);
mu= muo *(mur-1)./(exp(10*(B-Bsat)).^2+1)+ muo;
%assign reluctance
Ric=(Ws+w)./(Am*mu);
Rbuc=(Ws+w)./(Am*mu);
Rg=g/(Am*muo);
Rluc= (ds+w/2)./(Am*mu);
%compute effective reluctance
Reff= Ric+Rbuc+2*Rg+2*Rluc;
%compute mmf and current
F=Reff.*phi;;
%find the characteristics
figure(1)
plot(i, lambda);
xlabel ('i,A');
ylabel ('\lambda, Vs');
grid on;
%show B-H characteristics
H=B/mu;
figure (2)
plot (H,B);
xlabel('H')
ylabel('B')
grid on;
Warning: Imaginary parts of complex X and/or Y arguments ignored.
it shows me this warning, also shows me empty figures.

Answers (1)

KSSV
KSSV on 15 Jun 2021
plot(i, lambda);
The above line is not correct. LAst lines should be repalced with.
H=B./mu;
figure (2)
plot (H,B);
xlabel('H')
ylabel('B')
grid on;
  2 Comments
sara07x x
sara07x x on 15 Jun 2021
yes it worked with figure 2 but figure 1 is still empty and shows me this Warning: Imaginary parts of complex X and/or Y arguments ignored.
> %computation of lambda - i curve
clear all
close all
%assign parameters
cm = 1e-2;
mm = 1e-2;
w=1*cm; %core width
Ws=5*cm; %slot width
ds=2*cm; %slot depth
d=5*cm; %depth
g=1*mm; %air gap
N=100; %number of turns
muo=4e-7*pi; %perm of free space
Bsat=1.3; %sat flux density
mur=1500; %init rel permeability
Am=w*d; %mag cross section
%start with flux linkage
lambda= linspace(0,0.08,1000);
%find flux, B, mu
phi=lambda/N;
B=phi/(w*d);
mu= muo *(mur-1)./(exp(10*(B-Bsat)).^2+1)+ muo;
%assign reluctance
Ric=(Ws+w)./(Am*mu);
Rbuc=(Ws+w)./(Am*mu);
Rg=g/(Am*muo);
Rluc= (ds+w/2)./(Am*mu);
%compute effective reluctance
Reff= Ric+Rbuc+2*Rg+2*Rluc;
%compute mmf and current
F=Reff.*phi;;
%find the characteristics
figure(1)
plot(i, lambda);
xlabel ('i,A');
ylabel ('\lambda, Vs');
grid on;
%show B-H characteristics
H=B./mu;
figure (2)
plot (H,B);
xlabel('H')
ylabel('B')
grid on;
as you said there is somthing wrong in plot(i, lambda);
what to do?
KSSV
KSSV on 16 Jun 2021
plot(i, lambda);
The above line is not correct. i here is an imaginary number and lambda is an array. You want to plot lambda w.r.t what?
plot(lambda)
the above will work.

Sign in to comment.

Categories

Find more on Colormaps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!