Month: December 2025
EEG bandpass filtering locutoff and hicutoff syntax
I have been confused with this basic question for a while. If I want to keep the EEG data ranging from 0.05Hz- 80Hz when doing the bandpass filtering step, should I run: EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80)or EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80, ‘revfilt’, 1)? Thank you so much for anawering this question!I have been confused with this basic question for a while. If I want to keep the EEG data ranging from 0.05Hz- 80Hz when doing the bandpass filtering step, should I run: EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80)or EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80, ‘revfilt’, 1)? Thank you so much for anawering this question! I have been confused with this basic question for a while. If I want to keep the EEG data ranging from 0.05Hz- 80Hz when doing the bandpass filtering step, should I run: EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80)or EEG = pop_eegfiltnew(EEG, ‘locutoff’, 0.05, ‘hicutoff’, 80, ‘revfilt’, 1)? Thank you so much for anawering this question! eeg, bandpass filtering MATLAB Answers — New Questions
Can someone give me the transformer data?
Who can choose me the parameters of 13.8/220kV transformer with capacity of 150MVA or more?Who can choose me the parameters of 13.8/220kV transformer with capacity of 150MVA or more? Who can choose me the parameters of 13.8/220kV transformer with capacity of 150MVA or more? simulink, transformer MATLAB Answers — New Questions
Copy Legend from UIAxes to another UIAxes
Hello,i want to copy a plot on a uiaxes to another uiaxes and can do using the following – but I can’t get the legend to copy accross (I want to avoid using the downloadedable copyuiaxes for now)
ax1=app.UIAxes3 % My main axes for plotting
ax1.Children
L1=ax1.Legend % This works
L1s=L1.String{1} % and this
f2=figure; ax2=axes(f2);
new_children=copyobj(ax1.Children,ax2);
makeGraphBlack(app,ax2,’k’,’w’); % My own function to change appearance (background & grid)
% Copy desired axes properties
ax2.XLim=ax1.XLim; ax2.YLim=ax1.YLim;
ax2.Title.String=ax1.Title.String;
ax2.XLabel.String=ax1.XLabel.String;
ax2.YLabel.String=ax1.YLabel.String;
propsToCopy={‘FontSize’,’Color’,’GridLineStyle’};
for prop=propsToCopy
set(ax2,prop{1},get(ax1,prop{1}));
end
%Copy Legend
legend(ax2)
ax2.Legend=L1;
legend.TextColor = ‘w’;
This gives me the error message:
Unrecognized function or variable ‘legend’.
Also I notice copyobj doesn’t retain the colours of the plots, so I thought adding ‘Color’ to propsToCopy would do it. Do I have to go the route of finding the line objects of the ax1 children, and then dig down into each of their colors – or is there a quicker way?
ThanksHello,i want to copy a plot on a uiaxes to another uiaxes and can do using the following – but I can’t get the legend to copy accross (I want to avoid using the downloadedable copyuiaxes for now)
ax1=app.UIAxes3 % My main axes for plotting
ax1.Children
L1=ax1.Legend % This works
L1s=L1.String{1} % and this
f2=figure; ax2=axes(f2);
new_children=copyobj(ax1.Children,ax2);
makeGraphBlack(app,ax2,’k’,’w’); % My own function to change appearance (background & grid)
% Copy desired axes properties
ax2.XLim=ax1.XLim; ax2.YLim=ax1.YLim;
ax2.Title.String=ax1.Title.String;
ax2.XLabel.String=ax1.XLabel.String;
ax2.YLabel.String=ax1.YLabel.String;
propsToCopy={‘FontSize’,’Color’,’GridLineStyle’};
for prop=propsToCopy
set(ax2,prop{1},get(ax1,prop{1}));
end
%Copy Legend
legend(ax2)
ax2.Legend=L1;
legend.TextColor = ‘w’;
This gives me the error message:
Unrecognized function or variable ‘legend’.
Also I notice copyobj doesn’t retain the colours of the plots, so I thought adding ‘Color’ to propsToCopy would do it. Do I have to go the route of finding the line objects of the ax1 children, and then dig down into each of their colors – or is there a quicker way?
Thanks Hello,i want to copy a plot on a uiaxes to another uiaxes and can do using the following – but I can’t get the legend to copy accross (I want to avoid using the downloadedable copyuiaxes for now)
ax1=app.UIAxes3 % My main axes for plotting
ax1.Children
L1=ax1.Legend % This works
L1s=L1.String{1} % and this
f2=figure; ax2=axes(f2);
new_children=copyobj(ax1.Children,ax2);
makeGraphBlack(app,ax2,’k’,’w’); % My own function to change appearance (background & grid)
% Copy desired axes properties
ax2.XLim=ax1.XLim; ax2.YLim=ax1.YLim;
ax2.Title.String=ax1.Title.String;
ax2.XLabel.String=ax1.XLabel.String;
ax2.YLabel.String=ax1.YLabel.String;
propsToCopy={‘FontSize’,’Color’,’GridLineStyle’};
for prop=propsToCopy
set(ax2,prop{1},get(ax1,prop{1}));
end
%Copy Legend
legend(ax2)
ax2.Legend=L1;
legend.TextColor = ‘w’;
This gives me the error message:
Unrecognized function or variable ‘legend’.
Also I notice copyobj doesn’t retain the colours of the plots, so I thought adding ‘Color’ to propsToCopy would do it. Do I have to go the route of finding the line objects of the ax1 children, and then dig down into each of their colors – or is there a quicker way?
Thanks uiaxes, legend, copyobj MATLAB Answers — New Questions
增量谐波平衡法(IHB)
Hello everyone, I am a beginner in Matlab programming and have been trying to solve the differential equation system for incremental harmonic balance (IHB) given below. I have a MATLAB program, but there seems to be a problem and the analysis results are not satisfactory. We would greatly appreciate any assistance or related work. Thank you in advance.
matlab code
clear all
close all
clc
tic
syms t
%========输入基本参数(已知条件)======
%========duffing 方程得参数===========
a=0.95; %负刚度弹簧在静平衡位置的长度无量纲
lambda=0.085;
lambda_s=-4*lambda*(a-1)/(4*lambda*(a-1)+a);
miu=0.00001; %质量比
xi=0.05;%正刚度阻尼比
xi_b1=0.001;%负刚度装置阻尼比
z=0.06;%幅值
p0=-4*lambda*(1/(a^2)^(1/2)-1);
p1=(2*lambda)/(a^2)^(3/2);
p2=-(3*lambda)/(2*(a^2)^(5/2));
p3=(5*lambda)/(4*(a^2)^(7/2));
p4=-(35*lambda)/(32*(a^2)^(9/2));
p5=(63*lambda)/(64*(a^2)^(11/2));
m=[1,0;0,miu];% m惯性项系数
k=[1+lambda_s,-lambda_s;-lambda_s,lambda_s+p0];% k一次项系数
f=[z;0];% f激励幅值
c=[2*xi,0;0,2*xi_b1];% c阻尼系数
%=====控制参数
omg0=0.005;domg=0.0183;%频率比初始值与增量
%%%%%%能否收敛,delta_s和Nd的取值至关重要
%Nd一般要大于2,易收敛时Nd不宜太大,Nd越小,取值点越密集。非线性较强,Nd取值应稍大一些
delta_s=0.02;%弧长增量值
Nd=1;
Num_Pre_step=4; %预测解需要预测Num_Pre_step步
Num_Incremental_step=160; %程序总共计算Num_Incremental_step步
%========设置谐波矩阵=================
Cs=[ cos(t) sin(t) cos(2*t) sin(2*t)];
S=blkdiag(Cs,Cs);
S1=diff(S,t,1);
S2=diff(S,t,2);
%========设置A矩阵初值================
A1=[ 0.1 0.1 0.1 0.1];%上部结构位移响应的谐波系数
A2=[ 0.1 0.1 0.1 0.1];%调谐装置位移响应的谐波系数
A=[A1,A2]’;%傅里叶系数矩阵
length_A=length(A);
%========质量矩阵m====================
%========刚度矩阵k====================
%========阻尼矩阵k====================
%========外激励矩阵f==================
%========非线性刚度矩阵===============
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
%================
%========积分过程==
fm=inline(S’*m*S2);
M=quadv(fm,0,2*pi);%质量矩阵
fk=inline(S’*k*S);
K=quadv(fk,0,2*pi);%线性刚度矩阵
fc=inline(S’*c*S1);
C=quadv(fc,0,2*pi);%阻尼矩阵
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
ff=inline(S’*f*cos(t));
F=quadv(ff,0,2*pi);%激励矩阵
%=========带入公式,公式推导可见陈的书
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
Delta_A=inv(Kmc)*R;
%=======开始迭代过程
epsR=1e-4;
i=1;
X=zeros(length_A+1,4); %建立0矩阵便于保存四个解用于预测
s=zeros(1,3);
Harmonic_A=[]; %用于保存每一个解的谐波项系数
Result_A1=[ ];
for i=1:Num_Pre_step %该部分没有应用弧长法,预先求得一部分解便于弧长法的预测
n=1;tol=1;
while tol>epsR
A=A+Delta_A;
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%====再一次计算
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Delta_A=inv(Kmc)*R;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
%%%%%%%%%%%%%保存最新的四组解,便于弧长法预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A1(:,i)=A;
omg0=omg0+domg;
i=i+1;
end
% 以下是结合了弧长法的增量谐波平衡法
Result_A2=[];
for i=Num_Pre_step+1:Num_Incremental_step %%%%取Num_Incremental_step个增量步
n=1;tol=1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
for kk=1:3
s(kk)=norm(X(:,kk+1)-X(:,kk));
end
tt(1)=0;tt(2)=s(1);tt(3)=tt(2)+s(2);tt(4)=tt(3)+s(3);tt(5)=tt(4)+delta_s;
PreValue_X=zeros(length_A+1,1);
for ii=1:4
aa=1;
for jj=1:4
if jj~=ii
aa=aa*((tt(5)-tt(jj))/(tt(ii)-tt(jj)));
end
end
PreValue_X=PreValue_X+aa*X(:,ii);
end
A=PreValue_X(1:length_A);
omg0=PreValue_X(length_A+1);
%%%%%%%%%%%%%%%%%%%%%%%%%% 以上这部分为弧长法,根据已经计算得到的四组解预测下一个解的过程,可见陈的书P177
%%%%%计算非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
%%%%%%%%%%%%判断并寻找控制变量
DELTA_X=PreValue_X-X(:,4); %DELTA_X是预测解与上一增量步的差值,只用来寻找最大值元素,与Delta_X的意义不同。Delta_X是每一个迭代步产生的插值
[~,flag]=max(abs(DELTA_X(1:length_A)));%找到绝对值最大的元素及其下标索引Note_flag,注意要把omg0排除在外,找delta_A中的最大值元素
Note_flag=flag;
%%%%%%%%%%%%%%%%%%%%处理求得的解,得到我们所需要的Delta_A和domg
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
%%%%%%%%%%%%%%%%%%%%%%%%%下面是每个增量步内的循环迭代
while tol>epsR
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%%%%%%%%%%%%%%%%
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率比=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
delta_s=delta_s*Nd/I3;
% [i I3 delta_s omg0]
%%%%%%%%%%%%%保存最新的四组解,用于预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A2(:,i)=A;
i=i+1;
end
Result_A= [Result_A1,zeros(length(A),Num_Incremental_step-Num_Pre_step)]+ Result_A2;
% figure(1)
% plot(Frequency,Amplitude11,’o-‘,’linewidth’,2,’color’,’r’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
% figure(2)
% plot(Frequency,Amplitude12,’o-‘,’linewidth’,2,’color’,’b’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
figure(3)
plot(Frequency,Amplitude,’o-‘,’linewidth’,2,’color’,’b’);
xlabel(‘Frequency’);
ylabel(‘Amplitude’);
grid on
toc
Warning: The maximum function count has been exceeded; May have singularity.Hello everyone, I am a beginner in Matlab programming and have been trying to solve the differential equation system for incremental harmonic balance (IHB) given below. I have a MATLAB program, but there seems to be a problem and the analysis results are not satisfactory. We would greatly appreciate any assistance or related work. Thank you in advance.
matlab code
clear all
close all
clc
tic
syms t
%========输入基本参数(已知条件)======
%========duffing 方程得参数===========
a=0.95; %负刚度弹簧在静平衡位置的长度无量纲
lambda=0.085;
lambda_s=-4*lambda*(a-1)/(4*lambda*(a-1)+a);
miu=0.00001; %质量比
xi=0.05;%正刚度阻尼比
xi_b1=0.001;%负刚度装置阻尼比
z=0.06;%幅值
p0=-4*lambda*(1/(a^2)^(1/2)-1);
p1=(2*lambda)/(a^2)^(3/2);
p2=-(3*lambda)/(2*(a^2)^(5/2));
p3=(5*lambda)/(4*(a^2)^(7/2));
p4=-(35*lambda)/(32*(a^2)^(9/2));
p5=(63*lambda)/(64*(a^2)^(11/2));
m=[1,0;0,miu];% m惯性项系数
k=[1+lambda_s,-lambda_s;-lambda_s,lambda_s+p0];% k一次项系数
f=[z;0];% f激励幅值
c=[2*xi,0;0,2*xi_b1];% c阻尼系数
%=====控制参数
omg0=0.005;domg=0.0183;%频率比初始值与增量
%%%%%%能否收敛,delta_s和Nd的取值至关重要
%Nd一般要大于2,易收敛时Nd不宜太大,Nd越小,取值点越密集。非线性较强,Nd取值应稍大一些
delta_s=0.02;%弧长增量值
Nd=1;
Num_Pre_step=4; %预测解需要预测Num_Pre_step步
Num_Incremental_step=160; %程序总共计算Num_Incremental_step步
%========设置谐波矩阵=================
Cs=[ cos(t) sin(t) cos(2*t) sin(2*t)];
S=blkdiag(Cs,Cs);
S1=diff(S,t,1);
S2=diff(S,t,2);
%========设置A矩阵初值================
A1=[ 0.1 0.1 0.1 0.1];%上部结构位移响应的谐波系数
A2=[ 0.1 0.1 0.1 0.1];%调谐装置位移响应的谐波系数
A=[A1,A2]’;%傅里叶系数矩阵
length_A=length(A);
%========质量矩阵m====================
%========刚度矩阵k====================
%========阻尼矩阵k====================
%========外激励矩阵f==================
%========非线性刚度矩阵===============
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
%================
%========积分过程==
fm=inline(S’*m*S2);
M=quadv(fm,0,2*pi);%质量矩阵
fk=inline(S’*k*S);
K=quadv(fk,0,2*pi);%线性刚度矩阵
fc=inline(S’*c*S1);
C=quadv(fc,0,2*pi);%阻尼矩阵
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
ff=inline(S’*f*cos(t));
F=quadv(ff,0,2*pi);%激励矩阵
%=========带入公式,公式推导可见陈的书
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
Delta_A=inv(Kmc)*R;
%=======开始迭代过程
epsR=1e-4;
i=1;
X=zeros(length_A+1,4); %建立0矩阵便于保存四个解用于预测
s=zeros(1,3);
Harmonic_A=[]; %用于保存每一个解的谐波项系数
Result_A1=[ ];
for i=1:Num_Pre_step %该部分没有应用弧长法,预先求得一部分解便于弧长法的预测
n=1;tol=1;
while tol>epsR
A=A+Delta_A;
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%====再一次计算
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Delta_A=inv(Kmc)*R;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
%%%%%%%%%%%%%保存最新的四组解,便于弧长法预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A1(:,i)=A;
omg0=omg0+domg;
i=i+1;
end
% 以下是结合了弧长法的增量谐波平衡法
Result_A2=[];
for i=Num_Pre_step+1:Num_Incremental_step %%%%取Num_Incremental_step个增量步
n=1;tol=1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
for kk=1:3
s(kk)=norm(X(:,kk+1)-X(:,kk));
end
tt(1)=0;tt(2)=s(1);tt(3)=tt(2)+s(2);tt(4)=tt(3)+s(3);tt(5)=tt(4)+delta_s;
PreValue_X=zeros(length_A+1,1);
for ii=1:4
aa=1;
for jj=1:4
if jj~=ii
aa=aa*((tt(5)-tt(jj))/(tt(ii)-tt(jj)));
end
end
PreValue_X=PreValue_X+aa*X(:,ii);
end
A=PreValue_X(1:length_A);
omg0=PreValue_X(length_A+1);
%%%%%%%%%%%%%%%%%%%%%%%%%% 以上这部分为弧长法,根据已经计算得到的四组解预测下一个解的过程,可见陈的书P177
%%%%%计算非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
%%%%%%%%%%%%判断并寻找控制变量
DELTA_X=PreValue_X-X(:,4); %DELTA_X是预测解与上一增量步的差值,只用来寻找最大值元素,与Delta_X的意义不同。Delta_X是每一个迭代步产生的插值
[~,flag]=max(abs(DELTA_X(1:length_A)));%找到绝对值最大的元素及其下标索引Note_flag,注意要把omg0排除在外,找delta_A中的最大值元素
Note_flag=flag;
%%%%%%%%%%%%%%%%%%%%处理求得的解,得到我们所需要的Delta_A和domg
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
%%%%%%%%%%%%%%%%%%%%%%%%%下面是每个增量步内的循环迭代
while tol>epsR
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%%%%%%%%%%%%%%%%
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率比=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
delta_s=delta_s*Nd/I3;
% [i I3 delta_s omg0]
%%%%%%%%%%%%%保存最新的四组解,用于预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A2(:,i)=A;
i=i+1;
end
Result_A= [Result_A1,zeros(length(A),Num_Incremental_step-Num_Pre_step)]+ Result_A2;
% figure(1)
% plot(Frequency,Amplitude11,’o-‘,’linewidth’,2,’color’,’r’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
% figure(2)
% plot(Frequency,Amplitude12,’o-‘,’linewidth’,2,’color’,’b’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
figure(3)
plot(Frequency,Amplitude,’o-‘,’linewidth’,2,’color’,’b’);
xlabel(‘Frequency’);
ylabel(‘Amplitude’);
grid on
toc
Warning: The maximum function count has been exceeded; May have singularity. Hello everyone, I am a beginner in Matlab programming and have been trying to solve the differential equation system for incremental harmonic balance (IHB) given below. I have a MATLAB program, but there seems to be a problem and the analysis results are not satisfactory. We would greatly appreciate any assistance or related work. Thank you in advance.
matlab code
clear all
close all
clc
tic
syms t
%========输入基本参数(已知条件)======
%========duffing 方程得参数===========
a=0.95; %负刚度弹簧在静平衡位置的长度无量纲
lambda=0.085;
lambda_s=-4*lambda*(a-1)/(4*lambda*(a-1)+a);
miu=0.00001; %质量比
xi=0.05;%正刚度阻尼比
xi_b1=0.001;%负刚度装置阻尼比
z=0.06;%幅值
p0=-4*lambda*(1/(a^2)^(1/2)-1);
p1=(2*lambda)/(a^2)^(3/2);
p2=-(3*lambda)/(2*(a^2)^(5/2));
p3=(5*lambda)/(4*(a^2)^(7/2));
p4=-(35*lambda)/(32*(a^2)^(9/2));
p5=(63*lambda)/(64*(a^2)^(11/2));
m=[1,0;0,miu];% m惯性项系数
k=[1+lambda_s,-lambda_s;-lambda_s,lambda_s+p0];% k一次项系数
f=[z;0];% f激励幅值
c=[2*xi,0;0,2*xi_b1];% c阻尼系数
%=====控制参数
omg0=0.005;domg=0.0183;%频率比初始值与增量
%%%%%%能否收敛,delta_s和Nd的取值至关重要
%Nd一般要大于2,易收敛时Nd不宜太大,Nd越小,取值点越密集。非线性较强,Nd取值应稍大一些
delta_s=0.02;%弧长增量值
Nd=1;
Num_Pre_step=4; %预测解需要预测Num_Pre_step步
Num_Incremental_step=160; %程序总共计算Num_Incremental_step步
%========设置谐波矩阵=================
Cs=[ cos(t) sin(t) cos(2*t) sin(2*t)];
S=blkdiag(Cs,Cs);
S1=diff(S,t,1);
S2=diff(S,t,2);
%========设置A矩阵初值================
A1=[ 0.1 0.1 0.1 0.1];%上部结构位移响应的谐波系数
A2=[ 0.1 0.1 0.1 0.1];%调谐装置位移响应的谐波系数
A=[A1,A2]’;%傅里叶系数矩阵
length_A=length(A);
%========质量矩阵m====================
%========刚度矩阵k====================
%========阻尼矩阵k====================
%========外激励矩阵f==================
%========非线性刚度矩阵===============
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
%================
%========积分过程==
fm=inline(S’*m*S2);
M=quadv(fm,0,2*pi);%质量矩阵
fk=inline(S’*k*S);
K=quadv(fk,0,2*pi);%线性刚度矩阵
fc=inline(S’*c*S1);
C=quadv(fc,0,2*pi);%阻尼矩阵
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
ff=inline(S’*f*cos(t));
F=quadv(ff,0,2*pi);%激励矩阵
%=========带入公式,公式推导可见陈的书
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
Delta_A=inv(Kmc)*R;
%=======开始迭代过程
epsR=1e-4;
i=1;
X=zeros(length_A+1,4); %建立0矩阵便于保存四个解用于预测
s=zeros(1,3);
Harmonic_A=[]; %用于保存每一个解的谐波项系数
Result_A1=[ ];
for i=1:Num_Pre_step %该部分没有应用弧长法,预先求得一部分解便于弧长法的预测
n=1;tol=1;
while tol>epsR
A=A+Delta_A;
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%====再一次计算
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Delta_A=inv(Kmc)*R;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
%%%%%%%%%%%%%保存最新的四组解,便于弧长法预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A1(:,i)=A;
omg0=omg0+domg;
i=i+1;
end
% 以下是结合了弧长法的增量谐波平衡法
Result_A2=[];
for i=Num_Pre_step+1:Num_Incremental_step %%%%取Num_Incremental_step个增量步
n=1;tol=1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%
for kk=1:3
s(kk)=norm(X(:,kk+1)-X(:,kk));
end
tt(1)=0;tt(2)=s(1);tt(3)=tt(2)+s(2);tt(4)=tt(3)+s(3);tt(5)=tt(4)+delta_s;
PreValue_X=zeros(length_A+1,1);
for ii=1:4
aa=1;
for jj=1:4
if jj~=ii
aa=aa*((tt(5)-tt(jj))/(tt(ii)-tt(jj)));
end
end
PreValue_X=PreValue_X+aa*X(:,ii);
end
A=PreValue_X(1:length_A);
omg0=PreValue_X(length_A+1);
%%%%%%%%%%%%%%%%%%%%%%%%%% 以上这部分为弧长法,根据已经计算得到的四组解预测下一个解的过程,可见陈的书P177
%%%%%计算非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
%%%%%%%%%%%%判断并寻找控制变量
DELTA_X=PreValue_X-X(:,4); %DELTA_X是预测解与上一增量步的差值,只用来寻找最大值元素,与Delta_X的意义不同。Delta_X是每一个迭代步产生的插值
[~,flag]=max(abs(DELTA_X(1:length_A)));%找到绝对值最大的元素及其下标索引Note_flag,注意要把omg0排除在外,找delta_A中的最大值元素
Note_flag=flag;
%%%%%%%%%%%%%%%%%%%%处理求得的解,得到我们所需要的Delta_A和domg
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
%%%%%%%%%%%%%%%%%%%%%%%%%下面是每个增量步内的循环迭代
while tol>epsR
%====回代非线性刚度矩阵,计算下一次循环过程的非线性刚度矩阵
A0=[zeros(1,length(A1)),A(1:length(A2),:)’]’;
q=(S*A0)’;
kn3=[0;p1]*q.^2;
kn5=[0;p2]*q.^4;
kn7=[0;p3]*q.^6;
kn9=[0;p4]*q.^8;
kn11=[0;p5]*q.^10;
fkn3=inline(S’*kn3*S);
KN3=quadv(fkn3,0,2*pi);%非线性矩阵
fkn5=inline(S’*kn5*S);
KN5=quadv(fkn5,0,2*pi);%非线性矩阵
fkn7=inline(S’*kn7*S);
KN7=quadv(fkn7,0,2*pi);%非线性矩阵
fkn9=inline(S’*kn9*S);
KN9=quadv(fkn9,0,2*pi);%非线性矩阵
fkn11=inline(S’*kn11*S);
KN11=quadv(fkn11,0,2*pi);%非线性矩阵
%%%%%%%%%%%%%%%%
Kmc=omg0^2*M+omg0*C+K+3*KN3+5*KN5+7*KN7+9*KN9+11*KN11;
R=-F-(omg0^2*M+omg0*C+K+KN3+KN5+KN7+KN9+KN11)*A;
Rmc=-(2*omg0*M+C)*A;
tol=norm(R);
Kmc(:,Note_flag)=-Rmc(:,1);
Kmc=Kmc(1:length_A,1:length_A);
Delta_X=inv(Kmc)*R;
Delta_X(length_A+1)=0;
Delta_X(length_A+1)=Delta_X(Note_flag);
Delta_X(Note_flag)=0;
Delta_A=Delta_X(1:length_A);
domg=Delta_X(length_A+1);
%A00=[w0;A0(2:6,1)];
A=A+Delta_A;
omg0=omg0+domg;
if(n>60)
disp(‘迭代步数太多,可能不收敛’)
return
end
n=n+1;
end
I3=n-1;
disp([‘增量步=’ num2str(i),’ 迭代次数=’ num2str(I3),’ 本增量步弧长=’ num2str(delta_s),’ 已计算到频率比=’ num2str(omg0)])
Harmonic_A=[Harmonic_A;A’];
delta_s=delta_s*Nd/I3;
% [i I3 delta_s omg0]
%%%%%%%%%%%%%保存最新的四组解,用于预测
for p=1:3
X(:,p)=X(:,p+1);
end
X(1:length_A,4)=A;
X(length_A+1,4)=omg0;
p=0;
%%%%%%%%%%%%%
Frequency(i)=omg0;
% Amplitude11(i)=sqrt(A(2)^2+A(4)^2);
% Amplitude12(i)=sqrt(A(3)^2+A(5)^2);
Amplitude(i)=sqrt(A(2)^2+A(1)^2+A(3)^2+A(4)^2);
Result_A2(:,i)=A;
i=i+1;
end
Result_A= [Result_A1,zeros(length(A),Num_Incremental_step-Num_Pre_step)]+ Result_A2;
% figure(1)
% plot(Frequency,Amplitude11,’o-‘,’linewidth’,2,’color’,’r’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
% figure(2)
% plot(Frequency,Amplitude12,’o-‘,’linewidth’,2,’color’,’b’);
% xlabel(‘Frequency’);
% ylabel(‘Amplitude’);
figure(3)
plot(Frequency,Amplitude,’o-‘,’linewidth’,2,’color’,’b’);
xlabel(‘Frequency’);
ylabel(‘Amplitude’);
grid on
toc
Warning: The maximum function count has been exceeded; May have singularity. matlab ihb MATLAB Answers — New Questions
Why do newer Pixhawk Cube Orange+ boards fail to work with PX4 v1.14.x when using the UAV Toolbox Support Package for PX4 Autopilots?
Some users have reported that recently purchased Pixhawk Cube Orange+ boards exhibit compatibility issues with PX4 v1.14.x (as bundled in MATLAB R2024a–R2025b). While older Cube Orange+ units work correctly, newer boards show the following problems under PX4 v1.14.0 / v1.14.3:
PX4 boots with the error tune.
RC input is missing:
QGroundControl’s Radio setup shows no channels.
MAVLink Inspector shows no RC_CHANNELS / RC_CHANNELS_RAW messages.
SBUS RCIN is not recognized; enabling ELRS/CRSF only gives glitchy signals.
LiDAR (e.g., TFMini) stops publishing; no DISTANCE_SENSOR messages.
PWM_MAIN channels 1–8 appear disabled, and PWM_MAIN_TIM* parameters are missing.
Flashing PX4 v1.15+ resolves these issues, suggesting that newer Cube Orange+ hardware requires changes not present in PX4 v1.14.x.
Questions:
Is this a known issue with newer Cube Orange+ boards and PX4 v1.14.x?
Is there a roadmap to support PX4 v1.15+ in MATLAB PX4 Toolbox?
Is there any workaround to make these boards work with PX4 v1.14.x in MATLAB?Some users have reported that recently purchased Pixhawk Cube Orange+ boards exhibit compatibility issues with PX4 v1.14.x (as bundled in MATLAB R2024a–R2025b). While older Cube Orange+ units work correctly, newer boards show the following problems under PX4 v1.14.0 / v1.14.3:
PX4 boots with the error tune.
RC input is missing:
QGroundControl’s Radio setup shows no channels.
MAVLink Inspector shows no RC_CHANNELS / RC_CHANNELS_RAW messages.
SBUS RCIN is not recognized; enabling ELRS/CRSF only gives glitchy signals.
LiDAR (e.g., TFMini) stops publishing; no DISTANCE_SENSOR messages.
PWM_MAIN channels 1–8 appear disabled, and PWM_MAIN_TIM* parameters are missing.
Flashing PX4 v1.15+ resolves these issues, suggesting that newer Cube Orange+ hardware requires changes not present in PX4 v1.14.x.
Questions:
Is this a known issue with newer Cube Orange+ boards and PX4 v1.14.x?
Is there a roadmap to support PX4 v1.15+ in MATLAB PX4 Toolbox?
Is there any workaround to make these boards work with PX4 v1.14.x in MATLAB? Some users have reported that recently purchased Pixhawk Cube Orange+ boards exhibit compatibility issues with PX4 v1.14.x (as bundled in MATLAB R2024a–R2025b). While older Cube Orange+ units work correctly, newer boards show the following problems under PX4 v1.14.0 / v1.14.3:
PX4 boots with the error tune.
RC input is missing:
QGroundControl’s Radio setup shows no channels.
MAVLink Inspector shows no RC_CHANNELS / RC_CHANNELS_RAW messages.
SBUS RCIN is not recognized; enabling ELRS/CRSF only gives glitchy signals.
LiDAR (e.g., TFMini) stops publishing; no DISTANCE_SENSOR messages.
PWM_MAIN channels 1–8 appear disabled, and PWM_MAIN_TIM* parameters are missing.
Flashing PX4 v1.15+ resolves these issues, suggesting that newer Cube Orange+ hardware requires changes not present in PX4 v1.14.x.
Questions:
Is this a known issue with newer Cube Orange+ boards and PX4 v1.14.x?
Is there a roadmap to support PX4 v1.15+ in MATLAB PX4 Toolbox?
Is there any workaround to make these boards work with PX4 v1.14.x in MATLAB? px4 MATLAB Answers — New Questions
Digital Filter Design block error, filter not valid, please redesign.
I am using MATLAB R2025b and trying to design FIR filters using window function in Simulink using the Digital Filter Design Block, when I run the model it gives an error message box saying: "fliiter design is not valid. please redesign". I tried generating MATLAB code of the block and the code runs with no errors.
parameters I used:
low pass filter
rectangular window
order = 50
Fs = 48000 Hz
Fc = 10800 HzI am using MATLAB R2025b and trying to design FIR filters using window function in Simulink using the Digital Filter Design Block, when I run the model it gives an error message box saying: "fliiter design is not valid. please redesign". I tried generating MATLAB code of the block and the code runs with no errors.
parameters I used:
low pass filter
rectangular window
order = 50
Fs = 48000 Hz
Fc = 10800 Hz I am using MATLAB R2025b and trying to design FIR filters using window function in Simulink using the Digital Filter Design Block, when I run the model it gives an error message box saying: "fliiter design is not valid. please redesign". I tried generating MATLAB code of the block and the code runs with no errors.
parameters I used:
low pass filter
rectangular window
order = 50
Fs = 48000 Hz
Fc = 10800 Hz digital signal processing, digital filter design block MATLAB Answers — New Questions
Can “diary” be set to export exact text where hyperlinks are invoked instead of code or other characters?
The output of "diary" echoes what appears in the Command window, except for certain hyperlinks invoked by Matlab. Is there a way to echo literally what appears on the screen instead of code?
For example,
str = sprintf(‘%s%s’, …
‘<a href="matlab:magic(4)">’, …
‘Generate magic square</a>’);
disp(str)
MATLAB displays this in the Command Window:
However, the diary file, when viewed in a text editor, shows this text instead:
<a href="matlab:magic(4)">Generate magic square</a>
Thanks in advance…The output of "diary" echoes what appears in the Command window, except for certain hyperlinks invoked by Matlab. Is there a way to echo literally what appears on the screen instead of code?
For example,
str = sprintf(‘%s%s’, …
‘<a href="matlab:magic(4)">’, …
‘Generate magic square</a>’);
disp(str)
MATLAB displays this in the Command Window:
However, the diary file, when viewed in a text editor, shows this text instead:
<a href="matlab:magic(4)">Generate magic square</a>
Thanks in advance… The output of "diary" echoes what appears in the Command window, except for certain hyperlinks invoked by Matlab. Is there a way to echo literally what appears on the screen instead of code?
For example,
str = sprintf(‘%s%s’, …
‘<a href="matlab:magic(4)">’, …
‘Generate magic square</a>’);
disp(str)
MATLAB displays this in the Command Window:
However, the diary file, when viewed in a text editor, shows this text instead:
<a href="matlab:magic(4)">Generate magic square</a>
Thanks in advance… diary, literal text display, command window MATLAB Answers — New Questions
Microsoft Blocks EWS Access for Kiosk Users
Frontline Workers and Kiosk Accounts Cannot Use Outlook After March 1, 2026
Following Microsoft’s December 2 announcement that they will terminate access to Exchange Web Services (EWS) for kiosk workers starting March 1, 2026, I read a fair amount of totally bland commentary that lacks any insight because it simply repeats what Microsoft announced. Far too many people rush to comment without thinking about the context and technical underpinnings of what’s happening. Let’s try and put some flesh on the bones of this announcement.
As Microsoft notes, they’re in the middle of a plan to remove EWS completely from Microsoft 365. This will happen sometime in October 2026, and in the interim a Microsoft project team is tracking down all the places where EWS is used in products so that the usage can be terminated as quickly as possible. Recently, we’ve seen the roll-out of a new hybrid connectivity app to replace the use of EWS with Graph APIs for rich coexistence between Exchange Server on-premises mailboxes and cloud mailboxes.
We’ve also seen the launch of the Exchange Admin API, a short-term plaster to allow app developers to complete the migration of EWS-based apps like email clients to Graph APIs. I call the API a plaster because it’s simply a REST-based wrapper to allow the apps to run Exchange PowerShell cmdlets to access features where Graph APIs are unavailable. Other people have used less complimentary terms to describe the Exchange Admin API, but let’s be charitable. The API is there to do a short-term job.
Reviewing the Exchange Online Service Description
No job is done until the paperwork is complete. In this case, service descriptions and licenses must be adjusted because these form the legal basis of the delivery of services by Microsoft to its customers. In the course of a review to prepare for the termination of EWS, Microsoft discovered a lacuna (a lovely word) when they realized that the service description for Exchange Online excluded EWS application support for “kiosk” Microsoft 365 licenses, aka frontline F1 and F3 user licenses and the Exchange Online Kiosk license (Figure 1).

EWS application support includes using EWS to access Exchange content via third-party or home-grown apps. By now, those apps should be known and well on the way to being upgraded to use the Graph APIs. Users with frontline licenses don’t need anything else to access Exchange content via Graph APIs.
A Deliberate Exclusion for Frontline Workers
While it might seem odd to exclude frontline workers from using EWS, I think the exclusion in the service description is quite deliberate because frontline licenses were always intended to use browsers or mobile devices to access applications. In this light, no need exists to make EWS available to frontline users because they won’t use Outlook classic on either Windows or Mac (at one stage, Outlook for Mac was built using EWS).
But hold on, frontline Microsoft 365 licenses don’t come with Microsoft Apps for Enterprise (the subscription version of the Office desktop apps), but that doesn’t mean that someone with an F1 or F3 license couldn’t use a licensed copy of Outlook classic (perpetual) to access their mailbox and benefit from EWS.
Footnote 8 in the service description doesn’t mention frontline license holders when it lays out the requirement to connect to Exchange Online with Outlook (the text is a little mangled, but you can understand what it means):
“Connecting an Office 365 E1, Microsoft 365 Business Basic, Microsoft Exchange Online P1 or P2 to Outlook for Windows, classic Outlook for Windows, and Outlook for Mac requires that those applications first be licensed with an account that includes the rights to Microsoft 365 desktop apps.”
No Licensing Block to Stop F1 and F3 Accounts Using EWS
To control access to Exchange Online, Microsoft 365 products include an Exchange service plan. For example, Microsoft 365 F1 includes the Exchange Foundation (113feb6c-3fe4-4440-bddc-54d774bf0318) service plan while Microsoft 365 F3 includes the Exchange Online Kiosk (4a82b400-a79f-41a4-b4e2-e94f5787b113) service plan. See this page for details of service plans and products, or see this PDF for a functionality comparison. The Microsoft 365 F1 license doesn’t include full mailbox access. This product is intended to support Teams calendar access for apps like Shifts.
If an account has the Exchange kiosk service plan or above, it can connect to Exchange Online and use everything made available by the service plan. There’s never been a way to block a mail access protocol like EWS through licensing. Any blocks are implemented further up the stack. For example, by configuring the protocols that a mailbox can use with the Set-CASMailbox cmdlet.
In fact, Exchange Online updates the value of the EWSEnabled setting to $false if an F3 or Exchange Kiosk license is assigned to an account. However, an exception always existed to allow users with kiosk licenses to use EWS because of a dependency on some background apps. Those dependencies have now gone away, and that’s why Microsoft can now impose the block that licensing always said existed. Some ISVs took advantage of the loophole to backup these accounts using EWS, a practice long frowned upon by Microsoft. Those type of backups won’t be possible once the block comes in.
Clearing the Decks
The reason why Microsoft will block EWS access for frontline users starting March 1, 2026, is that Microsoft is clearing the decks to prepare for the final termination of EWS in October 2026. If your organization has frontline worker licenses, it’s a good idea to check if they access any EWS app: first or third-party or home-grown. Otherwise, those folks might get a shock in early March.
Learn about managing Exchange Online and the rest of the Microsoft 365 ecosystem by subscribing to the Office 365 for IT Pros eBook. Use our experience to understand what’s important and how best to protect your tenant.
when I download the matlab R2024a simulink , it always display that occur abnormal condition please try to run the installation program again.
when I download the simulink , it always display that occur abnormal condition please try to run the installation program,my matlab versions is R2024a,and i am a undergraduate student ,I have the lisence , have the installation license. I have try to run as the administrator,and delate the file that its name have the “_temp_matlab_R20XXy_win64”, there also a information that i graduate as a undergraduate and changed the school email address ,I think it may be a question ,so I change the mathwork to graduate student email adress today,but it also can not install successful,how can i do.when I download the simulink , it always display that occur abnormal condition please try to run the installation program,my matlab versions is R2024a,and i am a undergraduate student ,I have the lisence , have the installation license. I have try to run as the administrator,and delate the file that its name have the “_temp_matlab_R20XXy_win64”, there also a information that i graduate as a undergraduate and changed the school email address ,I think it may be a question ,so I change the mathwork to graduate student email adress today,but it also can not install successful,how can i do. when I download the simulink , it always display that occur abnormal condition please try to run the installation program,my matlab versions is R2024a,and i am a undergraduate student ,I have the lisence , have the installation license. I have try to run as the administrator,and delate the file that its name have the “_temp_matlab_R20XXy_win64”, there also a information that i graduate as a undergraduate and changed the school email address ,I think it may be a question ,so I change the mathwork to graduate student email adress today,but it also can not install successful,how can i do. simulink download, matlab, toolboox MATLAB Answers — New Questions
I received the following error:
Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:calllib:MethodNotFound
Method was not found.Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:calllib:MethodNotFound
Method was not found. Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:calllib:MethodNotFound
Method was not found. matlabrc calllib methodnotfound MATLAB Answers — New Questions
inability to open matkab on my laptop after installation
i installed matlab on my laptop(dell), but it did not open and with that, i could not be able to do anything at all, please help me on fixing it thanksi installed matlab on my laptop(dell), but it did not open and with that, i could not be able to do anything at all, please help me on fixing it thanks i installed matlab on my laptop(dell), but it did not open and with that, i could not be able to do anything at all, please help me on fixing it thanks un MATLAB Answers — New Questions
Journey to Passwordless Authentication Might Include Some Bumps
Synched Passkeys and Risky User Remediation for Passwordless Authentication
One of the Microsoft Entra sessions at the Ignite 2025 conference urged attendees to consider moving to passwordless authentication on the basis that it is a phishing-safe and faster method than many types of multifactor authentication. During the demo, the presenters showed how easy it is to create and use passwordless authentication, including a new feature that allows users to create synched passkeys (that part of the session featured several new words, such as “syncability”)
Synched passkeys are a new preview feature. Essentially, instead of device-bound passkeys linked to a specific piece of hardware, such as a FIDO2 key, the passkeys are synchronized with a trusted identity provider like Apple or Google and are therefore available to multiple devices. According Microsoft, synched passkeys are 14 times faster to authenticate than the traditional multifactor authentication setup such as a password and authenticator. I guess that shouldn’t surprise anyone because it’s logical that software can read and use the passkeys quicker than any user can enter their password and then respond to an authentication challenge.
More information is available in this Microsoft video.
Setting Up Synched Passkeys
The Entra admin center released the UX for synched passkeys in mid-November. I had tried to setup synched passkeys with the Apple iCloud Keychain with my iPhone, but no matter what I did, the process failed at the last step.
After attending the session, I tried again, but this time I set up a new passkey profile. Entra provides a default passkey profile to tenants, and that’s what I had been using (after configuring the profile for synched passkeys). I created a new security group as the target for the passkey profile, added my account to the group, and then created the passkey profile. Everything worked and I now have synched passkeys listed in my authentication methods (Figure 1).

Anytime I’m asked to authenticate by Microsoft 365 or another Microsoft cloud service on my iPhone, I can use either the device-bound passkey managed by the Microsoft Authenticator app or the synched passkey in my iCloud keychain. The mechanism really works very nicely.
Adjusting Administrative Processes for Passwordless Users
All of which brings me to discuss the administrative arrangements around passkeys and the passwordless scenarios that passkeys enable. Tenant administrators have been dealing with users and the entertaining ways that they interact with passwords for many years. This is a well-worn road that holds little mystery.
Understanding how to deal with passwordless users takes some adjustment. For instance, take the case when Entra ID Protection flags a user account as highly risky and a conditional access policy blocks access to the account (Figure 2). At this point, the account requires remediation for its risky state. Changing the account password is the usual remediation method, but obviously asking someone to change their account password doesn’t work if they don’t use passwords.

It can be argued that the whole point of passwordless authentication is that accounts are much less likely to be compromised. Passkeys are phishing-resistant, but it’s still possible that an attacker might gain access through a stolen device. In any case, if you assume that something can’t happen, it will.
In this case, the solution is a recent change to conditional access policy settings to require remediation for risky users. Essentially, you deploy a conditional access policy to detect when an account is in the high-risk state. The policy applies to users with passwords and those who are passwordless and forces the user to prove their identity by signing into the tenant. Those with passwords sign in using whatever authentication method is configured for the account and must reset their password to proceed.
Passwordless users can remediate by going through the authentication process using their preferred method (like passkeys) twice. Once this happens, Entra ID is happy that the user is not compromised or otherwise highly risky and reduces their risk state appropriately (Figure 3).

Processes and Procedures Need to Keep Pace
The point here is that as tenant adopt new features and functionality, processes and procedures need to keep pace. In this instance, there’s a compelling logic behind adopting phishing-resistant multifactor authentication for everyone. Remember, any form of multifactor authentication is better than simple passwords and will stop password spray attacks dead. Increasing the strength of multifactor authentication makes your Microsoft 365 tenant secure. If you keep those procedures updated!
Learn how to exploit the data available to Microsoft 365 tenant administrators through the Office 365 for IT Pros eBook. We love figuring out how things work.
Help implementing 4th-order Runge–Kutta for ODEs with Dirac impulses (discontinuous system)
Hello everyone,
I am trying to reproduce the numerical results of a published tumour–immune ODE model that includes Dirac-type impulsive inputs. The system has four coupled variables [U,Y,Z,X][U, Y, Z, X][U,Y,Z,X]. Between injections, the dynamics are continuous, and at each injection time an instantaneous jump is applied to UUU:
Continuous part:
dU/dt = –kYU·U
dY/dt = kYU·U – kEY·Y
dZ/dt = kZY·Y – kEZ·Z
dX/dt = kX·X – kEX·X – η·Y·X·exp(–λ·Z)
At each dose time t=ti:
U(ti+)=U(ti−)+dosei×massi
I have implemented this in MATLAB using two scripts:
A main script, where I loop over the dose times, call ode45 between impulses, and apply the jump in UUU. For example:
% Mouse 1 parameters and initial conditions
y_curr = [M1.U0; M1.Y0; M1.Z0; M1.X0];
t_curr = M1.t0;
for i = 1:length(tDose1)
ti = tDose1(i);
if ti > M1.tend, break; end
% integrate continuously until next dose
[t_seg, Y_seg] = ode45(@(t,y) fM1_fun(t,y,M1), [t_curr ti], y_curr, options);
% store results (code omitted here)
if isempty(t_all1)
t_all1 = t_seg;
Y_all1 = Y_seg;
else
t_all1 = [t_all1; t_seg(2:end,:)];
Y_all1 = [Y_all1; Y_seg(2:end,:)];
end
% state just before the impulse
y_curr = Y_seg(end,:)’;
% apply Dirac-type impulse to U
Mi = mass_fun1(ti); % interpolated mass at ti
ui = uDose1(i); % dose at ti (mg/kg)
y_curr(1) = y_curr(1) + ui * Mi; % jump in U
t_curr = ti;
end
2. ODE function files, one for each parameter set (Mouse 1 and Mouse 2). For example, for Mouse 1:
function dydt = fM1_fun(t,y,M1)
dU = -M1.kYU * y(1);
dY = M1.kYU * y(1) – M1.kEY * y(2);
dZ = M1.kZY * y(2) – M1.kEZ * y(3);
dX = M1.kX * y(4) – M1.kEX * y(4) …
– M1.etaEY * y(2) .* y(4) .* exp(-M1.lambda * y(3));
dydt = [dU; dY; dZ; dX];
end
The code runs without errors and the qualitative behaviour is reasonable, but the resulting trajectories do not match the published figures, even though the ODEs, parameters, dose times, and mass values were reproduced as closely as possible from the article.
Since all variables depend on U(t), any mismatch in handling the discontinuities propagates through the entire system.
I am unsure whether the mismatch is due to solver handling of the discontinuities, or to something subtle in the way I am implementing the impulses.
I would really appreciate if someone could look at this structure and tell me if I am handling the Dirac-type impulses and the splitting of the integration in a correct way for ode45, or if there is anything obviously wrong or missing in this implementation that could explain why my simulated curves do not match the published plots.
Thank you in advance for any help or suggestions.Hello everyone,
I am trying to reproduce the numerical results of a published tumour–immune ODE model that includes Dirac-type impulsive inputs. The system has four coupled variables [U,Y,Z,X][U, Y, Z, X][U,Y,Z,X]. Between injections, the dynamics are continuous, and at each injection time an instantaneous jump is applied to UUU:
Continuous part:
dU/dt = –kYU·U
dY/dt = kYU·U – kEY·Y
dZ/dt = kZY·Y – kEZ·Z
dX/dt = kX·X – kEX·X – η·Y·X·exp(–λ·Z)
At each dose time t=ti:
U(ti+)=U(ti−)+dosei×massi
I have implemented this in MATLAB using two scripts:
A main script, where I loop over the dose times, call ode45 between impulses, and apply the jump in UUU. For example:
% Mouse 1 parameters and initial conditions
y_curr = [M1.U0; M1.Y0; M1.Z0; M1.X0];
t_curr = M1.t0;
for i = 1:length(tDose1)
ti = tDose1(i);
if ti > M1.tend, break; end
% integrate continuously until next dose
[t_seg, Y_seg] = ode45(@(t,y) fM1_fun(t,y,M1), [t_curr ti], y_curr, options);
% store results (code omitted here)
if isempty(t_all1)
t_all1 = t_seg;
Y_all1 = Y_seg;
else
t_all1 = [t_all1; t_seg(2:end,:)];
Y_all1 = [Y_all1; Y_seg(2:end,:)];
end
% state just before the impulse
y_curr = Y_seg(end,:)’;
% apply Dirac-type impulse to U
Mi = mass_fun1(ti); % interpolated mass at ti
ui = uDose1(i); % dose at ti (mg/kg)
y_curr(1) = y_curr(1) + ui * Mi; % jump in U
t_curr = ti;
end
2. ODE function files, one for each parameter set (Mouse 1 and Mouse 2). For example, for Mouse 1:
function dydt = fM1_fun(t,y,M1)
dU = -M1.kYU * y(1);
dY = M1.kYU * y(1) – M1.kEY * y(2);
dZ = M1.kZY * y(2) – M1.kEZ * y(3);
dX = M1.kX * y(4) – M1.kEX * y(4) …
– M1.etaEY * y(2) .* y(4) .* exp(-M1.lambda * y(3));
dydt = [dU; dY; dZ; dX];
end
The code runs without errors and the qualitative behaviour is reasonable, but the resulting trajectories do not match the published figures, even though the ODEs, parameters, dose times, and mass values were reproduced as closely as possible from the article.
Since all variables depend on U(t), any mismatch in handling the discontinuities propagates through the entire system.
I am unsure whether the mismatch is due to solver handling of the discontinuities, or to something subtle in the way I am implementing the impulses.
I would really appreciate if someone could look at this structure and tell me if I am handling the Dirac-type impulses and the splitting of the integration in a correct way for ode45, or if there is anything obviously wrong or missing in this implementation that could explain why my simulated curves do not match the published plots.
Thank you in advance for any help or suggestions. Hello everyone,
I am trying to reproduce the numerical results of a published tumour–immune ODE model that includes Dirac-type impulsive inputs. The system has four coupled variables [U,Y,Z,X][U, Y, Z, X][U,Y,Z,X]. Between injections, the dynamics are continuous, and at each injection time an instantaneous jump is applied to UUU:
Continuous part:
dU/dt = –kYU·U
dY/dt = kYU·U – kEY·Y
dZ/dt = kZY·Y – kEZ·Z
dX/dt = kX·X – kEX·X – η·Y·X·exp(–λ·Z)
At each dose time t=ti:
U(ti+)=U(ti−)+dosei×massi
I have implemented this in MATLAB using two scripts:
A main script, where I loop over the dose times, call ode45 between impulses, and apply the jump in UUU. For example:
% Mouse 1 parameters and initial conditions
y_curr = [M1.U0; M1.Y0; M1.Z0; M1.X0];
t_curr = M1.t0;
for i = 1:length(tDose1)
ti = tDose1(i);
if ti > M1.tend, break; end
% integrate continuously until next dose
[t_seg, Y_seg] = ode45(@(t,y) fM1_fun(t,y,M1), [t_curr ti], y_curr, options);
% store results (code omitted here)
if isempty(t_all1)
t_all1 = t_seg;
Y_all1 = Y_seg;
else
t_all1 = [t_all1; t_seg(2:end,:)];
Y_all1 = [Y_all1; Y_seg(2:end,:)];
end
% state just before the impulse
y_curr = Y_seg(end,:)’;
% apply Dirac-type impulse to U
Mi = mass_fun1(ti); % interpolated mass at ti
ui = uDose1(i); % dose at ti (mg/kg)
y_curr(1) = y_curr(1) + ui * Mi; % jump in U
t_curr = ti;
end
2. ODE function files, one for each parameter set (Mouse 1 and Mouse 2). For example, for Mouse 1:
function dydt = fM1_fun(t,y,M1)
dU = -M1.kYU * y(1);
dY = M1.kYU * y(1) – M1.kEY * y(2);
dZ = M1.kZY * y(2) – M1.kEZ * y(3);
dX = M1.kX * y(4) – M1.kEX * y(4) …
– M1.etaEY * y(2) .* y(4) .* exp(-M1.lambda * y(3));
dydt = [dU; dY; dZ; dX];
end
The code runs without errors and the qualitative behaviour is reasonable, but the resulting trajectories do not match the published figures, even though the ODEs, parameters, dose times, and mass values were reproduced as closely as possible from the article.
Since all variables depend on U(t), any mismatch in handling the discontinuities propagates through the entire system.
I am unsure whether the mismatch is due to solver handling of the discontinuities, or to something subtle in the way I am implementing the impulses.
I would really appreciate if someone could look at this structure and tell me if I am handling the Dirac-type impulses and the splitting of the integration in a correct way for ode45, or if there is anything obviously wrong or missing in this implementation that could explain why my simulated curves do not match the published plots.
Thank you in advance for any help or suggestions. #bioinformatic #ode #rungekutta #dirac MATLAB Answers — New Questions
how to draw voronoi cells of each vertex bounded inside an area and obtain the values of each of the cell areas independently?
how to draw voronoi cells of each vertex bounded inside an area and obtain the values of each of the cell areas independently?how to draw voronoi cells of each vertex bounded inside an area and obtain the values of each of the cell areas independently? how to draw voronoi cells of each vertex bounded inside an area and obtain the values of each of the cell areas independently? voronoi MATLAB Answers — New Questions
Export setup style replacement
This question says that the Export Setup dialog has been deprecated:
https://www.mathworks.com/matlabcentral/answers/2178487-how-can-i-access-the-export-setup-dialog-for-modifying-figures-before-export-in-matlab-r2025a
Over the years I have built up a library of export setup styles customized for different journal and conference settings (figure sizes, font sizes, resolution, line widths, etc). This has been an essential part of my workflow, allowing me to consistently reproduce figures for different targets without manual tweaking. The suggested replacement, uiexportdlg does not have the same granularity of control, nor the ability to save profiles. Is there an alternative that is closer to Export Setup capabilities?This question says that the Export Setup dialog has been deprecated:
https://www.mathworks.com/matlabcentral/answers/2178487-how-can-i-access-the-export-setup-dialog-for-modifying-figures-before-export-in-matlab-r2025a
Over the years I have built up a library of export setup styles customized for different journal and conference settings (figure sizes, font sizes, resolution, line widths, etc). This has been an essential part of my workflow, allowing me to consistently reproduce figures for different targets without manual tweaking. The suggested replacement, uiexportdlg does not have the same granularity of control, nor the ability to save profiles. Is there an alternative that is closer to Export Setup capabilities? This question says that the Export Setup dialog has been deprecated:
https://www.mathworks.com/matlabcentral/answers/2178487-how-can-i-access-the-export-setup-dialog-for-modifying-figures-before-export-in-matlab-r2025a
Over the years I have built up a library of export setup styles customized for different journal and conference settings (figure sizes, font sizes, resolution, line widths, etc). This has been an essential part of my workflow, allowing me to consistently reproduce figures for different targets without manual tweaking. The suggested replacement, uiexportdlg does not have the same granularity of control, nor the ability to save profiles. Is there an alternative that is closer to Export Setup capabilities? uiexportdlg, exportsetupdlg MATLAB Answers — New Questions
im facing problem in sepaarte touching objects
import cv2
import numpy as np
import os
output_folder = r"E:grains_output"
# Create the folder if it doesn’t exist
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# Example: saving an image
img = cv2.imread(r"C:UsersDixuDownloadstest1.png") # your grain image
if img is None:
print("Error: Image not found! Check the path and filename.")
exit()
else:
print("Image loaded successfully!")
cv2.imwrite(os.path.join(output_folder, "segmented.png"), img)
# FUNCTION: Separate grains using COLOR segmentation (HSV
def separate_grains(image_path):
print("Loading:", image_path)
img = cv2.imread(image_path)
if img is None:
print("Error: image not found!")
return None, None
# Convert to HSV
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# Yellow grains range
lower = np.array([15, 40, 60])
upper = np.array([40, 255, 255])
# Mask grains
mask = cv2.inRange(hsv, lower, upper)
# Morphology cleanup
kernel = np.ones((5, 5), np.uint8)
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=3)
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=2)
# Convert mask to binary
ret, thresh = cv2.threshold(mask, 0, 255, cv2.THRESH_BINARY)
# Noise removal
kernel = np.ones((3, 3), np.uint8)
opening = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, kernel, iterations=2)
# Sure background area
sure_bg = cv2.dilate(opening, kernel, iterations=3)
# Sure foreground area
dist_transform = cv2.distanceTransform(opening, cv2.DIST_L2, 5)
ret, sure_fg = cv2.threshold(dist_transform, 0.6 * dist_transform.max(), 255, 0)
# Unknown region
sure_fg = np.uint8(sure_fg)
unknown = cv2.subtract(sure_bg, sure_fg)
# Marker labeling
ret, markers = cv2.connectedComponents(sure_fg)
markers = markers + 1 # background = 1
markers[unknown == 255] = 0
# Apply watershed
markers = cv2.watershed(img, markers)
mask[markers == -1] = 0 # boundaries
return mask, img
def save_grains(mask, img):
# print("Saving grains…")
output_dir = output_folder # Use the folder defined at the top
os.makedirs(output_dir, exist_ok=True)
# Find contours
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
grain_id = 1
for cnt in contours:
x, y, w, h = cv2.boundingRect(cnt)
if w < 10 or h < 10:
continue
grain = img[y:y + h, x:x + w]
filename = os.path.join(output_dir, f"grain_{grain_id}.png")
cv2.imwrite(filename, grain)
print("Saved:", filename)
grain_id += 1
print("nAll grains saved inside folder:", output_dir)
# Draw contours on a copy of the original image
result = img.copy()
cv2.drawContours(result, contours, -1, (0, 0, 255), 2)
# Save the segmented image
segmented_path = os.path.join(output_dir, "segmented_contours.png")
cv2.imwrite(segmented_path, result)
print("Segmented image with contours saved as:", segmented_path)
return result
# ———————————————————
# MAIN EXECUTION
# ———————————————————
if __name__ == "__main__":
# print("Current working directory:", os.getcwd())
mask, img = separate_grains(r"C:UsersDixuDownloadstest1.png")
if mask is not None:
result_img = save_grains(mask, img)
# # Show results
# cv2.namedWindow("Mask", cv2.WINDOW_NORMAL)
# cv2.resizeWindow("Mask", 600, 500)
# cv2.imshow("Mask", mask)
cv2.namedWindow("Segmented Image", cv2.WINDOW_NORMAL)
cv2.resizeWindow("Segmented Image", 600, 500)
cv2.imshow("Segmented Image", result_img)
cv2.waitKey(0)
cv2.destroyAllWindows()import cv2
import numpy as np
import os
output_folder = r"E:grains_output"
# Create the folder if it doesn’t exist
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# Example: saving an image
img = cv2.imread(r"C:UsersDixuDownloadstest1.png") # your grain image
if img is None:
print("Error: Image not found! Check the path and filename.")
exit()
else:
print("Image loaded successfully!")
cv2.imwrite(os.path.join(output_folder, "segmented.png"), img)
# FUNCTION: Separate grains using COLOR segmentation (HSV
def separate_grains(image_path):
print("Loading:", image_path)
img = cv2.imread(image_path)
if img is None:
print("Error: image not found!")
return None, None
# Convert to HSV
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# Yellow grains range
lower = np.array([15, 40, 60])
upper = np.array([40, 255, 255])
# Mask grains
mask = cv2.inRange(hsv, lower, upper)
# Morphology cleanup
kernel = np.ones((5, 5), np.uint8)
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=3)
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=2)
# Convert mask to binary
ret, thresh = cv2.threshold(mask, 0, 255, cv2.THRESH_BINARY)
# Noise removal
kernel = np.ones((3, 3), np.uint8)
opening = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, kernel, iterations=2)
# Sure background area
sure_bg = cv2.dilate(opening, kernel, iterations=3)
# Sure foreground area
dist_transform = cv2.distanceTransform(opening, cv2.DIST_L2, 5)
ret, sure_fg = cv2.threshold(dist_transform, 0.6 * dist_transform.max(), 255, 0)
# Unknown region
sure_fg = np.uint8(sure_fg)
unknown = cv2.subtract(sure_bg, sure_fg)
# Marker labeling
ret, markers = cv2.connectedComponents(sure_fg)
markers = markers + 1 # background = 1
markers[unknown == 255] = 0
# Apply watershed
markers = cv2.watershed(img, markers)
mask[markers == -1] = 0 # boundaries
return mask, img
def save_grains(mask, img):
# print("Saving grains…")
output_dir = output_folder # Use the folder defined at the top
os.makedirs(output_dir, exist_ok=True)
# Find contours
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
grain_id = 1
for cnt in contours:
x, y, w, h = cv2.boundingRect(cnt)
if w < 10 or h < 10:
continue
grain = img[y:y + h, x:x + w]
filename = os.path.join(output_dir, f"grain_{grain_id}.png")
cv2.imwrite(filename, grain)
print("Saved:", filename)
grain_id += 1
print("nAll grains saved inside folder:", output_dir)
# Draw contours on a copy of the original image
result = img.copy()
cv2.drawContours(result, contours, -1, (0, 0, 255), 2)
# Save the segmented image
segmented_path = os.path.join(output_dir, "segmented_contours.png")
cv2.imwrite(segmented_path, result)
print("Segmented image with contours saved as:", segmented_path)
return result
# ———————————————————
# MAIN EXECUTION
# ———————————————————
if __name__ == "__main__":
# print("Current working directory:", os.getcwd())
mask, img = separate_grains(r"C:UsersDixuDownloadstest1.png")
if mask is not None:
result_img = save_grains(mask, img)
# # Show results
# cv2.namedWindow("Mask", cv2.WINDOW_NORMAL)
# cv2.resizeWindow("Mask", 600, 500)
# cv2.imshow("Mask", mask)
cv2.namedWindow("Segmented Image", cv2.WINDOW_NORMAL)
cv2.resizeWindow("Segmented Image", 600, 500)
cv2.imshow("Segmented Image", result_img)
cv2.waitKey(0)
cv2.destroyAllWindows() import cv2
import numpy as np
import os
output_folder = r"E:grains_output"
# Create the folder if it doesn’t exist
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# Example: saving an image
img = cv2.imread(r"C:UsersDixuDownloadstest1.png") # your grain image
if img is None:
print("Error: Image not found! Check the path and filename.")
exit()
else:
print("Image loaded successfully!")
cv2.imwrite(os.path.join(output_folder, "segmented.png"), img)
# FUNCTION: Separate grains using COLOR segmentation (HSV
def separate_grains(image_path):
print("Loading:", image_path)
img = cv2.imread(image_path)
if img is None:
print("Error: image not found!")
return None, None
# Convert to HSV
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# Yellow grains range
lower = np.array([15, 40, 60])
upper = np.array([40, 255, 255])
# Mask grains
mask = cv2.inRange(hsv, lower, upper)
# Morphology cleanup
kernel = np.ones((5, 5), np.uint8)
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=3)
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=2)
# Convert mask to binary
ret, thresh = cv2.threshold(mask, 0, 255, cv2.THRESH_BINARY)
# Noise removal
kernel = np.ones((3, 3), np.uint8)
opening = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, kernel, iterations=2)
# Sure background area
sure_bg = cv2.dilate(opening, kernel, iterations=3)
# Sure foreground area
dist_transform = cv2.distanceTransform(opening, cv2.DIST_L2, 5)
ret, sure_fg = cv2.threshold(dist_transform, 0.6 * dist_transform.max(), 255, 0)
# Unknown region
sure_fg = np.uint8(sure_fg)
unknown = cv2.subtract(sure_bg, sure_fg)
# Marker labeling
ret, markers = cv2.connectedComponents(sure_fg)
markers = markers + 1 # background = 1
markers[unknown == 255] = 0
# Apply watershed
markers = cv2.watershed(img, markers)
mask[markers == -1] = 0 # boundaries
return mask, img
def save_grains(mask, img):
# print("Saving grains…")
output_dir = output_folder # Use the folder defined at the top
os.makedirs(output_dir, exist_ok=True)
# Find contours
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
grain_id = 1
for cnt in contours:
x, y, w, h = cv2.boundingRect(cnt)
if w < 10 or h < 10:
continue
grain = img[y:y + h, x:x + w]
filename = os.path.join(output_dir, f"grain_{grain_id}.png")
cv2.imwrite(filename, grain)
print("Saved:", filename)
grain_id += 1
print("nAll grains saved inside folder:", output_dir)
# Draw contours on a copy of the original image
result = img.copy()
cv2.drawContours(result, contours, -1, (0, 0, 255), 2)
# Save the segmented image
segmented_path = os.path.join(output_dir, "segmented_contours.png")
cv2.imwrite(segmented_path, result)
print("Segmented image with contours saved as:", segmented_path)
return result
# ———————————————————
# MAIN EXECUTION
# ———————————————————
if __name__ == "__main__":
# print("Current working directory:", os.getcwd())
mask, img = separate_grains(r"C:UsersDixuDownloadstest1.png")
if mask is not None:
result_img = save_grains(mask, img)
# # Show results
# cv2.namedWindow("Mask", cv2.WINDOW_NORMAL)
# cv2.resizeWindow("Mask", 600, 500)
# cv2.imshow("Mask", mask)
cv2.namedWindow("Segmented Image", cv2.WINDOW_NORMAL)
cv2.resizeWindow("Segmented Image", 600, 500)
cv2.imshow("Segmented Image", result_img)
cv2.waitKey(0)
cv2.destroyAllWindows() python, cv2, image processing, image segmentation MATLAB Answers — New Questions
Talking Microsoft 365 Compliance at the European SharePoint Conference
Three Important Microsoft 365 Compliance Topics for SharePoint Online

