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

3 visualizaciones (últimos 30 días)
Bas Bloemendaal
Bas Bloemendaal el 13 de Mayo de 2020
Comentada: Bas Bloemendaal el 13 de Mayo de 2020
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 comentarios
Walter Roberson
Walter Roberson el 13 de Mayo de 2020
What is
class(S_z)
class(f)
My guess is that your f is the handle to a figure.

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by