Category: News
Plot showing gaps in numerical solution
I’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
endI’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
end I’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
end numerical solution, nonlinear-equations, root-finding, polar-coordinates, contour-gaps MATLAB Answers — New Questions
Monthly Update #122 Available for Office 365 for IT Pros eBook
August 2025 Update Available for Subscribers to Download

The Office 365 for IT Pros team is delighted to announce the availability of monthly update #122 for Office 365 for IT Pros (2026 edition). This is the first update since the publication of the 2026 book, and it includes a bunch of changes covering new information unearthed or researched over the last month. You can see more details about the updates in our change log.
Subscribers for the 2026 edition can fetch the updated files using the link in the receipt emailed to them from Gumroad.com after their purchase. The link is personalized to the subscriber and always fetches the latest files. See our FAQ for more information.
Many previous subscribers have renewed for the 2026 edition. We are humbled by the level of support we receive from the technical community. If you are a previous subscriber, you should have received email from us with instructions about how to extend your subscription at a heavily discounted rate. Because we became tired of Gumroad.com emails being blocked as spam, we sent individual emails to thousands of previous subscribers. I believe every subscriber should have received a note from us by now. If not, please contact us at o365itprosrenewals AT office365itpros.com.
Microsoft Cloud Keeps on Growing
Microsoft released their FY25 Q4 results on July 30. One of the eye-popping figures was a big leap in Microsoft Cloud revenue to $46.7 billion (up 27% year-over-year). That’s $21 billion more in a quarter than Microsoft earned in FY23 Q1 and represents an annualized run rate of $186.8 billion. Microsoft 365 continues to grow strongly with its revenue up 16% year-over-year. Seat growth is slowing and was 6% year-over-year, mostly in SME and frontline workers. Slower seat growth is inevitable given the size of the installed base (over 430 million, according to CFO Amy Hood when discussing the Microsoft FY25 Q3 results). The growth in revenues is due to upsell to more expensive licenses, including Microsoft 365 Copilot.
Speaking about Copilot, in the best traditional of misleading figures given out during results briefings, Satya Nadella said “Our family of Copilot apps has surpassed 100 million monthly active users across commercial and consumer.” The number claimed sounds impressive, but what everyone really wants to know is how many Microsoft 365 Copilot paid seats are in active use. It was followed by the assertion that “Purview is used by three quarters of Microsoft 365 Copilot customers to protect their data.” Again, no real data to measure anything against.
Interestingly, once again Microsoft didn’t give an updated number for Teams users. The number remains at the 320 million monthly active users claimed in October 2023.
Speaking of numbers, Microsoft reported a 99.995% performance against the Microsoft 365 SLA for the second quarter of 2025. That might come as news to any tenant that experienced a significant outage between April and June, but the result is unsurprising given the number of tenants and seats. It takes a massive outage involving tens of millions of seats over several hours to budge the SLA needle slightly. Outages happen all the time, but none at the level of severity necessary to impact the SLA
Update for the Automating Microsoft 365 with PowerShell eBook
As is our practice, we released an update for the Automating Microsoft 365 with PowerShell eBook earlier than the monthly Office 365 for IT Pros update. The PowerShell book is included with Office 365 for IT Pros, so subscribers should see 4 files when they access the update on Gumroad.com (PDF and EPUB files for both books).
The PowerShell book is available separately, but Office 365 for IT Pros subscribers do not have to purchase it. If you want to read a physical copy, you can buy a paperback version from Amazon.com. I haven’t actually seen the paperback yet, but I plan to get some author copies for delivery to the TEC 2025 conference in Minneapolis at the end of September. Come to TEC and you might get a signed copy! If not, you can still attend TEC sessions delivered by Tony, Paul, Brian, and Michel.
On to Monthly Update #123
Microsoft 365 doesn’t stop changing and we don’t stop analyzing and documenting the most important technical information for Microsoft 365 tenant administrators. It’s what we’ve done since 2015.
Backslash (mldivide) slower than inverse and multiplication
The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A)The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A) The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A) mldivide, inv, slow MATLAB Answers — New Questions
How to integrate PEM electrolysis system and PEM fuel cell system to form the DC Electrical Power System?
Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance.Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance. Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance. pem electrolysis system, pem fuel cell system, solid-oxide fuel cell MATLAB Answers — New Questions
How to change the background color of uiradiobuttons?
I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off!I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off! I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off! appdesigner, uiradiobuttons MATLAB Answers — New Questions
Target error. Application connection problem with speedgoat, Simulink real-time
I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application."I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application." I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application." speedgoat, connection, application, real-time MATLAB Answers — New Questions
Measure the model mass and moment of inertia of the component detached from the main body
I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes?I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes? I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes? inertia sensor, weld joint MATLAB Answers — New Questions
DLP Diagnostics Available in Purview Portal
New Way to Run DLP Diagnostics Through GUI Instead of PowerShell
The nature of any moderately large Microsoft 365 tenant is that it’s likely to have a collection of different types of policies. Making sure that Entra ID conditional access policies interact well together is essential to control inbound connections and a mistake there can lead to administrators locking themselves out of a tenant. Making mistakes in data lifecycle management (retention) policies can also have grave consequences, such as the famous example from 2020 in the KPMG tenant when an error in a retention policy deleted a bunch of Teams chats. Errors in Data loss prevention (DLP) policies can lead to less obviously bad outcomes, but only because a mistake could end up with sensitive information leaking outside the organization without anyone’s knowledge.
Four DLP Diagnostics
Which brings us to message center notification MC904540 (last updated 9 July 2025, Microsoft 365 roadmap item 418566), announcing that DLP diagnostic options are now available for commercial tenants in the Microsoft Purview compliance portal (Figure 1).