Yesterday, I was at the European SharePoint Conference (ESPC) at the National Conference Center in Dublin. It’s always nice to have a chance to participate in an event in your hometown, and this was no different.
Paul Robichaux and I took on the challenge of speaking about some major recent changes inside Microsoft 365 that are of interest to compliance practitioners. Given the heavy SharePoint focus of the conference, it made sense to select Microsoft 365 compliance topics related to SharePoint Online. We selected:
- The introduction of intelligent versioning within SharePoint Online.
- Microsoft Purview Priority Cleanup for SharePoint Online and Exchange Online.
- The resigned Purview eDiscovery.
Intelligent Versioning
Intelligent versioning has been around for about 18 months now. It addresses the side effect of innovations like AutoSave and co-authoring for Office files that result in an explosion of file versions. The manual approach to managing file versions simply removes versions after a certain number of versions is accumulated. Intelligent versioning figures out which versions are needed for recovery and “trims” the other versions (deletes the files after a period). Intelligent versioning is also available for OneDrive for Business accounts.
Figure 1 is an example of intelligent versioning in action. Only three of the 16 versions shown for a Word document are marked as “never expires,” meaning that they are being kept for recovery. The other 13 versions are assigned dates when SharePoint believes it safe to delete the versions. Each version is 2.1 MB, so being able to remove 13 versions saves 27.3 MB out of the total 33.6 MB required for the full set.

