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

2 ビュー (過去 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.
Bas Bloemendaal
Bas Bloemendaal 2020 年 5 月 13 日
Solved! thankyou

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by