Microsoft originally published the message center notification on 4 October 2024 in anticipation of a preview in December 2024. Alas, problems along the way forced the developers to roll back and rethink the implementation. After additional work, the portal boasts a set of four DLP diagnostics tests that replace the tests previously performed through the ComplianceDiagnostics PowerShell tool.
There’s no word whether additional tests are on the way. However, MC904540 mentions “diagnosing issues encountered while using Microsoft Information Protection (MIP) and Data Loss Prevention (DLP),” so it’s possible that plans are in place to provide diagnostic tests for information protection too.
Testing the DLP Diagnostics
In any case, the DLP diagnostics are intended to help identify the root cause of issues and provide remediation options. I found that some of the tests worked well while others were less impressive. For example, the test to figure out why a DLP policy didn’t signal an alert following a rule match was right on the money when it detected that the DLP rule didn’t include settings to generate an alert (Figure 2). The fix was easy once the fault was identified.

The test to diagnose if a user is covered by a DLP policy was less successful. The output of the test (Figure 3) hid some rule and policy names, and the attention to detail in the output is poor. Like Figure 2, where the reference to “ODB” should be spelt out as OneDrive for Business, the lack of capitalization for “exchange” and the lack of spaces in “OneDriveForBusiness” are easily-fixed bugs.

Perhaps it’s just my tenant where these problems emerged. Perhaps it’s a weird combination of the age of some of the DLP policies and their configurations that cause policy and rule names to disappear. For whatever reason, it was disappointing to see the lack of attention to detail feature in the DLP diagnostics. Although it might seem strange to worry about this kind of thing, experience shows that when attention isn’t paid to the small things in software, big issues might lurk. GitHub Copilot is very good at picking up issues like this and supports multiple languages, so it is really surprising to see Microsoft ship software with so many obvious UX errors.
None of the tests performed by DLP diagnostics are particularly sophisticated and all could be easily done by an experienced administrator who knows the DLP solution. In fairness, the target audience for DLP diagnostics is likely to be tenant administrators who don’t work with DLP very often and need some help to figure out why something might be going wrong.
The Value of Data Loss Prevention
DLP is an important Purview solution that often doesn’t receive enough attention. Microsoft has worked hard to expand DLP capabilities, especially in the area of endpoint devices, and the policies work well for Exchange Online, SharePoint Online, and OneDrive for Business, all of which only require E3 licenses. Including Teams in the mix requires a jump to E5, which has always seemed weird to me. And if you want to use the very valuable DLP policy for Copilot to block AI access to sensitive files, you’ll need Microsoft 365 Copilot licenses.
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.
Parfor HPC Cluster – How to Assign Objects to Same Core Consistently?
Hello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objectsHello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objects Hello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objects parallel computing, parfor, hpc, cluster, memory fragmentation MATLAB Answers — New Questions
How can I configure MATLAB to use the local offline documentation instead of the online documentation?
I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this?I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this? I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this? offline, documentation, installed, local, doc MATLAB Answers — New Questions
Error Using unitConvert from Celsius to Fahrenheit.
When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug.When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug. When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug. bug, symbolic MATLAB Answers — New Questions
Help with Solving PDE System with DAE in MATLAB
I hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
WilliamI hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
William I hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
William dae MATLAB Answers — New Questions
How to Block OWA and Use the New Outlook
Use a Conditional Access Policy to Block Access to OWA Instead of CAS Settings
Microsoft has updated its advice about how to disable access to OWA while retaining access to the new Outlook for Windows. The update is in MC922623, originally published in October 2024 and updated on 28 July 2025. In a nutshell, Microsoft recommends using a conditional access policy to block access to OWA rather than the mailbox-level OWAEnabled CAS (Client Access Server) setting in CAS.
Apart from the need to deploy Entra P1 licenses, that advice seems straightforward enough. But there are some issues to understand before rushing to deploy a new conditional access policy. Let’s discuss two important points.
Two CAS Settings
The first thing is that there’s actually two policy settings to consider: OWAEnabled and OneWinNativeOutlookEnabled (discussed in this article). Both settings need to be $true in the OWA mailbox policy assigned to user accounts to allow the new Outlook for Windows to load. It seems strange to have two settings, but it’s due to the technical debt accrued over the years managing OWA in Exchange Server and Exchange Online and the need to provide a control to deal with a new client. The fact that OWA and “Monarch” (the new Outlook for Windows) share a lot of code doesn’t help in some respects.
For the purpose of this debate, both OWAEnabled and OneWinNativeOutlookEnabled should be left as $true. In MC922623, Microsoft says keeping both settings at $true will have “no impact on users’ ability to access outlook for the web since the work was already done to block Outlook for the web with another policy.”
Well, that’s not strictly true (no pun intended). For instance, setting OWAEnabled to $false and OneWinNativeOutlookEnabled to $true might seem like the way to block OWA and allow the new Outlook. However, although this configuration blocks OWA, it also stops the new Outlook from being able to download or send messages. Another side-effect (aka, a bug) is that creating a message makes Outlook create multiple copies of the message in the Drafts folder. Overall, it’s best to play safe and ensure that both are kept at $true.
Updated CAS settings can take up to 15 minutes before they are effective.
The Conditional Access Policy to Block OWA
The reference in MC922623 to ”work done to block OWA” is to the conditional access policy (see instructions in the link above). What’s happening here is that Entra ID invokes the conditional access policy as part of its processing of inbound connections. If the inbound connection requests to use Office 365 Exchange Online (the app used by OWA – Figure 1), Entra ID can refuse the connection because the conditional access policy is configured to block OWA. The connection therefore terminates and never gets to Exchange Online for that server to process the connection and check the CAS mailbox settings to determine if mailbox access is permitted with the client.