Microsoft says that intelligent versioning can reduce the amount of storage used to keep versions by 94%. That sounds outlandish, but one of the attendees at our talk said that their tenant had saved hundreds of terabytes by implementing intelligent versioning. That was a great result, but it was only possible because retention policies didn’t apply to the sites that had intelligent versioning turned on. Retention is all about keeping files, so the desire of intelligent versioning to remove unwanted versions runs contrary to the need to keep data. The result is that intelligent versioning can mark versions for deletion, but no versions are ever removed.
Priority Cleanup
Purview Priority Cleanup is a solution to remove email and files even if those items are held for retention. There was a lot of interest in the room about Priority Cleanup, which is now generally available for SharePoint Online and in preview for Exchange Online. I’m working on an in-depth article about running Priority Cleanup for SharePoint Online, specifically to remove unwanted file versions stored in the preservation hold library.
Microsoft changed the way that SharePoint stores file versions in the preservation hold library in 2023 to adopt a more efficient mechanism. However, there’s a bunch of old files cluttering up preservation hold libraries that occupy valuable SharePoint storage (Figure 2). Removing old files that aren’t needed any longer from the preservation hold library has the dual benefit of releasing storage for better use and also eliminating some old and probably obsolete information that might otherwise be picked up by Microsoft 365 Copilot.

