Author: PuTI
Find specified number of points on curve with identical chord length (not arc length)
Hello!
I have the user draw a line and obtain the points on that line:
% Load example image
I = imread(‘peppers.png’);
imshow(I)
% Draw line
roi = drawassisted(‘Closed’, false);
% Obtain positions of points
points_input = roi.Position;
% Number of target points
num_points_target = 10;
% Find these
points_output
I want to find a specified number of points (num_points_target) along the described curve, so that the chord length between the outputs points (points_output) would be identical. I am specifically looking for chord length, not arc length. I have seen this but it uses arc length ( https://uk.mathworks.com/matlabcentral/fileexchange/34874-interparc/files/interparc.m ).
I assume some interpolation – linear would likely be okay – would be in order as, depending on the drawing speed, the points_input might not be spaced very evenly.
Code would obviously be great but if someone felt like just explaining the mathematical approach to this, that would already be very helpful. At the moment, I think I would be able to cobble something dreadful with many loops together myself but it seems to me that there must be an elegant solution to this problem surely.Hello!
I have the user draw a line and obtain the points on that line:
% Load example image
I = imread(‘peppers.png’);
imshow(I)
% Draw line
roi = drawassisted(‘Closed’, false);
% Obtain positions of points
points_input = roi.Position;
% Number of target points
num_points_target = 10;
% Find these
points_output
I want to find a specified number of points (num_points_target) along the described curve, so that the chord length between the outputs points (points_output) would be identical. I am specifically looking for chord length, not arc length. I have seen this but it uses arc length ( https://uk.mathworks.com/matlabcentral/fileexchange/34874-interparc/files/interparc.m ).
I assume some interpolation – linear would likely be okay – would be in order as, depending on the drawing speed, the points_input might not be spaced very evenly.
Code would obviously be great but if someone felt like just explaining the mathematical approach to this, that would already be very helpful. At the moment, I think I would be able to cobble something dreadful with many loops together myself but it seems to me that there must be an elegant solution to this problem surely. Hello!
I have the user draw a line and obtain the points on that line:
% Load example image
I = imread(‘peppers.png’);
imshow(I)
% Draw line
roi = drawassisted(‘Closed’, false);
% Obtain positions of points
points_input = roi.Position;
% Number of target points
num_points_target = 10;
% Find these
points_output
I want to find a specified number of points (num_points_target) along the described curve, so that the chord length between the outputs points (points_output) would be identical. I am specifically looking for chord length, not arc length. I have seen this but it uses arc length ( https://uk.mathworks.com/matlabcentral/fileexchange/34874-interparc/files/interparc.m ).
I assume some interpolation – linear would likely be okay – would be in order as, depending on the drawing speed, the points_input might not be spaced very evenly.
Code would obviously be great but if someone felt like just explaining the mathematical approach to this, that would already be very helpful. At the moment, I think I would be able to cobble something dreadful with many loops together myself but it seems to me that there must be an elegant solution to this problem surely. chord length, even spacing MATLAB Answers — New Questions
Error using bvp4c: “Warning: Unable to meet the tolerance without using more than 5000 mesh points. The last mesh of 4921 points and the solution are available in the output argument.”
Hello,
I’m using bvp4c to solve for a reaction-diffusion equation. When I set the initial concentration to 100, I get this error saying
"Warning: Unable to meet the tolerance without using more than 5000 mesh points.
The last mesh of 4921 points and the solution are available in the output argument.
The maximum residual is 0.512336, while requested accuracy is 0.001.
> In bvp4c (line 323)
In steady_state_bvp4c_FINAL (line 38)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 44)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 50) "
Am I setting my boundary conditions incorrectly? I want the left hand side (at x = 0, C_L = C_L0) and on the right hand side I want the flux to equal to 0 (at x = x_f, dC_L/dx = 0).
function steady_state_bvp4c_FINAL
clear all; clc;
%Diffusion coefficient
D_ij = 30; %3.0*10^-7 cm^2/s -> 30 um^2/s
%Initial concentration at x=0
L0 = 100;
%Total length
x_f = 3500;
%Rate constants
k_1 = 0.00193;
k_2 = 0.00255;
k_3 = 4.09;
d_1 = 0.007;
d_2 = 3.95*10^-5;
d_3 = 2.26;
%Equilibrium constants
K_1 = 3.63;
K_2 = 0.0155;
K_3 = 0.553;
K_4 = 9.01;
K_i = 0.139;
%Total Receptors
N_T =1.7;
L = L0./2;
solinit = bvpinit(linspace(0,x_f,11),[L 0]);
sol = bvp4c(@(x,y)odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T),@twobc,solinit);
figure(1)
plot(sol.x,(sol.y(1,:)),’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Concentration (nM)’)
axis([0 x_f 0 L0])
figure(2)
plot(sol.x,(sol.y(1,:))./L0,’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Normalized Concentration (C_L/C_L_0)’)
axis([0 x_f 0 1])
function dy = odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T)
C_L = y(1);
dC_Ldx = y(2);
N_r = (-1 – (C_L./K_1) + sqrt((-1 – (C_L./K_1)).^2 -4.*(-(2./K_4) – ((2.*C_L)./(K_2.*K_4)) – ((2.*C_L)./(K_2.*K_4.*K_i)) – ((2.*C_L.^2)/(K_2.*K_3.*K_4.*K_i))).*N_T))/(4.*((1./K_4) + (C_L./(K_2.*K_4)) + (C_L./(K_2.*K_4.*K_i)) + (C_L.^2./(K_2.*K_3.*K_4.*K_i))));
N_R = (C_L./K_1).*N_r;
N_r2 = (1./K_4).*(N_r).^2;
N_rR = (C_L./(2.*K_2.*K_4)).*(N_r).^2;
N_pR = (C_L./(2.*K_2.*K_4.*K_i)).*(N_r).^2;
N_R2 = ((C_L.^2)./(K_2.*K_3.*K_4.*K_i)).*(N_r).^2;
r = N_T-(2.*N_R2)-(4.*N_pR)-N_R-(4.*N_rR)-(2.*N_r2);
R = N_T-(2.*N_R2)-(4.*N_pR)-N_r-(4.*N_rR)-(2.*N_r2);
r_2 = (N_T./2)-(N_R./2)-N_R2-(2.*N_pR)-(N_r./2)-(2.*N_rR);
rR = (N_T./4)-(N_R./4)-(N_R2./2)-N_pR-(N_r./4)-(N_r2./2);
pR = (N_T./4)-(N_R./4)-(N_R2./2)-(N_r./4)-N_rR-(N_r2./2);
R_2 = (N_T./2)-(N_R./2)-(2.*N_pR)-(N_r./2)-(2.*N_rR)-N_r2;
R_L = (2.*d_1.*(R))-(2.*k_1.*C_L.*r)+…
((2.*d_2.*(rR)))-((k_2.*C_L.*(r_2)))+…
(d_3.*(R_2))-(2.*k_3.*C_L.*(pR));
dy = zeros(2,1);
dy(1) = dC_Ldx;
dy(2) = (-R_L/D_ij);
end
function res = twobc(ya,yb)
res = [ ya(1)-(L0); yb(2) ];
end
endHello,
I’m using bvp4c to solve for a reaction-diffusion equation. When I set the initial concentration to 100, I get this error saying
"Warning: Unable to meet the tolerance without using more than 5000 mesh points.
The last mesh of 4921 points and the solution are available in the output argument.
The maximum residual is 0.512336, while requested accuracy is 0.001.
> In bvp4c (line 323)
In steady_state_bvp4c_FINAL (line 38)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 44)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 50) "
Am I setting my boundary conditions incorrectly? I want the left hand side (at x = 0, C_L = C_L0) and on the right hand side I want the flux to equal to 0 (at x = x_f, dC_L/dx = 0).
function steady_state_bvp4c_FINAL
clear all; clc;
%Diffusion coefficient
D_ij = 30; %3.0*10^-7 cm^2/s -> 30 um^2/s
%Initial concentration at x=0
L0 = 100;
%Total length
x_f = 3500;
%Rate constants
k_1 = 0.00193;
k_2 = 0.00255;
k_3 = 4.09;
d_1 = 0.007;
d_2 = 3.95*10^-5;
d_3 = 2.26;
%Equilibrium constants
K_1 = 3.63;
K_2 = 0.0155;
K_3 = 0.553;
K_4 = 9.01;
K_i = 0.139;
%Total Receptors
N_T =1.7;
L = L0./2;
solinit = bvpinit(linspace(0,x_f,11),[L 0]);
sol = bvp4c(@(x,y)odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T),@twobc,solinit);
figure(1)
plot(sol.x,(sol.y(1,:)),’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Concentration (nM)’)
axis([0 x_f 0 L0])
figure(2)
plot(sol.x,(sol.y(1,:))./L0,’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Normalized Concentration (C_L/C_L_0)’)
axis([0 x_f 0 1])
function dy = odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T)
C_L = y(1);
dC_Ldx = y(2);
N_r = (-1 – (C_L./K_1) + sqrt((-1 – (C_L./K_1)).^2 -4.*(-(2./K_4) – ((2.*C_L)./(K_2.*K_4)) – ((2.*C_L)./(K_2.*K_4.*K_i)) – ((2.*C_L.^2)/(K_2.*K_3.*K_4.*K_i))).*N_T))/(4.*((1./K_4) + (C_L./(K_2.*K_4)) + (C_L./(K_2.*K_4.*K_i)) + (C_L.^2./(K_2.*K_3.*K_4.*K_i))));
N_R = (C_L./K_1).*N_r;
N_r2 = (1./K_4).*(N_r).^2;
N_rR = (C_L./(2.*K_2.*K_4)).*(N_r).^2;
N_pR = (C_L./(2.*K_2.*K_4.*K_i)).*(N_r).^2;
N_R2 = ((C_L.^2)./(K_2.*K_3.*K_4.*K_i)).*(N_r).^2;
r = N_T-(2.*N_R2)-(4.*N_pR)-N_R-(4.*N_rR)-(2.*N_r2);
R = N_T-(2.*N_R2)-(4.*N_pR)-N_r-(4.*N_rR)-(2.*N_r2);
r_2 = (N_T./2)-(N_R./2)-N_R2-(2.*N_pR)-(N_r./2)-(2.*N_rR);
rR = (N_T./4)-(N_R./4)-(N_R2./2)-N_pR-(N_r./4)-(N_r2./2);
pR = (N_T./4)-(N_R./4)-(N_R2./2)-(N_r./4)-N_rR-(N_r2./2);
R_2 = (N_T./2)-(N_R./2)-(2.*N_pR)-(N_r./2)-(2.*N_rR)-N_r2;
R_L = (2.*d_1.*(R))-(2.*k_1.*C_L.*r)+…
((2.*d_2.*(rR)))-((k_2.*C_L.*(r_2)))+…
(d_3.*(R_2))-(2.*k_3.*C_L.*(pR));
dy = zeros(2,1);
dy(1) = dC_Ldx;
dy(2) = (-R_L/D_ij);
end
function res = twobc(ya,yb)
res = [ ya(1)-(L0); yb(2) ];
end
end Hello,
I’m using bvp4c to solve for a reaction-diffusion equation. When I set the initial concentration to 100, I get this error saying
"Warning: Unable to meet the tolerance without using more than 5000 mesh points.
The last mesh of 4921 points and the solution are available in the output argument.
The maximum residual is 0.512336, while requested accuracy is 0.001.
> In bvp4c (line 323)
In steady_state_bvp4c_FINAL (line 38)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 44)
Warning: Imaginary parts of complex X and/or Y arguments ignored
> In steady_state_bvp4c_FINAL (line 50) "
Am I setting my boundary conditions incorrectly? I want the left hand side (at x = 0, C_L = C_L0) and on the right hand side I want the flux to equal to 0 (at x = x_f, dC_L/dx = 0).
function steady_state_bvp4c_FINAL
clear all; clc;
%Diffusion coefficient
D_ij = 30; %3.0*10^-7 cm^2/s -> 30 um^2/s
%Initial concentration at x=0
L0 = 100;
%Total length
x_f = 3500;
%Rate constants
k_1 = 0.00193;
k_2 = 0.00255;
k_3 = 4.09;
d_1 = 0.007;
d_2 = 3.95*10^-5;
d_3 = 2.26;
%Equilibrium constants
K_1 = 3.63;
K_2 = 0.0155;
K_3 = 0.553;
K_4 = 9.01;
K_i = 0.139;
%Total Receptors
N_T =1.7;
L = L0./2;
solinit = bvpinit(linspace(0,x_f,11),[L 0]);
sol = bvp4c(@(x,y)odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T),@twobc,solinit);
figure(1)
plot(sol.x,(sol.y(1,:)),’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Concentration (nM)’)
axis([0 x_f 0 L0])
figure(2)
plot(sol.x,(sol.y(1,:))./L0,’LineWidth’,1)
xlabel(‘Distance (mum)’)
ylabel(‘Normalized Concentration (C_L/C_L_0)’)
axis([0 x_f 0 1])
function dy = odefcn(x,y,D_ij,k_1,k_2,k_3,d_1,d_2,d_3,K_1,K_2,K_3,K_4,K_i,N_T)
C_L = y(1);
dC_Ldx = y(2);
N_r = (-1 – (C_L./K_1) + sqrt((-1 – (C_L./K_1)).^2 -4.*(-(2./K_4) – ((2.*C_L)./(K_2.*K_4)) – ((2.*C_L)./(K_2.*K_4.*K_i)) – ((2.*C_L.^2)/(K_2.*K_3.*K_4.*K_i))).*N_T))/(4.*((1./K_4) + (C_L./(K_2.*K_4)) + (C_L./(K_2.*K_4.*K_i)) + (C_L.^2./(K_2.*K_3.*K_4.*K_i))));
N_R = (C_L./K_1).*N_r;
N_r2 = (1./K_4).*(N_r).^2;
N_rR = (C_L./(2.*K_2.*K_4)).*(N_r).^2;
N_pR = (C_L./(2.*K_2.*K_4.*K_i)).*(N_r).^2;
N_R2 = ((C_L.^2)./(K_2.*K_3.*K_4.*K_i)).*(N_r).^2;
r = N_T-(2.*N_R2)-(4.*N_pR)-N_R-(4.*N_rR)-(2.*N_r2);
R = N_T-(2.*N_R2)-(4.*N_pR)-N_r-(4.*N_rR)-(2.*N_r2);
r_2 = (N_T./2)-(N_R./2)-N_R2-(2.*N_pR)-(N_r./2)-(2.*N_rR);
rR = (N_T./4)-(N_R./4)-(N_R2./2)-N_pR-(N_r./4)-(N_r2./2);
pR = (N_T./4)-(N_R./4)-(N_R2./2)-(N_r./4)-N_rR-(N_r2./2);
R_2 = (N_T./2)-(N_R./2)-(2.*N_pR)-(N_r./2)-(2.*N_rR)-N_r2;
R_L = (2.*d_1.*(R))-(2.*k_1.*C_L.*r)+…
((2.*d_2.*(rR)))-((k_2.*C_L.*(r_2)))+…
(d_3.*(R_2))-(2.*k_3.*C_L.*(pR));
dy = zeros(2,1);
dy(1) = dC_Ldx;
dy(2) = (-R_L/D_ij);
end
function res = twobc(ya,yb)
res = [ ya(1)-(L0); yb(2) ];
end
end bvp4c, tolerance, error MATLAB Answers — New Questions
ePWM Trip-Zone Issue: PWM only switching when TZ1 pin is floating (C2000/Simulink)
I am experiencing a strange behavior with the Trip-Zone (TZ) submodule in the ePWM block while using a TI C2000 processor. I have configured a Cycle-by-Cycle (CBC) trip on TZ1 to force the PWM output to LOW. The PWM is configured in Center-Aligned mode (Up-Down count) with a fixed 20% Duty Cycle.
The Problem:
The PWM output does not behave as expected when the TZ1 pin is actively driven. Here are the three states I observed:
TZ1 pin tied to HIGH (3.3V): The ePWM output is stuck at a constant HIGH (1) level (no switching).
TZ1 pin tied to LOW (GND): The ePWM output is stuck at a constant LOW (0) level.
TZ1 pin left FLOATING: The PWM works perfectly, switching at the defined 20% Duty Cycle.
Configurations:
Action Qualifier (AQ): * CAU (Up-count): Clear
CAD (Down-count): Set
Trip-Zone (TZ):
CBC TZ1: Enabled.
ePWM1A forced (TZ) to: Low.
Duty Cycle: Fixed at 20% (verified CMPA/PRD ratio).
My Analysis & Questions:
It seems that when the pin is floating, the internal pull-up resistor keeps TZ1 high, and for some reason, the ePWM module only switches in this state.
Why does manually driving the pin HIGH (3.3V) freeze the output at HIGH instead of allowing normal switching?
Could there be a conflict between the Digital Compare (DC) events or a GPIO Mux misconfiguration that causes the Trip-Zone to interpret a "Hard High" differently than a "Pull-up High"?
Is it possible that the Action Qualifier is being overridden by the TZ submodule even when no trip condition is met?
I have attached my Simulink configuration screenshots for reference. Any insights on why the TZ1 pin state is "locking" the AQ logic would be greatly appreciated.I am experiencing a strange behavior with the Trip-Zone (TZ) submodule in the ePWM block while using a TI C2000 processor. I have configured a Cycle-by-Cycle (CBC) trip on TZ1 to force the PWM output to LOW. The PWM is configured in Center-Aligned mode (Up-Down count) with a fixed 20% Duty Cycle.
The Problem:
The PWM output does not behave as expected when the TZ1 pin is actively driven. Here are the three states I observed:
TZ1 pin tied to HIGH (3.3V): The ePWM output is stuck at a constant HIGH (1) level (no switching).
TZ1 pin tied to LOW (GND): The ePWM output is stuck at a constant LOW (0) level.
TZ1 pin left FLOATING: The PWM works perfectly, switching at the defined 20% Duty Cycle.
Configurations:
Action Qualifier (AQ): * CAU (Up-count): Clear
CAD (Down-count): Set
Trip-Zone (TZ):
CBC TZ1: Enabled.
ePWM1A forced (TZ) to: Low.
Duty Cycle: Fixed at 20% (verified CMPA/PRD ratio).
My Analysis & Questions:
It seems that when the pin is floating, the internal pull-up resistor keeps TZ1 high, and for some reason, the ePWM module only switches in this state.
Why does manually driving the pin HIGH (3.3V) freeze the output at HIGH instead of allowing normal switching?
Could there be a conflict between the Digital Compare (DC) events or a GPIO Mux misconfiguration that causes the Trip-Zone to interpret a "Hard High" differently than a "Pull-up High"?
Is it possible that the Action Qualifier is being overridden by the TZ submodule even when no trip condition is met?
I have attached my Simulink configuration screenshots for reference. Any insights on why the TZ1 pin state is "locking" the AQ logic would be greatly appreciated. I am experiencing a strange behavior with the Trip-Zone (TZ) submodule in the ePWM block while using a TI C2000 processor. I have configured a Cycle-by-Cycle (CBC) trip on TZ1 to force the PWM output to LOW. The PWM is configured in Center-Aligned mode (Up-Down count) with a fixed 20% Duty Cycle.
The Problem:
The PWM output does not behave as expected when the TZ1 pin is actively driven. Here are the three states I observed:
TZ1 pin tied to HIGH (3.3V): The ePWM output is stuck at a constant HIGH (1) level (no switching).
TZ1 pin tied to LOW (GND): The ePWM output is stuck at a constant LOW (0) level.
TZ1 pin left FLOATING: The PWM works perfectly, switching at the defined 20% Duty Cycle.
Configurations:
Action Qualifier (AQ): * CAU (Up-count): Clear
CAD (Down-count): Set
Trip-Zone (TZ):
CBC TZ1: Enabled.
ePWM1A forced (TZ) to: Low.
Duty Cycle: Fixed at 20% (verified CMPA/PRD ratio).
My Analysis & Questions:
It seems that when the pin is floating, the internal pull-up resistor keeps TZ1 high, and for some reason, the ePWM module only switches in this state.
Why does manually driving the pin HIGH (3.3V) freeze the output at HIGH instead of allowing normal switching?
Could there be a conflict between the Digital Compare (DC) events or a GPIO Mux misconfiguration that causes the Trip-Zone to interpret a "Hard High" differently than a "Pull-up High"?
Is it possible that the Action Qualifier is being overridden by the TZ submodule even when no trip condition is met?
I have attached my Simulink configuration screenshots for reference. Any insights on why the TZ1 pin state is "locking" the AQ logic would be greatly appreciated. trip – zone MATLAB Answers — New Questions
The item “MATLAB_R2022a” can’t be moved to the Trash because it’s open.
I am trying to remove MATLAB from my MAC, as the macOSX for 2022a installer failed to finish but somehow created the icon on aplications. I want to delete it it and try installing it again. But when I go to aplications and try to move it to trash it says "The item “MATLAB_R2022a” can’t be moved to the Trash because it’s open."
I can delete the installer file but downloading and opening another installer won’t open the installation process.
Please help, what should I do?I am trying to remove MATLAB from my MAC, as the macOSX for 2022a installer failed to finish but somehow created the icon on aplications. I want to delete it it and try installing it again. But when I go to aplications and try to move it to trash it says "The item “MATLAB_R2022a” can’t be moved to the Trash because it’s open."
I can delete the installer file but downloading and opening another installer won’t open the installation process.
Please help, what should I do? I am trying to remove MATLAB from my MAC, as the macOSX for 2022a installer failed to finish but somehow created the icon on aplications. I want to delete it it and try installing it again. But when I go to aplications and try to move it to trash it says "The item “MATLAB_R2022a” can’t be moved to the Trash because it’s open."
I can delete the installer file but downloading and opening another installer won’t open the installation process.
Please help, what should I do? installation, matlab MATLAB Answers — New Questions
How can you make multi-line axis labels with TeX not left-justified in R2026a?
I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this?I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this? I just started using R2026a and encountered a problem with axis labels. In R2025b on a different computer, I don’t have this problem. Multi-line labels that have TeX in them render left justified, .e.g.
xlabel( sprintf( ‘normaln\bfbold’ ) )
whereas those with no TeX render centered as expected
ylabel( sprintf( ‘normalnbold’ ) )
Setting the ‘HorizontalAlignment’ property of the label to ‘center’ after the fact, as suggested by a web search does not fix the problem. I get the same behavior creating a text object with text() as opposed to xlabel(), and can’t think of a workaround other than creating a separate text object for each line, which would make be abandon R2026a for the time being. Has anyone solved this? tex, horizonalalignment MATLAB Answers — New Questions
How can I dynamically create and configure a subclass of an abstract class from a file or script in one step in MATLAB?
In MATLAB, I have an abstract class called "Vehicle" and concrete subclasses like "Car" and "Bike". In my "Garage" class, the "vehicle" property is set dynamically at runtime by reading a config script (e.g., "garageConfig.m"). Right now, I use a variable "vehicleType" in "garageConfig.m" to determine which subclass to instantiate. But the problem is I have to:Run "garageConfig.m" to get the value for "vehicleType", then set the property "vehicle" to the correct child (e.g., obj.vehicle = Bike()).Then run "garageConfig.m" again to populate the property values (like "vehicle.color", "vehicle.wheels", etc.) for the instantiated child class.
Is there a better way to do this, so I don’t have to run the config script twice to set up the "vehicle" object and its properties?
% Vehicle.m
classdef (Abstract) Vehicle
properties
color = "white";
wheels = 4;
end
end
% Car.m
classdef Car < Vehicle
end
% Bike.m
classdef Bike < Vehicle
properties
hasBell = false;
end
end
% Garage.m
classdef Garage
properties
vehicle % will be Vehicle
end
methods
function obj = Garage(configFile)
% First run: get vehicleType
run(configFile); % loads vehicleType and vehicle properties
% Instantiate correct subclass
switch vehicleType
case 1
obj.vehicle = Car();
case 2
obj.vehicle = Bike();
end
% Now, to assign properties, need to run the config file again:
run(configFile); % loads vehicle.color, vehicle.wheels, etc.
% Assign properties
obj.vehicle.color = vehicle.color;
obj.vehicle.wheels = vehicle.wheels;
if isa(obj.vehicle, ‘Bike’)
obj.vehicle.hasBell = vehicle.hasBell;
end
end
end
end
% garageConfig.m
vehicleType = 2; % 1 for Car, 2 for Bike
vehicle.color = "red";
vehicle.wheels = 2;
vehicle.hasBell = true;
% Usage:
g = Garage(‘garageConfig.m’);In MATLAB, I have an abstract class called "Vehicle" and concrete subclasses like "Car" and "Bike". In my "Garage" class, the "vehicle" property is set dynamically at runtime by reading a config script (e.g., "garageConfig.m"). Right now, I use a variable "vehicleType" in "garageConfig.m" to determine which subclass to instantiate. But the problem is I have to:Run "garageConfig.m" to get the value for "vehicleType", then set the property "vehicle" to the correct child (e.g., obj.vehicle = Bike()).Then run "garageConfig.m" again to populate the property values (like "vehicle.color", "vehicle.wheels", etc.) for the instantiated child class.
Is there a better way to do this, so I don’t have to run the config script twice to set up the "vehicle" object and its properties?
% Vehicle.m
classdef (Abstract) Vehicle
properties
color = "white";
wheels = 4;
end
end
% Car.m
classdef Car < Vehicle
end
% Bike.m
classdef Bike < Vehicle
properties
hasBell = false;
end
end
% Garage.m
classdef Garage
properties
vehicle % will be Vehicle
end
methods
function obj = Garage(configFile)
% First run: get vehicleType
run(configFile); % loads vehicleType and vehicle properties
% Instantiate correct subclass
switch vehicleType
case 1
obj.vehicle = Car();
case 2
obj.vehicle = Bike();
end
% Now, to assign properties, need to run the config file again:
run(configFile); % loads vehicle.color, vehicle.wheels, etc.
% Assign properties
obj.vehicle.color = vehicle.color;
obj.vehicle.wheels = vehicle.wheels;
if isa(obj.vehicle, ‘Bike’)
obj.vehicle.hasBell = vehicle.hasBell;
end
end
end
end
% garageConfig.m
vehicleType = 2; % 1 for Car, 2 for Bike
vehicle.color = "red";
vehicle.wheels = 2;
vehicle.hasBell = true;
% Usage:
g = Garage(‘garageConfig.m’); In MATLAB, I have an abstract class called "Vehicle" and concrete subclasses like "Car" and "Bike". In my "Garage" class, the "vehicle" property is set dynamically at runtime by reading a config script (e.g., "garageConfig.m"). Right now, I use a variable "vehicleType" in "garageConfig.m" to determine which subclass to instantiate. But the problem is I have to:Run "garageConfig.m" to get the value for "vehicleType", then set the property "vehicle" to the correct child (e.g., obj.vehicle = Bike()).Then run "garageConfig.m" again to populate the property values (like "vehicle.color", "vehicle.wheels", etc.) for the instantiated child class.
Is there a better way to do this, so I don’t have to run the config script twice to set up the "vehicle" object and its properties?
% Vehicle.m
classdef (Abstract) Vehicle
properties
color = "white";
wheels = 4;
end
end
% Car.m
classdef Car < Vehicle
end
% Bike.m
classdef Bike < Vehicle
properties
hasBell = false;
end
end
% Garage.m
classdef Garage
properties
vehicle % will be Vehicle
end
methods
function obj = Garage(configFile)
% First run: get vehicleType
run(configFile); % loads vehicleType and vehicle properties
% Instantiate correct subclass
switch vehicleType
case 1
obj.vehicle = Car();
case 2
obj.vehicle = Bike();
end
% Now, to assign properties, need to run the config file again:
run(configFile); % loads vehicle.color, vehicle.wheels, etc.
% Assign properties
obj.vehicle.color = vehicle.color;
obj.vehicle.wheels = vehicle.wheels;
if isa(obj.vehicle, ‘Bike’)
obj.vehicle.hasBell = vehicle.hasBell;
end
end
end
end
% garageConfig.m
vehicleType = 2; % 1 for Car, 2 for Bike
vehicle.color = "red";
vehicle.wheels = 2;
vehicle.hasBell = true;
% Usage:
g = Garage(‘garageConfig.m’); abstractclass, subclass, classconfig MATLAB Answers — New Questions
Request to Change Account Type from Student to Educator/Researcher
Hello,
I recently created a MathWorks account, but I accidentally selected the “Student” profile during the registration process.
I actually need to use MATLAB for teaching and academic research purposes, so I would like to change my account type to “Educator/Researcher.”
My university email address is: [removed]
Could you please update my account accordingly or guide me through the necessary steps to make this change?
Thank you in advance for your assistance.
Best regards,Hello,
I recently created a MathWorks account, but I accidentally selected the “Student” profile during the registration process.
I actually need to use MATLAB for teaching and academic research purposes, so I would like to change my account type to “Educator/Researcher.”
My university email address is: [removed]
Could you please update my account accordingly or guide me through the necessary steps to make this change?
Thank you in advance for your assistance.
Best regards, Hello,
I recently created a MathWorks account, but I accidentally selected the “Student” profile during the registration process.
I actually need to use MATLAB for teaching and academic research purposes, so I would like to change my account type to “Educator/Researcher.”
My university email address is: [removed]
Could you please update my account accordingly or guide me through the necessary steps to make this change?
Thank you in advance for your assistance.
Best regards, profile MATLAB Answers — New Questions
How to access to i2c Qwiic connector on Arduino Uno R4Wifi?
I am using an Arduino UnoR4Wifi to read i2c accelerometer (LiS3DH) in Matlab and Simulink. This works ok using i2c Bus 0, with the accelerometer wires individually plugged into the board (A4,A5,3.3v,Gr). But I want to use the in-built ‘Qwiic’ connector on the Arduino board (aka ‘StemmaQT’ connector) for convenient plug-and-play access so I can quickly attach/detach sensors during an experiment.
However, when i attach the accelerometer to the Qwiic connector (Bus 1) it is not recognised by Matlab. I have tried using pull-down resistors attached to the SDA/SCL connections to activate Bus 1, to no avail. I am not sure if this is a Matlab software limitation, or an Arduino hardware limitation. Matlab suggests Bus 1 is not valid (see code below with no accelerometer attached), so i am guessing it might be a software limitation.
Any advice appreciated!
Raymond
>
> a = arduino(‘COM7’, ‘UnoR4WiFi’, ‘Libraries’, ‘I2C’);
>> scanI2CBus(a,0)
Device not detected on I2C Bus 0. Make sure the I2C device is properly connected to pins A4(SDA) and A5(SCL).
>> scanI2CBus(a,1)
Invalid I2C bus ID. Valid bus IDs are 0I am using an Arduino UnoR4Wifi to read i2c accelerometer (LiS3DH) in Matlab and Simulink. This works ok using i2c Bus 0, with the accelerometer wires individually plugged into the board (A4,A5,3.3v,Gr). But I want to use the in-built ‘Qwiic’ connector on the Arduino board (aka ‘StemmaQT’ connector) for convenient plug-and-play access so I can quickly attach/detach sensors during an experiment.
However, when i attach the accelerometer to the Qwiic connector (Bus 1) it is not recognised by Matlab. I have tried using pull-down resistors attached to the SDA/SCL connections to activate Bus 1, to no avail. I am not sure if this is a Matlab software limitation, or an Arduino hardware limitation. Matlab suggests Bus 1 is not valid (see code below with no accelerometer attached), so i am guessing it might be a software limitation.
Any advice appreciated!
Raymond
>
> a = arduino(‘COM7’, ‘UnoR4WiFi’, ‘Libraries’, ‘I2C’);
>> scanI2CBus(a,0)
Device not detected on I2C Bus 0. Make sure the I2C device is properly connected to pins A4(SDA) and A5(SCL).
>> scanI2CBus(a,1)
Invalid I2C bus ID. Valid bus IDs are 0 I am using an Arduino UnoR4Wifi to read i2c accelerometer (LiS3DH) in Matlab and Simulink. This works ok using i2c Bus 0, with the accelerometer wires individually plugged into the board (A4,A5,3.3v,Gr). But I want to use the in-built ‘Qwiic’ connector on the Arduino board (aka ‘StemmaQT’ connector) for convenient plug-and-play access so I can quickly attach/detach sensors during an experiment.
However, when i attach the accelerometer to the Qwiic connector (Bus 1) it is not recognised by Matlab. I have tried using pull-down resistors attached to the SDA/SCL connections to activate Bus 1, to no avail. I am not sure if this is a Matlab software limitation, or an Arduino hardware limitation. Matlab suggests Bus 1 is not valid (see code below with no accelerometer attached), so i am guessing it might be a software limitation.
Any advice appreciated!
Raymond
>
> a = arduino(‘COM7’, ‘UnoR4WiFi’, ‘Libraries’, ‘I2C’);
>> scanI2CBus(a,0)
Device not detected on I2C Bus 0. Make sure the I2C device is properly connected to pins A4(SDA) and A5(SCL).
>> scanI2CBus(a,1)
Invalid I2C bus ID. Valid bus IDs are 0 arduino, i2c, accelerometer, lis3dh, qwiic, stemmaqt MATLAB Answers — New Questions
Why is the “covInfo” output of the “mcdcinfo” function not necessarily “[0 0]” when the “description” output is an empty array in Simulink Coverage R2024b?
In Simulink Coverage R2024b, I am using the "mcdcinfo" function to query Modified Condition/Decision Coverage (MCDC) results.
I noticed that the "covInfo" (first) output is not necessarily "[0 0]" when the "description" (second) output is an empty array "[]".
Why is this the case?In Simulink Coverage R2024b, I am using the "mcdcinfo" function to query Modified Condition/Decision Coverage (MCDC) results.
I noticed that the "covInfo" (first) output is not necessarily "[0 0]" when the "description" (second) output is an empty array "[]".
Why is this the case? In Simulink Coverage R2024b, I am using the "mcdcinfo" function to query Modified Condition/Decision Coverage (MCDC) results.
I noticed that the "covInfo" (first) output is not necessarily "[0 0]" when the "description" (second) output is an empty array "[]".
Why is this the case? mcdcinfo, covinfo, description, mcdc, modelobject MATLAB Answers — New Questions
How to find a function in the path – securely?
What is a safe method to check, where a specific function exists in Matlab’s path? It should not matter, if the function is an M, P or MEX file.
Actually, this is a job for which() . To avoid collisions with local variables, it should be hidden in a function:
function Reply = safeWhich(varargin)
Reply = which(varargin{:});
end
This fails for ‘varargin’, as expected:
safeWhich(‘varargin’)
But there are further traps
safeWhich(‘R’) % Same for ‘P’
In Matlab R2018b under Windows I get:
‘C:Program FilesMATLABR2018btoolboxmatlabcodetools@mtreemtree.m % mtree method’
The appended comment allowed to exclude the output by checking, if a corrensponding file exists:
function Reply = safeWhich_2(varargin)
Reply = which(varargin{:});
Reply = cellstr(Reply);
Reply = Reply(isfile(Reply)); % Worked in R2018b, no effect in R2025a
end
safeWhich_2(‘R’)
The exist() command does have the power to find functions properly, but it does not reveal where.
The old function depfun() was replaced by the ugly matlab.codetools.requiredFilesAndProducts(). I could search in the corresponding code, couldn’t I? This function uses the code find here internally: "toolboxmatlabdepfun+matlab+depfun+internal+whichcallWhich.m". Here I find 91 functions and 11.3 MB of code. One function looks like this:
% 10^(-18) is effective zero in terms of possibility, which requries
% log(10^18)/log(26+10+1) = 12 random letters, digits, or underscores.
function klno6phn_9faskf_na = callWhich(asm_foyan_knaouie8)
klno6phn_9faskf_na = which(asm_foyan_knaouie8);
end
Obviously MathWorks struggles with comparable problems.
The profiler shows, that matlab.codetools.requiredFilesAndProducts() calls 207 subfunctions (R2018b).
See the discussion: https://www.mathworks.com/matlabcentral/discussions/ideas/887763-i-have-been-a-matlab-loyalist-for-25-years . The complexity explodes, such that a simple task like searching a function file needs a pile of exceptions and indirections.What is a safe method to check, where a specific function exists in Matlab’s path? It should not matter, if the function is an M, P or MEX file.
Actually, this is a job for which() . To avoid collisions with local variables, it should be hidden in a function:
function Reply = safeWhich(varargin)
Reply = which(varargin{:});
end
This fails for ‘varargin’, as expected:
safeWhich(‘varargin’)
But there are further traps
safeWhich(‘R’) % Same for ‘P’
In Matlab R2018b under Windows I get:
‘C:Program FilesMATLABR2018btoolboxmatlabcodetools@mtreemtree.m % mtree method’
The appended comment allowed to exclude the output by checking, if a corrensponding file exists:
function Reply = safeWhich_2(varargin)
Reply = which(varargin{:});
Reply = cellstr(Reply);
Reply = Reply(isfile(Reply)); % Worked in R2018b, no effect in R2025a
end
safeWhich_2(‘R’)
The exist() command does have the power to find functions properly, but it does not reveal where.
The old function depfun() was replaced by the ugly matlab.codetools.requiredFilesAndProducts(). I could search in the corresponding code, couldn’t I? This function uses the code find here internally: "toolboxmatlabdepfun+matlab+depfun+internal+whichcallWhich.m". Here I find 91 functions and 11.3 MB of code. One function looks like this:
% 10^(-18) is effective zero in terms of possibility, which requries
% log(10^18)/log(26+10+1) = 12 random letters, digits, or underscores.
function klno6phn_9faskf_na = callWhich(asm_foyan_knaouie8)
klno6phn_9faskf_na = which(asm_foyan_knaouie8);
end
Obviously MathWorks struggles with comparable problems.
The profiler shows, that matlab.codetools.requiredFilesAndProducts() calls 207 subfunctions (R2018b).
See the discussion: https://www.mathworks.com/matlabcentral/discussions/ideas/887763-i-have-been-a-matlab-loyalist-for-25-years . The complexity explodes, such that a simple task like searching a function file needs a pile of exceptions and indirections. What is a safe method to check, where a specific function exists in Matlab’s path? It should not matter, if the function is an M, P or MEX file.
Actually, this is a job for which() . To avoid collisions with local variables, it should be hidden in a function:
function Reply = safeWhich(varargin)
Reply = which(varargin{:});
end
This fails for ‘varargin’, as expected:
safeWhich(‘varargin’)
But there are further traps
safeWhich(‘R’) % Same for ‘P’
In Matlab R2018b under Windows I get:
‘C:Program FilesMATLABR2018btoolboxmatlabcodetools@mtreemtree.m % mtree method’
The appended comment allowed to exclude the output by checking, if a corrensponding file exists:
function Reply = safeWhich_2(varargin)
Reply = which(varargin{:});
Reply = cellstr(Reply);
Reply = Reply(isfile(Reply)); % Worked in R2018b, no effect in R2025a
end
safeWhich_2(‘R’)
The exist() command does have the power to find functions properly, but it does not reveal where.
The old function depfun() was replaced by the ugly matlab.codetools.requiredFilesAndProducts(). I could search in the corresponding code, couldn’t I? This function uses the code find here internally: "toolboxmatlabdepfun+matlab+depfun+internal+whichcallWhich.m". Here I find 91 functions and 11.3 MB of code. One function looks like this:
% 10^(-18) is effective zero in terms of possibility, which requries
% log(10^18)/log(26+10+1) = 12 random letters, digits, or underscores.
function klno6phn_9faskf_na = callWhich(asm_foyan_knaouie8)
klno6phn_9faskf_na = which(asm_foyan_knaouie8);
end
Obviously MathWorks struggles with comparable problems.
The profiler shows, that matlab.codetools.requiredFilesAndProducts() calls 207 subfunctions (R2018b).
See the discussion: https://www.mathworks.com/matlabcentral/discussions/ideas/887763-i-have-been-a-matlab-loyalist-for-25-years . The complexity explodes, such that a simple task like searching a function file needs a pile of exceptions and indirections. which, exist, required products, file MATLAB Answers — New Questions
Call a Matlab function in Simulink for later code generation
Hello!
I need to use a MATLAB function in my Simulink project.
The problem is that this function needs to call other functions and load data from *.mat files (see image).
I also need to generate the code using Simulink Coder and Embedded Coder.
Which technique should I adopt from the answer below ?
Call a Matlab function in Simulink from the current folderHello!
I need to use a MATLAB function in my Simulink project.
The problem is that this function needs to call other functions and load data from *.mat files (see image).
I also need to generate the code using Simulink Coder and Embedded Coder.
Which technique should I adopt from the answer below ?
Call a Matlab function in Simulink from the current folder Hello!
I need to use a MATLAB function in my Simulink project.
The problem is that this function needs to call other functions and load data from *.mat files (see image).
I also need to generate the code using Simulink Coder and Embedded Coder.
Which technique should I adopt from the answer below ?
Call a Matlab function in Simulink from the current folder simulink, matlab, code generation, embedded matlab function, embedded coder MATLAB Answers — New Questions
Matlab online docs showing in dark mode
The Matlab online docs (e.g., https://www.mathworks.com/help/?s_tid=user_nav_help ) showing in dark mode on mathworks.com are showing in dark mode for me. Is there a site setting to switch them back to light mode?The Matlab online docs (e.g., https://www.mathworks.com/help/?s_tid=user_nav_help ) showing in dark mode on mathworks.com are showing in dark mode for me. Is there a site setting to switch them back to light mode? The Matlab online docs (e.g., https://www.mathworks.com/help/?s_tid=user_nav_help ) showing in dark mode on mathworks.com are showing in dark mode for me. Is there a site setting to switch them back to light mode? matlab MATLAB Answers — New Questions
comm.SDRuReceiver on X310 throws receiveData:ErrLateCommand
I am trying to receive data from a USRP X310 in MATLAB using comm.SDRuReceiver, and I keep hitting the error:
Receive unsuccessfully: Could not execute UHD driver command in ‘receiveData_cont_c’: receiveData:ErrLateCommand. A stream command was issued in the past.
Running the benchmark_rate reports: * 0 dropped samples * 0 overflows * 0 late commands * 0 timeoutsI am trying to receive data from a USRP X310 in MATLAB using comm.SDRuReceiver, and I keep hitting the error:
Receive unsuccessfully: Could not execute UHD driver command in ‘receiveData_cont_c’: receiveData:ErrLateCommand. A stream command was issued in the past.
Running the benchmark_rate reports: * 0 dropped samples * 0 overflows * 0 late commands * 0 timeouts I am trying to receive data from a USRP X310 in MATLAB using comm.SDRuReceiver, and I keep hitting the error:
Receive unsuccessfully: Could not execute UHD driver command in ‘receiveData_cont_c’: receiveData:ErrLateCommand. A stream command was issued in the past.
Running the benchmark_rate reports: * 0 dropped samples * 0 overflows * 0 late commands * 0 timeouts usrp, comm.sdrureceiver, x310 MATLAB Answers — New Questions
Accelerating Frontier Transformation with Microsoft partners
AI has moved quickly from experimentation to production. Customers want measurable business outcomes, along with security, governance and responsible AI built in from day one. Microsoft partners are a meaningful differentiator to deliver these objectives. They turn ideas into deployable solutions by prioritizing the highest value use cases, building the right data and security foundations and establishing adoption and measurement capabilities so customers can run AI reliably in production.
Frontier Transformation is where AI becomes a repeatable, governed capability embedded into the flow of work, business processes and customer engagement. Customers are quickly moving from targeted pilots to operating AI at scale with a foundation built upon identity, data protection, compliance, monitoring and change management. As organizations expand from custom agents to agent-led processes, unified governance is essential so leaders can manage risk, track performance and scale with confidence.
Two essentials: Intelligence and Trust
Frontier Transformation depends on two essential elements: intelligence and trust. Customers want solutions grounded in their unique work intelligence, including their data, business context and operational realities. They also expect trust by design, with AI artifacts observable, managed and secured across the technology stack so they can deploy responsibly and scale with confidence.
A success framework for Frontier Transformation
Microsoft has developed a powerful framework for success as partners enable AI transformation for customers across all segments, industries and geographies:
- Enriching employee experiences: enabling businesses to empower employees with world-class tools and capabilities to activate a thriving, productive workforce
- Reinventing customer engagement: applying AI and agentic solutions to break through with customers, accelerate revenue growth, become more efficient at customer acquisition and deliver more personalized solutions
- Reshaping business processes: redesigning workflows across the business, enhanced by AI and agentic capability
- Bending the curve on innovation: AI acceleration is a powerful catalyst for business transformation and for addressing society’s biggest challenges — curing disease, addressing climate change and famine and other meaningful advancements
The “what” matters, and so does the “how.” Organizations that scale successfully put AI where people already work, enable innovation close to the business challenge and build observability at every layer so leaders can measure quality, govern risk and manage AI like a production system.
More than 90% of the Fortune 500 use Microsoft 365 Copilot, reflecting how quickly AI is becoming part of everyday work.(1) IDC predicts 1.3 billion agents in circulation by 2028(2) and 80% of the Fortune 500 are already using Microsoft agents, led by operationally complex industries like manufacturing, financial services and retail.(3) As customers move from piloting AI to agents embedded in their flow of work, governance and security need to scale with them.
Microsoft’s approach is straightforward: Copilot drives action in the flow of work, agents orchestrate workflows across systems and Microsoft Agent 365 provides a unified control plane designed to govern and secure agents at scale, with the same tools businesses use for employee administration, such as Microsoft admin center, Defender, Entra and Purview.
Partners are creating impact right now in three areas. First, agentic workflows that remove operational friction and orchestrate end-to-end work across operations, finance, supply chain and service. Second, Customer Zero maturity. Partners who adopt Copilot and agents internally build credibility and move faster because they have meaningful, real-world experiences that they translate into their go-to-market plans. Third, security as the foundation. There is no AI at scale without secure identity, protected data and strong governance.
Microsoft 365 E7 and Agent 365: The Frontier Suite
In March, Microsoft introduced Wave 3 of Microsoft 365 Copilot and announced Microsoft 365 E7: The Frontier Suite, with general availability of Microsoft 365 E7 and Microsoft Agent 365 on May 1, 2026.
Microsoft 365 E7 brings together Microsoft 365 E5 for secure productivity, Entra Suite for identity and access control, Microsoft 365 Copilot for AI in the flow of work and Agent 365 as the control plane to govern and scale agents. It is grounded in shared intelligence from Work IQ, the layer that brings together signals from the Microsoft 365 environment, including content, context and activity, so AI can operate with the right business grounding and policy awareness.
Microsoft Agent 365 provides a unified control plane for agents, enabling IT, security and business teams to observe, govern and secure agents across the organization. This applies to any agents an organization uses, whether they are built on Microsoft AI platforms, delivered by ecosystem partners or introduced through other technology stacks. It also applies the same security and compliance capabilities teams already rely on, including Microsoft Defender, Microsoft Entra and Microsoft Purview.
Some customer scenarios require custom agents. Microsoft Agent Factory is designed to accelerate the move from experimentation to execution. The Microsoft Agent Factory Pre-purchase Plan (P3) adds licensing flexibility across Copilot Studio, Microsoft Foundry, Fabric and GitHub, with tiered discounts intended to support broader adoption rather than isolated pilots. It also enables inclusion of tailored, role-based skilling at no additional cost to the customer, reducing adoption friction and increasing delivered value.
The opportunity for partners is end-to-end, and this is where the partner’s strategy really matters. Shifting from transaction-first to outcome-first, partners who iterate quickly, establish clear guardrails and build an operating rhythm for adoption move customers from interest to impact.
Over time, every organization will employ people who can direct and govern agents as part of daily work. Partners can make that capability real through packaged offers, change management and managed operations. Publishing those packaged offers in the Microsoft Marketplace adds a scalable route to market, improving discoverability and enabling a more repeatable buy-and-deploy motion as customers expand agent usage.
Partner success: What governed scale looks like in practice
“AI is at the forefront of everything we do. Through our ‘learn, use, create’ methodology and our AI Academy, we really support partners with learning paths.”
— Nicole Clark, Global Alliance Manager, Arrow Electronics
Partners are embracing Frontier Transformation by modernizing foundations, driving adoption, designing security into delivery and building agents that automate repeatable work and orchestrate business processes.
- Cognizant treated legacy automation as a platform modernization effort. Using Microsoft Power Platform, Copilot agents and governance frameworks, Cognizant migrated and modernized automation and scaled it across teams, consolidating platforms, lowering costs and reducing manual work through agent-led workflows.
- EPAM’s work with their customer Albert Heijn demonstrates what agent-first execution looks like in frontline scenarios. By delivering an employee-facing virtual assistant inside the retailer’s staff app, EPAM supported scenarios like restocking, onboarding and faster access to product and inventory information, with enterprise governance and observability in mind.
- Insight’s Flight Academy shows what it looks like to treat adoption as a program, not an announcement. Through a structured approach, Insight enables teams to build AI fluency in daily work and reinforces usage with practical learning and internal momentum that can scale beyond early enthusiasts.
- aCloud demonstrated a repeatable security pattern with their customer Jurong Engineering Limited (JEL) by bringing together Microsoft Purview, Microsoft Sentinel, Microsoft Defender XDR and Microsoft Security Copilot, paired with co-design workshops and cross-team alignment to strengthen compliance readiness.
- Arrow Electronics showed how distributor-led enablement can accelerate partner execution by using ArrowSphere to streamline Cloud Solution Provider (CSP) lifecycle management and ArrowSphere Assistant to surface AI-driven insights for renewals, upsell opportunities and Copilot adoption, complemented by a security dashboard that strengthens posture visibility and supports trust-by-design conversations.
Find more stories of partners innovating and driving meaningful outcomes for customers with Microsoft technology.
This same disciplined approach is especially relevant in the small and medium business space (SMB), where Microsoft partners offer end-to-end capability through managed services offerings and solutions packaged into repeatable motions, tailored to this customer segment.
SMB momentum: Scaling work with Copilots and agents
As Microsoft 365 Copilot Business expands AI built for work to organizations with fewer than 300 users, SMBs have a practical path to adopt AI more broadly. CSP partners are well positioned to guide that journey with a motion that combines adoption, security and ongoing management.
New Omdia research illustrates that CSP is a durable growth model for partners. In a study of 267 CSP partners across 36 countries, 79% rated CSP authorization as good, very good or excellent, and 88% would recommend it to other partners.(4) Omdia also found that 60% of CSP partner revenue is now tied to value-added services, with licensing acting as the entry point to broader, services-led engagements.(6)
“We’re bringing customers resources that only a partner can deliver to them: our relationship with Microsoft, technical training and programs that push them further and faster to learn technologies like Microsoft Copilot Studio, Foundry and Fabric.”
— Chance Weaver, Global VP of AI Adoption, Pax8
SMB demand is also expanding. For CSP partners, the near-term opportunity is to standardize advancing Copilot and agents from conversation to consumption. Lead with a simple, repeatable motion: outcome selection, security baseline, deployment, adoption and optimization cadence. Renewal moments are often the easiest time to introduce change when paired with a clear business case and time-bound offers.
A simple, scalable approach is to roll out in stages:
- Deploy Microsoft 365 Copilot Business broadly, paired with a strong foundation of identity, data protection and compliance.
- Target high-propensity accounts with tools such as Microsoft CloudAscent and the AI Business Solutions & Security Insights dashboard to deepen adoption and standardize responsible prompting.
- Extend with agents to take on repeatable tasks and support key business processes, with governance and security built in.
Microsoft provides CSP partners with a powerful set of tools to combine licensing, lifecycle management and optimization into one customer relationship. Omdia notes that partners value operational advantages such as monthly billing flexibility and managing licenses through Partner Center for real-time provisioning and 24/7 license management. Partners can review the CSP incentives guide to understand the latest CSP incentives and how they map to an SMB motion.
Microsoft supports SMB-focused partners by combining product, security and go-to-market resources that make it easy to deliver a repeatable motion. That includes tools to assess readiness, prioritize the right use cases and track adoption over time, plus role-based skilling to build sales and technical and delivery confidence across Copilot, security and agents. For partners building managed services offerings, Microsoft Marketplace also provides a scalable route to market, improving discoverability and enabling customers to buy through familiar procurement paths, while Partner Center brings licensing and lifecycle management into the same operational flow.
Program momentum and updates
The Microsoft AI Cloud Partner Program continues to be the primary way we invest in partners as they build, sell and deliver cloud and AI solutions. Our focus is simple: enable partners to build capability, accelerate demand, differentiate in the market and scale repeatable delivery.
In February 2026, Microsoft introduced a wealth of expanded benefits updates across Copilot, security, Azure credits and go-to-market resources. These updates are designed to strengthen how partners run their business and accelerate the ability to take solutions to market. We continue to evolve partner benefits packages as a practical growth lever, combining product, support and advisory benefits so partners can invest with confidence.
To enable AI Transformation, Microsoft is introducing program updates and offers in the coming months. These updates are intended to enable partners, including services partners, channel partners and software companies, to build and deliver agents across the Frontier product stack.
- Differentiation via Frontier Partner specialization: The Frontier Badge is evolving into a Frontier Partner specialization. This specialization differentiates partners, including services partners and channel partners, who demonstrate capabilities to build or deliver agents across Microsoft’s Frontier product stack. It creates a clear way for customers and Microsoft field sales teams to identify partners with validated readiness for agentic AI scenarios.
- Updated Frontier Distributor designation: Microsoft is evolving the Frontier Distributor designation to reflect distributor capabilities that matter for scaling agentic AI across the channel. For partners, this will make it easier to identify distributors that can deliver repeatable skilling, enablement to build and manage agents and Marketplace-backed motions to transact and grow agent sales.
- Benefits for software companies building AI apps and agents via App Accelerate: App Accelerate supports software companies building AI apps and agents on the Microsoft agent stack, with benefits designed to bring agentic solutions to market with strong foundations for trust.
Investments in skilling
This year we are investing in partner skilling that connects certification readiness to project-ready execution, with role-based experiences like Project Ready Workshops that translate skills into repeatable delivery practices. These learning experiences are delivered through our Partner Skilling Hub.
We are also introducing the Frontier Engineer Badge, a new learning path delivered through Titan Academy that prepares Solution Engineers and Solution Architects within the partners’ organization to design, build and operate production-ready agentic AI solutions across the Frontier Transformation stack, including Microsoft Copilot, Copilot Studio, Azure AI Foundry, GitHub Copilot, Microsoft Fabric and Agent 365.
The journey is hands-on by design and follows a three-part model: earn required certifications to establish a shared technical baseline, demonstrate delivery capability through Project Ready (building and integrating agents with governance, security and compliance) and build advanced readiness for operating at scale through governance, velocity and industry solution patterns. The outcome is clear: delivery-ready engineers who can move customers from prototypes to trusted, governed deployments.
Capturing the Marketplace opportunity
Marketplaces matter more in 2026 as customers consolidate procurement and expect faster time to value, especially as AI moves from pilots to production. With over 5,000 AI solutions available, Microsoft Marketplace increases discoverability for partner-built AI solutions, including agents, and supports a more repeatable buy-and-deploy motion through familiar procurement. It also makes it easy for partners to package multiparty software and services offers, so customers can purchase what they need to implement, govern and scale AI in production.
Omdia projects Microsoft Marketplace as a nearly $300 billion partner services opportunity by 2030. In the same study, partners selling through Marketplace reported go-to-market benefits, including faster sales cycles and larger deals, with 75% of study participants reporting faster closes and 69% reporting larger deals through Microsoft Marketplace.(5)
To accelerate demand generation and make it easy to activate these motions, we recently introduced Partner Marketing Center Pro, an AI-powered experience for end-to-end campaign creation. It brings campaign discovery, customization and co-branding, intelligent localization and translation, automated publishing and built-in reporting into one workflow, with an AI assistant that provides coaching throughout the process.
Partner Marketing Center Pro is a benefit of the Microsoft AI Cloud Partner Program available to partners who have purchased at least one partner benefits package, who have attained a Solutions Partner designation or who are currently enrolled in ISV Success.
Ways to engage now
Here are a few practical next steps partners can take to maximize their Microsoft investment:
Start by joining the Microsoft AI Cloud Partner Program.
- Plan to attend our annual sales kickoff for partners, virtually on Wednesday, July 22, 2026, to learn more about FY27 priorities and execution motions.
- Explore partner benefits packages and select the option that aligns to their growth plan.
- Pursue a Solutions Partner designation or specialization that matches their solution plays and customer demand.
- Visit the Partner Skilling Hub to find role-based learning resources.
- Launch an FY26 campaign focused on SMB, security, Copilot adoption or marketplace growth using Partner Marketing Center Pro.
Making Frontier Transformation real
Frontier Transformation is about building AI-powered operating capability grounded in intelligence and trust, and delivered consistently across industries, geographies and market segments. Partners make that real for customers by turning strategy into production-ready solutions, with governance, security and adoption built in from day one.
Microsoft is committed to partner success. We will continue investing in the Microsoft AI Cloud Partner Program, with the incentives, the skilling and the go-to-market capabilities that enable partners to build repeatable offers, increase discoverability and deliver trusted AI outcomes for customers at scale.
Nicole Dezen leads the Microsoft partner ecosystem and the Global Channel Partner Sales organization in Small, Medium Enterprises and Channel (SME&C). As Chief Partner Officer, she has grown the Microsoft partner ecosystem to become the largest in the industry, enabling more than 500,000 partners to deliver AI transformation to millions of customers in each segment around the world.
Footnotes
1 Microsoft FY25 Third Quarter Earnings Conference Call, Microsoft, April 2025.
2 IDC Info Snapshot, sponsored by Microsoft, 1.3 Billion AI Agents by 2028, #US53361825, May 2025.
3 Based on Microsoft first party telemetry measuring agents built with Microsoft Copilot Studio or Microsoft Agent Builder that were in use during the last 28 days of November 2025.
4 Omdia, Unlocking Growth Potential: Partner Perspectives on Microsoft CSP, December 2025. Results are not an endorsement of Microsoft. Any reliance on these results is at the third party’s own risk.
5 Microsoft estimate based on IDC data (SMB TAM: $777B by FY26; $1T+ by 2030), as published on the Microsoft Partner Blog, “The Microsoft Marketplace opportunity for channel ecosystem,” November 20, 2025.
6 Omdia, Partner Ecosystem Multiplier – The Microsoft Marketplace Opportunity, commissioned research sponsored by Microsoft, December 2025. Results are not an endorsement of Microsoft. Any reliance on these results is at the third party’s own risk.
Throughout this document, $ refers to USD.
The post Accelerating Frontier Transformation with Microsoft partners appeared first on The Official Microsoft Blog.
AI has moved quickly from experimentation to production. Customers want measurable business outcomes, along with security, governance and responsible AI built in from day one. Microsoft partners are a meaningful differentiator to deliver these objectives. They turn ideas into deployable solutions by prioritizing the highest value use cases, building the right data and security foundations…
The post Accelerating Frontier Transformation with Microsoft partners appeared first on The Official Microsoft Blog.Read More
Why are Name‑Value arguments not visible at function entry breakpoints in MATLAB R2025a?
I am using argument validation in a function that has multiple inputs including Name-Value pair arguments. When I set a breakpoint at the beginning of this function, only the first argument appears in the MATLAB R2025a Workspace immediately. The rest do not appear until after the arguments block finishes running. However, if I remove the Name-Value arguments, all of the values appear immediately.
Why does this occur? Is there a workaround?I am using argument validation in a function that has multiple inputs including Name-Value pair arguments. When I set a breakpoint at the beginning of this function, only the first argument appears in the MATLAB R2025a Workspace immediately. The rest do not appear until after the arguments block finishes running. However, if I remove the Name-Value arguments, all of the values appear immediately.
Why does this occur? Is there a workaround? I am using argument validation in a function that has multiple inputs including Name-Value pair arguments. When I set a breakpoint at the beginning of this function, only the first argument appears in the MATLAB R2025a Workspace immediately. The rest do not appear until after the arguments block finishes running. However, if I remove the Name-Value arguments, all of the values appear immediately.
Why does this occur? Is there a workaround? namevalue, arguments, validation, breakpoint, workspace MATLAB Answers — New Questions
How to add a header to a printed or published PDF from a MATLAB script in MATLAB R2025a?
I am printing a MATLAB script to PDF in MATLAB R2025a, but the header with the timestamp is missing. This header was included automatically in MATLAB R2024b. How can I add the header back in R2025a?I am printing a MATLAB script to PDF in MATLAB R2025a, but the header with the timestamp is missing. This header was included automatically in MATLAB R2024b. How can I add the header back in R2025a? I am printing a MATLAB script to PDF in MATLAB R2025a, but the header with the timestamp is missing. This header was included automatically in MATLAB R2024b. How can I add the header back in R2025a? header, print, matlab, editor, pdf, date, filename MATLAB Answers — New Questions
Error converting python DataFrame to Table
I have used the following commands to load in a python .pkl file.
fid = py.open("data.pkl");
data = py.pickle.load(fid);
T = table(data);
This loads a python DataFrame object. Newer versions of MATLAB have the ability to convert this object to a table using the table command, which I tried but encountered the below error:
Error using py.pandas.DataFrame/table
Dimensions of the key and value must be the same, or the value must be scalar.
What does this error mean? I’m guessing it’s because the DataFrame object in the .pkl contains a couple nested fields. Most of the fields are simply 1xN numeric vectors, but a couple are 1xN objects which then have their own fields.
How can I convert this DataFrame object to something usable in MATLAB? I was given this datafile and did not generate it, and I am much more proficient in MATLAB than python, so I would rather solve this within MATLAB rather than having to create a python script or change how the file is created.I have used the following commands to load in a python .pkl file.
fid = py.open("data.pkl");
data = py.pickle.load(fid);
T = table(data);
This loads a python DataFrame object. Newer versions of MATLAB have the ability to convert this object to a table using the table command, which I tried but encountered the below error:
Error using py.pandas.DataFrame/table
Dimensions of the key and value must be the same, or the value must be scalar.
What does this error mean? I’m guessing it’s because the DataFrame object in the .pkl contains a couple nested fields. Most of the fields are simply 1xN numeric vectors, but a couple are 1xN objects which then have their own fields.
How can I convert this DataFrame object to something usable in MATLAB? I was given this datafile and did not generate it, and I am much more proficient in MATLAB than python, so I would rather solve this within MATLAB rather than having to create a python script or change how the file is created. I have used the following commands to load in a python .pkl file.
fid = py.open("data.pkl");
data = py.pickle.load(fid);
T = table(data);
This loads a python DataFrame object. Newer versions of MATLAB have the ability to convert this object to a table using the table command, which I tried but encountered the below error:
Error using py.pandas.DataFrame/table
Dimensions of the key and value must be the same, or the value must be scalar.
What does this error mean? I’m guessing it’s because the DataFrame object in the .pkl contains a couple nested fields. Most of the fields are simply 1xN numeric vectors, but a couple are 1xN objects which then have their own fields.
How can I convert this DataFrame object to something usable in MATLAB? I was given this datafile and did not generate it, and I am much more proficient in MATLAB than python, so I would rather solve this within MATLAB rather than having to create a python script or change how the file is created. python, table, dataframe MATLAB Answers — New Questions
I want to install Matlab on my desktop with connection from Network license server . Steps required
I want to install Matlab on my desktop with connection from Network license server . Steps requiredI want to install Matlab on my desktop with connection from Network license server . Steps required I want to install Matlab on my desktop with connection from Network license server . Steps required client installation MATLAB Answers — New Questions
UAV Toolbox Support Package for PX4 Autopilots — SITL plant simulation running much slower after recent windows update
I’ve been developing a custom controller using this toolbox, and everything has been working well after following the examples provided in the documentation.
However, after this last Tuesday, April 14th 2026, I attempted to monitor and tune my controller, and it threw an error saying the build failed and I need to go through the toolbox setup again (this is the first time I’ve gotten this error). I did this, and that is when problems developed. When using a simulink plant simulation for the PX4 SITL Host, the plant can no longer run in real time. It runs at about a quarter of the speed. I booted up the PX4 monitor and tune with plant example, and even that example is now running slowly too! Is it possible the recent security update affected TCP communication between Windows and the WSL network adapter?
Also, I am on R2025a.I’ve been developing a custom controller using this toolbox, and everything has been working well after following the examples provided in the documentation.
However, after this last Tuesday, April 14th 2026, I attempted to monitor and tune my controller, and it threw an error saying the build failed and I need to go through the toolbox setup again (this is the first time I’ve gotten this error). I did this, and that is when problems developed. When using a simulink plant simulation for the PX4 SITL Host, the plant can no longer run in real time. It runs at about a quarter of the speed. I booted up the PX4 monitor and tune with plant example, and even that example is now running slowly too! Is it possible the recent security update affected TCP communication between Windows and the WSL network adapter?
Also, I am on R2025a. I’ve been developing a custom controller using this toolbox, and everything has been working well after following the examples provided in the documentation.
However, after this last Tuesday, April 14th 2026, I attempted to monitor and tune my controller, and it threw an error saying the build failed and I need to go through the toolbox setup again (this is the first time I’ve gotten this error). I did this, and that is when problems developed. When using a simulink plant simulation for the PX4 SITL Host, the plant can no longer run in real time. It runs at about a quarter of the speed. I booted up the PX4 monitor and tune with plant example, and even that example is now running slowly too! Is it possible the recent security update affected TCP communication between Windows and the WSL network adapter?
Also, I am on R2025a. px4, uav toolbox support package, monitor and tune, simulink, plant MATLAB Answers — New Questions
How to put a title on a colorbar?
I have a 3D surface surf(X,Y,Z) viewed from view(0,90) with a colorbar which I want to put a title on. The help instructions talk about an lcolorbar, TitleString and ZlabelString but there’s no example and I’m lost.
[X Y]=meshgrid(0:100,0:100);
Z=Y;
surf(X,Y,Z);
view(0,90);
hcb=colorbar;
?????? what next to put a title on the colorbar please ?????
Maybe something like set(get(hcb,’Title’),’cb title’) but I wouldn’t be asking if that worked …
Thanks.I have a 3D surface surf(X,Y,Z) viewed from view(0,90) with a colorbar which I want to put a title on. The help instructions talk about an lcolorbar, TitleString and ZlabelString but there’s no example and I’m lost.
[X Y]=meshgrid(0:100,0:100);
Z=Y;
surf(X,Y,Z);
view(0,90);
hcb=colorbar;
?????? what next to put a title on the colorbar please ?????
Maybe something like set(get(hcb,’Title’),’cb title’) but I wouldn’t be asking if that worked …
Thanks. I have a 3D surface surf(X,Y,Z) viewed from view(0,90) with a colorbar which I want to put a title on. The help instructions talk about an lcolorbar, TitleString and ZlabelString but there’s no example and I’m lost.
[X Y]=meshgrid(0:100,0:100);
Z=Y;
surf(X,Y,Z);
view(0,90);
hcb=colorbar;
?????? what next to put a title on the colorbar please ?????
Maybe something like set(get(hcb,’Title’),’cb title’) but I wouldn’t be asking if that worked …
Thanks. colorbar title surf titlestring MATLAB Answers — New Questions