The downside of using a conditional access policy is that blocking access to the Office 365 Exchange Online app also stops the Teams browser client working (the Teams desktop app continues to work because it uses a different app). I think the reason why this happens is that the Teams browser app shares some components with OWA (like the calendar). Entra ID sees an inbound connection attempting to use an OWA component and terminates the connection in line with the conditional access policy. The dependency of Teams on Exchange Online is listed in Microsoft’s service dependency for conditional access policies guidance.
The nice thing about conditional access policies is that updated settings or new policies become effective almost immediately (Figure 2). Immediacy can also be a bad thing if you make a mistake and lock yourself out of the tenant.

Sometimes Hard to Have Clean Lines in Microsoft 365
The complex interconnected nature of Microsoft 365 sometimes makes it difficult to have nice clean demarcations between applications and workloads. The complex interconnected nature of Microsoft 365 sometimes makes it difficult to have nice clean demarcations between applications and workloads. As we see here, blocking one app with a conditional access policy can have unexpected consequences for other apps.
It’s nice to have choices in how to manage clients, and it makes sense to use a conditional access policy if you have Entra P1 licenses and you can accept the downside of losing Teams browser access. Otherwise, stay with the CAS settings and block access the old way.
Support the work of the Office 365 for IT Pros team by subscribing to the Office 365 for IT Pros eBook. Your support pays for the time we need to track, analyze, and document the changing world of Microsoft 365 and Office 365. Only humans contribute to our work!
Add column with values to table based on value in existing column (look up)
I want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
endI want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
end I want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
end column, lookup, matrix, table, match, matching MATLAB Answers — New Questions
Creating a grouped bar plot from a table having multiple column
I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table.I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table. I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table. group bar or stacked plot with multiple columns MATLAB Answers — New Questions
fractional discrete henon map
I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide.I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide. I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide. henon fractional map, bifurcation diagram MATLAB Answers — New Questions
How can I declare Hexadecimal enum constants in a classdef
classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers!classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers! classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers! classes, constants, hexadecimal, enums MATLAB Answers — New Questions
Entra ID Governance Levies Charges for Guest Accounts
Monthly Fee for Guest Accounts That Use ID Governance Features
I recently revisited Entra ID access reviews to find a banner warning about charges for guest accounts that consume Entra ID Governance features (Figure 1). Apparently, the new charges started in June 2025 and are paid for on a metered basis through an Azure subscription associated with the Entra tenant.