eDiscovery Revamp
Although Priority Cleanup can override retention holds, it cannot remove items that are subject to eDiscovery holds. In other words, an active eDiscovery case is in progress, and the item has been found and held as being of interest to the investigation. This brought us to the topic of the massive revamp Microsoft delivered for the Purview eDiscovery solution recently/
We didn’t have enough time to cover eDiscovery in any depth but chose to mention the topic to underline the two facts that Microsoft 365 technology changes all the time and a change made in one solution can affect or interact with other areas of the ecosystem.
Lots of Interest in Microsoft 365 Compliance
Going into the session, Paul and I thought that we’d be lucky if twenty people turned up because there were many other compelling sessions listed on the ESPC schedule for the same time. Instead, we had a full room with standing room only at the back. I guess we live in a world of increasing regulation and that interest shone through from our audience. Maybe we should have asked for a bigger room…
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
App-Only Authentication for SharePoint Online PowerShell
Using App-Only Authentication with SharePoint Online PowerShell
I’ve often expressed concern about the lack of development effort Microsoft puts into the SharePoint Online management PowerShell module. Apart from updating important cmdlets like Set-SPOTenant or Set-SPOSite to add new settings for the tenant or sites, Microsoft hasn’t invested much effort to bring the module forward. For instance, although the module can be run in the latest version of PowerShell core (I use V7.5.4), SharePoint is still a Windows PowerShell module.
Then the welcome news from message center notification MC1188595 appeared on 21 November 2025 to announce that the SharePoint Online module now supports certificate-based authentication (CBA), or app-only authentication. No doubt some pressure from Microsoft’s current security initiative persuaded some action to move away from a dependency on user credentials. As Microsoft says:
“This update addresses the business need for secure, unattended automation in environments where (for example) Multi-Factor Authentication (MFA) is enforced. With this enhancement, customers can run automation scripts using app identities, ensuring compliance with security policies while maintaining operational efficiency.”
Graph APIs are Usually a Better Automation Option
I’m not sure that I have ever used the SharePoint Online module for unattended automation. In many situations, the Graph API is a much better choice, especially when using a managed identity with Azure Automation to run background jobs. The SharePoint developers recently added the ability to create new sites via a Create Site Graph API. It’s been possible to create sites used for Microsoft 365 groups and teams for several years, so the update fixes a gap for communication and other site types. The Graph APIs have an important advantage over the SharePoint PowerShell module in that the APIs can work with user data, like files stored in document libraries, SharePoint lists, and SharePoint pages, or even report usage information.
Microsoft added a SharePoint Admin API to the Graph in 2023 but hasn’t done anything with it since. Perhaps the feeling was that SharePoint administrative operations such as updating settings are largely once-off events that can be performed through the admin center.
Using App-Only Authentication
But now we have app-only authentication. Details of the required setup are available in Microsoft documentation, so I won’t repeat them here. Make sure to update Windows PowerShell with the latest version of the SharePoint Online module. I used version 16.0.2712.1200.
In terms of setting up the app, remember that the source for granting authority to access SharePoint Online is the Office 365 SharePoint Online app rather than the Microsoft Graph. Make sure that you select the Sites.FullControl.All permission from the SharePoint Online rather than the Graph when you assign the permission to the app (Figure 1).

