Imaginary parts of complex X and/or Y arguments ignored

조회 수: 1 (최근 30일)
sara07x x
sara07x x 2021년 6월 15일
댓글: KSSV 2021년 6월 16일
> %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.

답변 (1개)

KSSV
KSSV 2021년 6월 15일
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
sara07x x
sara07x x 2021년 6월 15일
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 2021년 6월 16일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by