The relevant documentation reveals the set of chargeable features for guest accounts. Access reviews for inactive guest accounts are on the list, and that’s why the banner showed up.
Charging is on a monthly active user basis (MAU). This is not the same as the MAU for general guest access to Microsoft 365 groups, teams, and sites, which covers normal activities for up to 50,000 guest accounts monthly. In this case, a monthly active user is any guest account that takes advantage of one of the listed Entra ID governance feature during a month. Every ID Governance MAU incurs a charge of $0.75 (six times the price charged for guest accounts that surpass the 50,000 MAU threshold for normal activity).
Going back to access reviews, if my calculation is correct, a tenant using access reviews to detect and remove inactive guests (as recommended by Microsoft) with access reviews scheduled on a quarterly basis will incur a $3 cost per guest account (4 x 0.75 x number of guests). That might seem like small beans, but costs have a corrosive habit of accruing over time.
DIY Inactive Guest Reviews
It’s not as if Microsoft performs any great magic to detect inactive guests. It’s perfectly feasible to write your own inactive guest removal process and schedule the process using Azure Automation. Your version might not be as pretty as Microsoft’s is, but you can build more intelligence into the review by including searches against audit log data to detect activities other than sign-ins. And a DIY process won’t require Entra P2 licenses either.
Coding a Report of Likely Costs
The Microsoft documentation includes the helpful advice that “You can identify actions that will be billed to the Microsoft Entra ID Governance for guests add-on by looking at your audit logs.” Even a small tenant will have large quantities of data in the Entra ID audit log, so some automation is needed. The data from the Entra ID audit log is eventually ingested into the unified audit log, but in this case, we’ll work with the Entra ID data.
The steps required to find audit log entries that mark chargeable transactions are:
Run the Connect-MgGraph cmdlet to open an interactive Microsoft Graph session. The session needs consent for the AuditLog.Read.All permission, and the signed in user must be an administrator with a role that allows access to the audit logs, like Reports Reader or Security administrator. Finally, the account must have an Entra P1 license, which is needed for API access to audit logs.
Now run the Get-MgAuditLogDirectoryAudit cmdlet to retrieve the audit log entries to analyze. Because Microsoft bills monthly, it seems logical to fetch the logs for the current month:
$FirstDayOfMonth = (Get-Date -Day 1).ToString('yyyy-MM-ddT00:00:00Z') [array]$AuditRecords = Get-MgAuditLogDirectoryAudit -All -Filter "activityDateTime ge $FirstDayOfMonth and result eq 'success'"
I can’t find a good server-side filter to find the audit records for chargeable events, so a client-side filter does the trick:
[array]$GovernanceRecords = $AuditRecords | Where-Object { $_.additionalDetails.key -eq "GovernanceLicenseFeatureUsed"}
The next part scans the governance records to find if guest users are involved. If so, data is extracted and reported:
If ('"Guest"' -in $Record.TargetResources.ModifiedProperties.NewValue) { $UserDisplayName = ($Record.TargetResources.ModifiedProperties | Where-Object {$_.DisplayName -eq "DisplayName"}).NewValue $UserEmail = ($Record.TargetResources.ModifiedProperties | Where-Object {$_.DisplayName -eq "Email"}).NewValue $UserUPN = ($Record.TargetResources.ModifiedProperties | Where-Object {$_.DisplayName -eq "PrincipalName"}).NewValue $UserId = ($Record.TargetResources.ModifiedProperties | Where-Object {$_.DisplayName -eq "TargetId"}).NewValue }
After all records are processed, a report file containing every chargeable event for guest records is available. To reduce the set to individual users, the script sorts the data to extract unique values:
[array]$GovernanceUsers = $GovernanceReport | Sort-Object UserId -Unique | Select-Object UserId, UserDisplayName, UserEmail, UserUPN
Finally, the script reports the results (Figure 2).

You can download the script I wrote from the Office 365 IT Pros GitHub repository.
No Great Insight from Azure Billing
The billing reports for the Azure subscription that is charged has a line item for “P2 monthly active users.” I haven’t seen a detailed list of the guest accounts covered by the charge. Perhaps Microsoft will include this information in the future. If not, I guess it should be easy to correlate the charges levied against a subscription with the list of guest accounts extracted from the audit logs.
Learn more about how the Microsoft 365 applications really work on an ongoing basis by subscribing to the Office 365 for IT Pros eBook. Our monthly updates keep subscribers informed about what’s important across the Office 365 ecosystem.
Find your Office apps in Windows – Microsoft Support
Learn how to find your Office apps in Windows 10 by searching for them in the search box on the taskbar.
I have enabled SSH and am accessing my Raspberry Pi 5 using VNC. The Raspberry Pi is also connected to the network. However, when I try to check the connection, the system sho
Post Content Post Content simulink, matlab MATLAB Answers — New Questions