After that, you can upload a self-signed X.509 certificate to the app and note the certificate thumbprint. Make sure that the certificate is loaded into a certificate store. For the purposes of testing, I use the Import-Certificate cmdlet to import the certificate into the root store for my account.
With everything ready, I adapted my usual method to connect to SharePoint Online with PowerShell Core to use app-only authentication. The code uses the Microsoft Graph PowerShell SDK to find the default domain for the tenant, creates the SharePoint admin endpoint, and calls the Connect-SPOService cmdlet to connect (using app-only authentication):
# Connect to SharePoint Online
[array]$Domains = (Get-MgOrganization).verifiedDomains
$DefaultDomain = $Domains | Where-Object {$_.IsDefault -eq $true}
$SPOAdminRoot = ("https://{0}-admin.sharepoint.com" -f $DefaultDomain.Name.split('.')[0])
Write-Host "Connecting to SharePoint Online..."
Import-Module Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell
Connect-SPOService -Url $SPOAdminRoot -TenantId $TenantId -ApplicationId $AppId -CertificateThumbprint $Thumbprint
Once successfully connected, the app-only session can run all SharePoint Online cmdlets as if a human SharePoint Online administrator had signed in to authenticate. There’s not much more else to say.
A Step Forward
In the message center post, Microsoft notes that “there could be rare cases where an API needs an explicit user token for security reasons. In such cases, tenant admins should use interactive flows with admin/user credentials.” I guess that it’s hard to test every single cmdlet with every valid combination of parameters to find where those rare cases exist. Good luck!
Need help to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
How can I use the AMD Optimizing CPU Libraries (AOCL) with MATLAB for windows?
My CPU is amd 9900X3D, GPU is RTX5070, Windows11 25H2
To use the AMD optimization in MATLAB, I have already see the Q&A for this link:’How can I use the BLAS and LAPACK implementations included in AMD Optimizing CPU Libraries (AOCL) with MATLAB R2022a? – MATLAB Answers – MATLAB Central’
Then I install the AOCL5.0 in this link:’AMD Optimizing CPU Libraries EULA 5.1′
Follow the tutorial in the text,I found matlab error:
———————————————————————————————–
version -blas, version -lapack
BLAS: trying environment BLAS_VERSION…
BLAS: loading AOCL-LibBlis-Win-MT-dll.dll
BLAS: unloading libraries
错误使用 matlab.lang.internal.versionPlugins.blas
BLAS 加载错误:
AOCL-LibBlis-Win-MT-dll.dll: 找不到指定的模块。
————————————————————–
Is this because my OS is Windows? and how to solve it?
Thank uMy CPU is amd 9900X3D, GPU is RTX5070, Windows11 25H2
To use the AMD optimization in MATLAB, I have already see the Q&A for this link:’How can I use the BLAS and LAPACK implementations included in AMD Optimizing CPU Libraries (AOCL) with MATLAB R2022a? – MATLAB Answers – MATLAB Central’
Then I install the AOCL5.0 in this link:’AMD Optimizing CPU Libraries EULA 5.1′
Follow the tutorial in the text,I found matlab error:
———————————————————————————————–
version -blas, version -lapack
BLAS: trying environment BLAS_VERSION…
BLAS: loading AOCL-LibBlis-Win-MT-dll.dll
BLAS: unloading libraries
错误使用 matlab.lang.internal.versionPlugins.blas
BLAS 加载错误:
AOCL-LibBlis-Win-MT-dll.dll: 找不到指定的模块。
————————————————————–
Is this because my OS is Windows? and how to solve it?
Thank u My CPU is amd 9900X3D, GPU is RTX5070, Windows11 25H2
To use the AMD optimization in MATLAB, I have already see the Q&A for this link:’How can I use the BLAS and LAPACK implementations included in AMD Optimizing CPU Libraries (AOCL) with MATLAB R2022a? – MATLAB Answers – MATLAB Central’
Then I install the AOCL5.0 in this link:’AMD Optimizing CPU Libraries EULA 5.1′
Follow the tutorial in the text,I found matlab error:
———————————————————————————————–
version -blas, version -lapack
BLAS: trying environment BLAS_VERSION…
BLAS: loading AOCL-LibBlis-Win-MT-dll.dll
BLAS: unloading libraries
错误使用 matlab.lang.internal.versionPlugins.blas
BLAS 加载错误:
AOCL-LibBlis-Win-MT-dll.dll: 找不到指定的模块。
————————————————————–
Is this because my OS is Windows? and how to solve it?
Thank u amd, matlab, acol MATLAB Answers — New Questions
“Unable to update data tip using custom update function”
Hey guys, when I make the custom text function for dataCursorMode it keeps on showing this when clicking on the marker on the plot
Here is the code for the plot
function WinChampgraph_team_selector
data2 = readtable("alltimeteams.xlsx",’VariableNamingRule’,’preserve’);
% Calculate the win percentage for each team
winPercent = (data2.Wins ./ (data2.Wins + data2.Losses));
hold on
graph = plot(winPercent, data2.Championships,"LineStyle","none","Color","r","Marker","*");
dcm = datacursormode;
dcm.Enable = ‘on’;
dcm.UpdateFcn = @displayteam;
getCursorInfo(dcm);
displayteam(data2);
xlabel(‘Win Percentage’);
ylabel(‘Championships’);
title(‘Team performance since the beginning of the NBA’);
grid on;
set(gcf,’Position’,[50,500,700,500])
end
Here is the code for the custom text function
function txt = displayteam(data3)
x = data3.Franchise;
y = (data3.Wins ./ (data3.Wins + data3.Losses));
myDatatipText = "(%s, %s, %s)";
txt = sprintf(myDatatipText, string(x), string(y),data3.Championships);
end
Then it shows this on the plot
Unable to update data tip using custom update function
Please lmk is anything else is neededHey guys, when I make the custom text function for dataCursorMode it keeps on showing this when clicking on the marker on the plot
Here is the code for the plot
function WinChampgraph_team_selector
data2 = readtable("alltimeteams.xlsx",’VariableNamingRule’,’preserve’);
% Calculate the win percentage for each team
winPercent = (data2.Wins ./ (data2.Wins + data2.Losses));
hold on
graph = plot(winPercent, data2.Championships,"LineStyle","none","Color","r","Marker","*");
dcm = datacursormode;
dcm.Enable = ‘on’;
dcm.UpdateFcn = @displayteam;
getCursorInfo(dcm);
displayteam(data2);
xlabel(‘Win Percentage’);
ylabel(‘Championships’);
title(‘Team performance since the beginning of the NBA’);
grid on;
set(gcf,’Position’,[50,500,700,500])
end
Here is the code for the custom text function
function txt = displayteam(data3)
x = data3.Franchise;
y = (data3.Wins ./ (data3.Wins + data3.Losses));
myDatatipText = "(%s, %s, %s)";
txt = sprintf(myDatatipText, string(x), string(y),data3.Championships);
end
Then it shows this on the plot
Unable to update data tip using custom update function
Please lmk is anything else is needed Hey guys, when I make the custom text function for dataCursorMode it keeps on showing this when clicking on the marker on the plot
Here is the code for the plot
function WinChampgraph_team_selector
data2 = readtable("alltimeteams.xlsx",’VariableNamingRule’,’preserve’);
% Calculate the win percentage for each team
winPercent = (data2.Wins ./ (data2.Wins + data2.Losses));
hold on
graph = plot(winPercent, data2.Championships,"LineStyle","none","Color","r","Marker","*");
dcm = datacursormode;
dcm.Enable = ‘on’;
dcm.UpdateFcn = @displayteam;
getCursorInfo(dcm);
displayteam(data2);
xlabel(‘Win Percentage’);
ylabel(‘Championships’);
title(‘Team performance since the beginning of the NBA’);
grid on;
set(gcf,’Position’,[50,500,700,500])
end
Here is the code for the custom text function
function txt = displayteam(data3)
x = data3.Franchise;
y = (data3.Wins ./ (data3.Wins + data3.Losses));
myDatatipText = "(%s, %s, %s)";
txt = sprintf(myDatatipText, string(x), string(y),data3.Championships);
end
Then it shows this on the plot
Unable to update data tip using custom update function
Please lmk is anything else is needed plot MATLAB Answers — New Questions









