Undefined operator '*' for input arguments of type 'matlab.ui.Figure'.

조회 수: 1 (최근 30일)
Bas Bloemendaal
Bas Bloemendaal 2020년 5월 13일
댓글: Bas Bloemendaal 2020년 5월 13일
Hello I get an error when I'm running this part:
I get the error in the line U_det that says Undefined operator '*' for input arguments of type 'matlab.ui.Figure'. I tried to figure it out as others had this type of error but the current solutions didn't work out. Bz is a 1000x1000 matrix btw.
for j = 1:numel(Bz)
offset(j) = Bz(j);
H1_z = H0 + offset(j); % Applied field, + offset
H2_z = H0 - offset(j); % Applied field, - offset
H_z = [H0 H1_z H0 H2_z];
Mz = (pi*V_c^3*Ms)/6; % Magnetic moment in [A/m]
digits(35)
xH_z = vpa((Mz*u0*H_z)/(Kb*T));
M_tot_spions_z = langevinfunc(17.6e-9,27.92e-9,Ms,2*pi*10^-7,xH_z);
U_det = -S_z*V_c*2*pi*f*M_tot_spions_z; % Induced voltage [V]
% FFT of U
Y = abs(fft(U_det));
L = length(t);
P2 = (Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
fdomain = f_particle*(0:(L/2))/L;
figure
plot(fdomain, P1)
title([' Fourier Analysis @ depth = ',num2str(depth_m(j)), ' [m]'])
xlabel('Frequency [s]')
ylabel('Voltage [V]')
end
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 5월 13일
What is
class(S_z)
class(f)
My guess is that your f is the handle to a figure.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by