Month: July 2025
HYBRID ENERGY STORAGE SYSTEM SUPERCAPACITOR BATTERY OFF-GRID SOLAR POWER SYSTEM
Hi friends, can I ask for your help? I am a student and am currently working on my final project. I’m stuck and don’t know who to ask for help. I’m developing a HESS supercapacitor battery system for an off-grid solar power plant. However, I’m not getting the results I want. I’m confused by the results because the current or power in the supercapacitor isn’t functioning properly, and the current or power from the battery reacts too quickly, so it doesn’t show the benefits of the supercapacitor. Does anyone know where the problem lies and how to solve it? I am willing to pay if necessary, but my funds are limited. I will do my best to make it work.Hi friends, can I ask for your help? I am a student and am currently working on my final project. I’m stuck and don’t know who to ask for help. I’m developing a HESS supercapacitor battery system for an off-grid solar power plant. However, I’m not getting the results I want. I’m confused by the results because the current or power in the supercapacitor isn’t functioning properly, and the current or power from the battery reacts too quickly, so it doesn’t show the benefits of the supercapacitor. Does anyone know where the problem lies and how to solve it? I am willing to pay if necessary, but my funds are limited. I will do my best to make it work. Hi friends, can I ask for your help? I am a student and am currently working on my final project. I’m stuck and don’t know who to ask for help. I’m developing a HESS supercapacitor battery system for an off-grid solar power plant. However, I’m not getting the results I want. I’m confused by the results because the current or power in the supercapacitor isn’t functioning properly, and the current or power from the battery reacts too quickly, so it doesn’t show the benefits of the supercapacitor. Does anyone know where the problem lies and how to solve it? I am willing to pay if necessary, but my funds are limited. I will do my best to make it work. hess, hybrid, energy, system, storage, battery_system_management, power_electronics_control, simpowersystems, pv, solar, pi, pid, supercapacitor, battery MATLAB Answers — New Questions
FOC in Simulink for induction motor: Te = 0 and only one PWM phase reaches Vdc
I’m developing a Field Oriented Control (FOC) system for an Induction Motor (IM) in Simulink. The model includes:
Inverter driven by a PWM block
Rotor position and speed measurement or estimation
Clarke and Park transformations
PID controllers for Id and Iq
Reference inputs for rotor flux and rotor angle (θ<sub>r</sub>)
The PID controllers are configured with standard parameters and anti-windup enabled
Issue:
The electromagnetic torque Te stays at zero, even when a non-zero speed reference is applied
Only one of the PWM output voltages reaches Vdc; the other two remain very low or close to zero
Checks already performed:
The motor feedback currents seem correct
Iq ≠ 0 and Id = 0, as expected
The inverter output voltages toward the motor appear to be valid
The reference signals reach the PID controllers properly
Attached:
A picture of the full FOC model in Simulink
Parameter settings of the induction motor
Scopes showing Te and the PWM input signalsI’m developing a Field Oriented Control (FOC) system for an Induction Motor (IM) in Simulink. The model includes:
Inverter driven by a PWM block
Rotor position and speed measurement or estimation
Clarke and Park transformations
PID controllers for Id and Iq
Reference inputs for rotor flux and rotor angle (θ<sub>r</sub>)
The PID controllers are configured with standard parameters and anti-windup enabled
Issue:
The electromagnetic torque Te stays at zero, even when a non-zero speed reference is applied
Only one of the PWM output voltages reaches Vdc; the other two remain very low or close to zero
Checks already performed:
The motor feedback currents seem correct
Iq ≠ 0 and Id = 0, as expected
The inverter output voltages toward the motor appear to be valid
The reference signals reach the PID controllers properly
Attached:
A picture of the full FOC model in Simulink
Parameter settings of the induction motor
Scopes showing Te and the PWM input signals I’m developing a Field Oriented Control (FOC) system for an Induction Motor (IM) in Simulink. The model includes:
Inverter driven by a PWM block
Rotor position and speed measurement or estimation
Clarke and Park transformations
PID controllers for Id and Iq
Reference inputs for rotor flux and rotor angle (θ<sub>r</sub>)
The PID controllers are configured with standard parameters and anti-windup enabled
Issue:
The electromagnetic torque Te stays at zero, even when a non-zero speed reference is applied
Only one of the PWM output voltages reaches Vdc; the other two remain very low or close to zero
Checks already performed:
The motor feedback currents seem correct
Iq ≠ 0 and Id = 0, as expected
The inverter output voltages toward the motor appear to be valid
The reference signals reach the PID controllers properly
Attached:
A picture of the full FOC model in Simulink
Parameter settings of the induction motor
Scopes showing Te and the PWM input signals foc, simulink, matlab, induction-motor, pwm, vector control, te zero MATLAB Answers — New Questions
Is it possible to add a secondary y axis while using the stackedplot function?
Is it possible to add a secondary y axis while using the stackedplot function? I have some overlayed data in my stackedplot and I would like to add a secondary y axis for some of the individual plots. Is this possible?Is it possible to add a secondary y axis while using the stackedplot function? I have some overlayed data in my stackedplot and I would like to add a secondary y axis for some of the individual plots. Is this possible? Is it possible to add a secondary y axis while using the stackedplot function? I have some overlayed data in my stackedplot and I would like to add a secondary y axis for some of the individual plots. Is this possible? stackedplot, secondary yaxis MATLAB Answers — New Questions
August 2025 Update for Automating Microsoft 365 with PowerShell eBook
Version 14 of Automating Microsoft 365 with PowerShell eBook Available for Download

The Office 365 for IT Pros team is delighted to announce the release of version 14 of the Automating Microsoft 365 with PowerShell eBook. The book is included in the Office 365 for IT Pros eBook bundle and is available for separate purchase by those who are only interested in PowerShell. Naturally, we recommend the full Office 365 for IT Pros bundle! We’ve also updated the paperback edition of Automating Microsoft 365 with PowerShell that’s available on a print on demand basis from Amazon.com.
This update includes new information about Microsoft Graph APIs, the Microsoft Graph PowerShell SDK, code examples, insights gleaned from experience of using Graph APIs and cmdlets in scripts and with Azure Automation, and so on. Version 14 spans 350 content-rich pages and is essential reading for anyone who wants to work with a Microsoft 365 tenant through PowerShell.
If you have an Office 365 for IT Pros subscription or have purchased the separate version of Automating Microsoft 365 with PowerShell, you can download the updated PDF and EPUB files now. Use the View content link in the receipt you were emailed after taking out your subscription to get the files.
Microsoft Graph PowerShell SDK Updates
Speaking of the Microsoft Graph PowerShell SDK, Microsoft released V2.29 on July 9, 2025, and followed up with V2.29.1 a few days later. Regretfully, there was a total lack of formal communication from Microsoft about why the point release was needed so soon after V2.29 appeared. Sources behind the scenes say that a tooling problem was identified that Microsoft felt they should fix. The Microsoft.Graph.BackupRestore module was the only one affected by the V2.29.1 update.
Be aware that the issue with Azure Automation PowerShell runtimes and the Microsoft Graph PowerShell SDK persists. In a nutshell, use PowerShell V5.1 modules and runbooks with the Graph PowerShell SDK (including V2.29.1) until better news emerges.
Metered API Changes
On July 25, Microsoft published message center notification MC1122144 to announce that they are changing how metered APIs in Microsoft Graph incur costs based on usage. Effective August 25, 2025, a set of APIs will no longer be chargeable and it will not be necessary to set up an Azure subscription to pay for the metered use of the APIs.
To say that this announcement was surprising is an understatement. The set of APIs include the assignSensitivityLabel API used to assign sensitivity labels to Office files and PDFs stored in SharePoint Online and OneDrive for Business (here’s how to assign labels with PowerShell). I guess tenants can now build their own auto-label policies to apply sensitivity labels to target content. The APIs also include the Teams chat export API, which is a good example of what Microsoft calls a high-capacity API (access to data at scale). Perhaps Microsoft now considers that its infrastructure can cope with demands from apps to access large quantities of Teams data.
In any case, after August 25, 2025, Azure will register no further billing events when apps call the APIs and customers will receive a final bill.
On to Version 15 of the PowerShell eBook
PowerShell doesn’t remain static and nor do the modules used in Microsoft 365 tenants. We’ll continue working on the Automating Microsoft 365 with PowerShell eBook to add more content by covering additional Graph APIs and new cmdlets introduced in other Microsoft 365 modules, as well as adding more practical examples to demonstrate the principles of using PowerShell to solve real-world problems.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive monthly insights into what happens, why it happens, and what new features and capabilities mean for your tenant.
please help to find the roots of dispersion relation w^2=g*k_0*tanh(k_0*h) and w^2=-g*k_m*tan(k_m*h). for m=0 and m=1,2,3,….. where w=2*pi/T, T is time period (constant) and
please help to find the roots of dispersion relation w^2=g*k_0*tanh(k_0*h) and w^2=-g*k_m*tan(k_m*h). for m=0 and m=1,2,3,….. where w=2*pi/T, T is time period (constant) and h is constant, k=2*pi/lambdaplease help to find the roots of dispersion relation w^2=g*k_0*tanh(k_0*h) and w^2=-g*k_m*tan(k_m*h). for m=0 and m=1,2,3,….. where w=2*pi/T, T is time period (constant) and h is constant, k=2*pi/lambda please help to find the roots of dispersion relation w^2=g*k_0*tanh(k_0*h) and w^2=-g*k_m*tan(k_m*h). for m=0 and m=1,2,3,….. where w=2*pi/T, T is time period (constant) and h is constant, k=2*pi/lambda k km dispersion relation water wave owc MATLAB Answers — New Questions
Export True and Predicted Class Labels from All Models in Classification Learner to CSV/Excel for Research Report
I am using MATLAB’s Classification Learner App to train multiple models (e.g., SVM, KNN, NN, etc.) on my dataset. The app displays the confusion matrix for each model individually, which is helpful.
For my research, I want to export the predicted class labels along with the true class labels for each trained model into a single .csv or .xlsx file — ideally including:
Model name
True class label
Predicted class label
How can I export these predictions for all models from Classification Learner into a table form from the classifier learner?I am using MATLAB’s Classification Learner App to train multiple models (e.g., SVM, KNN, NN, etc.) on my dataset. The app displays the confusion matrix for each model individually, which is helpful.
For my research, I want to export the predicted class labels along with the true class labels for each trained model into a single .csv or .xlsx file — ideally including:
Model name
True class label
Predicted class label
How can I export these predictions for all models from Classification Learner into a table form from the classifier learner? I am using MATLAB’s Classification Learner App to train multiple models (e.g., SVM, KNN, NN, etc.) on my dataset. The app displays the confusion matrix for each model individually, which is helpful.
For my research, I want to export the predicted class labels along with the true class labels for each trained model into a single .csv or .xlsx file — ideally including:
Model name
True class label
Predicted class label
How can I export these predictions for all models from Classification Learner into a table form from the classifier learner? confusion matrix, csv file MATLAB Answers — New Questions
Difference between integral and cumtrapz.
I have a tempral data series, which I need to integrate. In order to understand how Matlab does that, I start with a parabola as the data series. Could you guys please explain me why I get completely different results using the integral and cumtrapz funtions? The cumtrapz is giving me a cubic function, but I have no idea why it is only positive and I also do not understand the limits. My understanding is that the answer should be simple: intfx = x^3/3…
x = [-10:0.01:10]’;
fx = x.^2;
% intfx = integral(@(x) fx, x(1), x(end), ‘ArrayValued’, true);
intfx = cumtrapz(fx,x);
plot(x,fx,’b’)
hold on
plot(x,intfx,’r’)I have a tempral data series, which I need to integrate. In order to understand how Matlab does that, I start with a parabola as the data series. Could you guys please explain me why I get completely different results using the integral and cumtrapz funtions? The cumtrapz is giving me a cubic function, but I have no idea why it is only positive and I also do not understand the limits. My understanding is that the answer should be simple: intfx = x^3/3…
x = [-10:0.01:10]’;
fx = x.^2;
% intfx = integral(@(x) fx, x(1), x(end), ‘ArrayValued’, true);
intfx = cumtrapz(fx,x);
plot(x,fx,’b’)
hold on
plot(x,intfx,’r’) I have a tempral data series, which I need to integrate. In order to understand how Matlab does that, I start with a parabola as the data series. Could you guys please explain me why I get completely different results using the integral and cumtrapz funtions? The cumtrapz is giving me a cubic function, but I have no idea why it is only positive and I also do not understand the limits. My understanding is that the answer should be simple: intfx = x^3/3…
x = [-10:0.01:10]’;
fx = x.^2;
% intfx = integral(@(x) fx, x(1), x(end), ‘ArrayValued’, true);
intfx = cumtrapz(fx,x);
plot(x,fx,’b’)
hold on
plot(x,intfx,’r’) integral, cumtrapz MATLAB Answers — New Questions
dispersion equation in water waves
I am solving dispersion equation for water waves. I already solved it but with small h now i am using the same code but having different h and it give me incorrect evenscent modes. How i can fix my this code that it works well. Below is my code
clc;
close all;
clear all;
N = 10; % Terms number used in region I
% — 2. Dimensional geometry & environment ———————
RI = 34.5; % [m] inner / entrance radius (fully open ⇒ RI = RT)
RE = 47.5; % [m] outer hull radius (used for k0*RE axis)
d = 38.0; % [m] draft = free-surface → rim (water-column length)
h = 200; % [m] total water depth (free-surface → seabed)
b = h – d; % [m] clearance rim → seabed (= 162 m, not usually used)
g=9.81;
k0RE = linspace(5, 35, 200); % 200 points, dimension-less
I_given_wavenumber = 1;
% ————— ① pre-allocate
for j = 1:length(k0RE)
if I_given_wavenumber == 1
wk = k0RE(j)/RE; %wavenumber
omega = sqrt(g*wk*tanh(wk*h)); %wave radian frequency
fun_alpha = @(x) omega^2 + g*x*tan(x*h); %dispersion equation for evanescent modes
end
for n = 1:N
if n ==1
k(n) = -1i*wk;
else
x0_alpha = [(2*n -3)*pi/2./h, (2*n -1)*pi/2./h]; % Narrow interval
k(n) = fsolve(fun_alpha, mean(x0_alpha));
end
end
endI am solving dispersion equation for water waves. I already solved it but with small h now i am using the same code but having different h and it give me incorrect evenscent modes. How i can fix my this code that it works well. Below is my code
clc;
close all;
clear all;
N = 10; % Terms number used in region I
% — 2. Dimensional geometry & environment ———————
RI = 34.5; % [m] inner / entrance radius (fully open ⇒ RI = RT)
RE = 47.5; % [m] outer hull radius (used for k0*RE axis)
d = 38.0; % [m] draft = free-surface → rim (water-column length)
h = 200; % [m] total water depth (free-surface → seabed)
b = h – d; % [m] clearance rim → seabed (= 162 m, not usually used)
g=9.81;
k0RE = linspace(5, 35, 200); % 200 points, dimension-less
I_given_wavenumber = 1;
% ————— ① pre-allocate
for j = 1:length(k0RE)
if I_given_wavenumber == 1
wk = k0RE(j)/RE; %wavenumber
omega = sqrt(g*wk*tanh(wk*h)); %wave radian frequency
fun_alpha = @(x) omega^2 + g*x*tan(x*h); %dispersion equation for evanescent modes
end
for n = 1:N
if n ==1
k(n) = -1i*wk;
else
x0_alpha = [(2*n -3)*pi/2./h, (2*n -1)*pi/2./h]; % Narrow interval
k(n) = fsolve(fun_alpha, mean(x0_alpha));
end
end
end I am solving dispersion equation for water waves. I already solved it but with small h now i am using the same code but having different h and it give me incorrect evenscent modes. How i can fix my this code that it works well. Below is my code
clc;
close all;
clear all;
N = 10; % Terms number used in region I
% — 2. Dimensional geometry & environment ———————
RI = 34.5; % [m] inner / entrance radius (fully open ⇒ RI = RT)
RE = 47.5; % [m] outer hull radius (used for k0*RE axis)
d = 38.0; % [m] draft = free-surface → rim (water-column length)
h = 200; % [m] total water depth (free-surface → seabed)
b = h – d; % [m] clearance rim → seabed (= 162 m, not usually used)
g=9.81;
k0RE = linspace(5, 35, 200); % 200 points, dimension-less
I_given_wavenumber = 1;
% ————— ① pre-allocate
for j = 1:length(k0RE)
if I_given_wavenumber == 1
wk = k0RE(j)/RE; %wavenumber
omega = sqrt(g*wk*tanh(wk*h)); %wave radian frequency
fun_alpha = @(x) omega^2 + g*x*tan(x*h); %dispersion equation for evanescent modes
end
for n = 1:N
if n ==1
k(n) = -1i*wk;
else
x0_alpha = [(2*n -3)*pi/2./h, (2*n -1)*pi/2./h]; % Narrow interval
k(n) = fsolve(fun_alpha, mean(x0_alpha));
end
end
end evenscent modes, dispersion equation, water waves MATLAB Answers — New Questions
unpause from a uifigure
I’m used to using pause to run through a loop with plots and to pause until hitting return. Something like this:
for i = 1:100
plot(1:i)
pause
end
(Edit: to clarify, this is pressing return while focuse on the figure window)
Now however if the code launches a uifigure, it is unclear how to run the same code. Is there a way of programatically unpausing?
fig = uifigure;
ax = axes(fig)
for i = 1:100
plot(ax,1:i)
pause
end
I know I can use uiwait and uiresume but it is unclear why I can’t get code to work that supports pause as well.I’m used to using pause to run through a loop with plots and to pause until hitting return. Something like this:
for i = 1:100
plot(1:i)
pause
end
(Edit: to clarify, this is pressing return while focuse on the figure window)
Now however if the code launches a uifigure, it is unclear how to run the same code. Is there a way of programatically unpausing?
fig = uifigure;
ax = axes(fig)
for i = 1:100
plot(ax,1:i)
pause
end
I know I can use uiwait and uiresume but it is unclear why I can’t get code to work that supports pause as well. I’m used to using pause to run through a loop with plots and to pause until hitting return. Something like this:
for i = 1:100
plot(1:i)
pause
end
(Edit: to clarify, this is pressing return while focuse on the figure window)
Now however if the code launches a uifigure, it is unclear how to run the same code. Is there a way of programatically unpausing?
fig = uifigure;
ax = axes(fig)
for i = 1:100
plot(ax,1:i)
pause
end
I know I can use uiwait and uiresume but it is unclear why I can’t get code to work that supports pause as well. matlab, pause MATLAB Answers — New Questions
Stateflow Onramp Task 4: Transition from Off to On marked incorrect despite matching solution
I’m working on Stateflow Onramp > Creating State Charts > Default Transitions and Unreachable States (Task 4). The task asks to:
Add a transition from Off to On.
I added the transition exactly as shown in the solution — from the edge of the Off state to the edge of the On state. The chart visually matches the solution, and there’s a default transition to Off.
However, after clicking Submit, I still get the message:
Sorry, that answer is incorrect. Please review the requirements on the right side.
There are no conditions or events on the transition (as per the example), and both states are reachable, as both get highlighted during the run.
What could I be missing? Is there a hidden requirement not shown in the visual solution?
Thanks in advance!I’m working on Stateflow Onramp > Creating State Charts > Default Transitions and Unreachable States (Task 4). The task asks to:
Add a transition from Off to On.
I added the transition exactly as shown in the solution — from the edge of the Off state to the edge of the On state. The chart visually matches the solution, and there’s a default transition to Off.
However, after clicking Submit, I still get the message:
Sorry, that answer is incorrect. Please review the requirements on the right side.
There are no conditions or events on the transition (as per the example), and both states are reachable, as both get highlighted during the run.
What could I be missing? Is there a hidden requirement not shown in the visual solution?
Thanks in advance! I’m working on Stateflow Onramp > Creating State Charts > Default Transitions and Unreachable States (Task 4). The task asks to:
Add a transition from Off to On.
I added the transition exactly as shown in the solution — from the edge of the Off state to the edge of the On state. The chart visually matches the solution, and there’s a default transition to Off.
However, after clicking Submit, I still get the message:
Sorry, that answer is incorrect. Please review the requirements on the right side.
There are no conditions or events on the transition (as per the example), and both states are reachable, as both get highlighted during the run.
What could I be missing? Is there a hidden requirement not shown in the visual solution?
Thanks in advance! stateflow onramp, stateflow, matlab, simulink MATLAB Answers — New Questions
Drawnow for a single element (uilabel)
I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that).I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that). I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that). matlab gui, drawnow MATLAB Answers — New Questions
Problem with comments in XML files
I have an m-file that reads an XML file to get inputs. I’m running into a problem with comments in the XML file. Simply put, if I put a comment inside the tag but before the value, then I get an empty string for the value. Comments elsewhere don’t cause problems
Here’s a toy example of my m-file:
function userInputStruct = readToyXmlInput()
toyXmlInputFile = ‘toyXmlInput.xml’;
xDoc = xmlread(toyXmlInputFile);
userInput = xDoc.getElementsByTagName(‘userInput’);
userInputStruct = struct(); % Initialize
thisUserInput = userInput.item(0);
thisInput_01 = thisUserInput.getElementsByTagName(‘input_01’);
thisInput_01Element = thisInput_01.item(0);
temp01 = thisInput_01Element.getFirstChild.getData;
temp02 = string(temp01);
input_01 = strip(temp02);
userInputStruct.input_01 = input_01;
Here’s a toy example of my XML file:
<toyXmlInput>
<userInput>
<!– A comment here is fine. –>
<input_01>
Dummy input #1 <!– A comment here is fine. –>
<!– A comment here is fine. –>
</input_01>
</userInput>
</toyXmlInput>
Here’s a toy example of my XML file with a comment that causes a problem.
<toyXmlInput>
<userInput>
<input_01>
<!– A comment here causes problems –>
Dummy input #1
</input_01>
</userInput>
</toyXmlInput>
What am I doing wrong? What can I do differently so that comments after the tag but before the value don’t cause problems?
Worst-case, I’ll just document in the m-file and the XML file that there’s a limit on where comments can go. However, I’d prefer a more elegant solution.I have an m-file that reads an XML file to get inputs. I’m running into a problem with comments in the XML file. Simply put, if I put a comment inside the tag but before the value, then I get an empty string for the value. Comments elsewhere don’t cause problems
Here’s a toy example of my m-file:
function userInputStruct = readToyXmlInput()
toyXmlInputFile = ‘toyXmlInput.xml’;
xDoc = xmlread(toyXmlInputFile);
userInput = xDoc.getElementsByTagName(‘userInput’);
userInputStruct = struct(); % Initialize
thisUserInput = userInput.item(0);
thisInput_01 = thisUserInput.getElementsByTagName(‘input_01’);
thisInput_01Element = thisInput_01.item(0);
temp01 = thisInput_01Element.getFirstChild.getData;
temp02 = string(temp01);
input_01 = strip(temp02);
userInputStruct.input_01 = input_01;
Here’s a toy example of my XML file:
<toyXmlInput>
<userInput>
<!– A comment here is fine. –>
<input_01>
Dummy input #1 <!– A comment here is fine. –>
<!– A comment here is fine. –>
</input_01>
</userInput>
</toyXmlInput>
Here’s a toy example of my XML file with a comment that causes a problem.
<toyXmlInput>
<userInput>
<input_01>
<!– A comment here causes problems –>
Dummy input #1
</input_01>
</userInput>
</toyXmlInput>
What am I doing wrong? What can I do differently so that comments after the tag but before the value don’t cause problems?
Worst-case, I’ll just document in the m-file and the XML file that there’s a limit on where comments can go. However, I’d prefer a more elegant solution. I have an m-file that reads an XML file to get inputs. I’m running into a problem with comments in the XML file. Simply put, if I put a comment inside the tag but before the value, then I get an empty string for the value. Comments elsewhere don’t cause problems
Here’s a toy example of my m-file:
function userInputStruct = readToyXmlInput()
toyXmlInputFile = ‘toyXmlInput.xml’;
xDoc = xmlread(toyXmlInputFile);
userInput = xDoc.getElementsByTagName(‘userInput’);
userInputStruct = struct(); % Initialize
thisUserInput = userInput.item(0);
thisInput_01 = thisUserInput.getElementsByTagName(‘input_01’);
thisInput_01Element = thisInput_01.item(0);
temp01 = thisInput_01Element.getFirstChild.getData;
temp02 = string(temp01);
input_01 = strip(temp02);
userInputStruct.input_01 = input_01;
Here’s a toy example of my XML file:
<toyXmlInput>
<userInput>
<!– A comment here is fine. –>
<input_01>
Dummy input #1 <!– A comment here is fine. –>
<!– A comment here is fine. –>
</input_01>
</userInput>
</toyXmlInput>
Here’s a toy example of my XML file with a comment that causes a problem.
<toyXmlInput>
<userInput>
<input_01>
<!– A comment here causes problems –>
Dummy input #1
</input_01>
</userInput>
</toyXmlInput>
What am I doing wrong? What can I do differently so that comments after the tag but before the value don’t cause problems?
Worst-case, I’ll just document in the m-file and the XML file that there’s a limit on where comments can go. However, I’d prefer a more elegant solution. xml, comment MATLAB Answers — New Questions
Recommitting to our why, what, and how
Satya Nadella, Chairman and CEO, shared the below communication with Microsoft employees this morning.
As we begin a new fiscal year, I’ve been reflecting on the road we’ve traveled together and the path ahead.
Before anything else, I want to speak to what’s been weighing heavily on me, and what I know many of you are thinking about: the recent job eliminations. These decisions are among the most difficult we have to make. They affect people we’ve worked alongside, learned from, and shared countless moments with—our colleagues, teammates, and friends.
I want to express my sincere gratitude to those who have left. Their contributions have shaped who we are as a company, helping build the foundation we stand on today. And for that, I am deeply grateful.
I also want to acknowledge the uncertainty and seeming incongruence of the times we’re in. By every objective measure, Microsoft is thriving—our market performance, strategic positioning, and growth all point up and to the right. We’re investing more in CapEx than ever before. Our overall headcount is relatively unchanged, and some of the talent and expertise in our industry and at Microsoft is being recognized and rewarded at levels never seen before. And yet, at the same time, we’ve undergone layoffs.
This is the enigma of success in an industry that has no franchise value. Progress isn’t linear. It’s dynamic, sometimes dissonant, and always demanding. But it’s also a new opportunity for us to shape, lead through, and have greater impact than ever before.
The success we want to achieve will be defined by our ability to go through this difficult process of “unlearning” and “learning.” It requires us to meet changing customer needs, by continuing to maintain and scale our current business, while also creating new categories with new business models and a new production function. This is inherently hard, and few companies can do both.
But I have full confidence that we can, and we will once again find the resolve, courage, and clarity to deliver on our mission in this new paradigm.
With that context, I want to re-ground ourselves in our why, what, and how: our mission, our priorities, and our culture.
Our why: mission
What does achieving our mission look like and feel like for us as a company? When Microsoft is succeeding, the world around us must succeed too. This is why each of us chose to be here, and as a company it’s how we earn our social permission to operate. When Bill founded Microsoft, he envisioned not just a software company, but a software factory, unconstrained by any single product or category. That idea has guided us for decades. But today, it’s no longer enough.
We must reimagine our mission for a new era. What does empowerment look like in the era of AI? It’s not just about building tools for specific roles or tasks. It’s about building tools that empower everyone to create their own tools. That’s the shift we are driving—from a software factory to an intelligence engine empowering every person and organization to build whatever they need to achieve.
Just imagine if all 8 billion people could summon a researcher, an analyst, or a coding agent at their fingertips, not just to get information but use their expertise to get things done that benefit them. And consider how organizations, empowered with AI, could unlock entirely new levels of agility and innovation by transforming decision-making, streamlining operations, and enabling every team to achieve more together than ever before.
That’s the empowerment our mission enables, creating local surplus in every company, community, and country. And that’s our opportunity ahead.
Our what: priorities
To deliver on our mission, we need to stay focused on our three business priorities: security, quality, and AI transformation.
We are doubling down on the fundamentals while continuing to define new frontiers in AI.
Security and quality are non-negotiable. Our infrastructure and services are mission critical for the world, and without them we don’t have permission to move forward.
We’ve made substantial progress across SFI, QEI, and Engineering Thrive this year, and they remain top priorities to ensure that we continuously improve our innovation velocity and our operational metrics.
We will reimagine every layer of the tech stack for AI—infrastructure, to the app platform, to apps and agents. The key is to get the platform primitives right for these new workloads and for the next order of magnitude of scale. Our differentiation will come from how we bring these layers together to deliver end-to-end experiences and products, with the core ethos of a platform company that fosters ecosystem opportunity broadly. Getting both the product and platform right for the AI wave is our North Star!
Our performance this past year has positioned us well. And we must move forward with the intentionality and intensity that these industry shifts demand.
Our how: culture
Growth mindset has served us well over the last decade—the everyday practice of being a learn-it-all, not a know-it-all. It has reshaped our culture and helped us lead with greater humility and empathy. We need to keep that.
It starts with each of us as individuals and our personal drive to learn, improve, and get better every day. Professional rewards, growth, and pride in our craft will always be the prime drivers. Beyond that, we each have the opportunity to connect our personal passion and philosophy of how we derive meaning from the work we do with Microsoft’s mission to empower the world. This is what makes it all worthwhile.
This platform shift is reshaping not only the products we build and the business models we operate under, but also how we are structured and how we work together every day. It might feel messy at times, but transformation always is. Teams are reorganizing. Scopes are expanding. New opportunities are everywhere. It reminds me of the early ’90s, when PCs and productivity software became standard in every home and every desk! That’s exactly where we are now with AI.
Years from now, when you look back at your time here, I hope you’ll say: “That’s when I learned the most. That’s when I made my biggest impact. That’s when I was part of something transformational.”
What we’ve learned over the past five decades is that success is not about longevity. It’s about relevance. Our future won’t be defined by what we’ve built before, but by what we empower others to build now.
And I know that with your dedication, drive, and hard work we can go win together, and change the world in the process.
I look forward to sharing more at Earnings next week and addressing your questions at our next Town Hall.
Satya
The post Recommitting to our why, what, and how appeared first on The Official Microsoft Blog.
Satya Nadella, Chairman and CEO, shared the below communication with Microsoft employees this morning. As we begin a new fiscal year, I’ve been reflecting on the road we’ve traveled together and the path ahead. Before anything else, I want to speak to what’s been weighing heavily on me, and what I know many of you…
The post Recommitting to our why, what, and how appeared first on The Official Microsoft Blog.Read More
Bus with sub buses with wrong type (bug ?)
Hello everyone!
Settings
I am facing a very strange issue. Here is my situation : I am creating a Simulink model that call a complex Matlab function. The function, name MD, is take a nested struct as an input, named config. The struct will be updated meaning adding fields (only on the first call), and updated value.
After some research, I have understood that the best way to solve my problem is to create a type ‘bus :configbus’, via
Simulink.Bus.createObject(config)
evalin(‘base’, ‘configbus = slBus1;’);
clear("slBus1")
Then, in Simulink I have my Matlab function block, linked to Data Store Read / write for interfacing the config input. This is for the setup.
Adding fields
To solve the fact that on the first call I am adding fields, I run once the function MD, before the simulation and creating the bus, to get all the correct field. I am open to better solution that this bit if you have any.
Errors encounter
However, when configuring the Data Store Memory with the Initial value I get the following error (error1):
Invalid setting in ‘path to Data Store Read’ for parameter ‘InitialValue’.
I am trying the following combination:
Inital Value : config
type : Bus:configBus.
(my function as the input define as the correct type and there is no issue there)
When I run my model I get the error (error2):
Error using Leia_main (line 47)
Expression ‘configBus’ for type of data ‘config’ did not evaluate to a valid type.
Caused by:
Error using Leia_main (line 47)
Invalid setting in ‘Guidance/If Action Subsystem2/If Action Subsystem1/New Planing/MATLAB Function’ for parameter ‘Datatype’
Error using Leia_main (line 47)
Error evaluating MATLAB Function parameter data
‘Datatype’ in its parent workspace.
Error using Leia_main (line 47)
Unrecognized function or variable ‘configBus’.
Error using Leia_main (line 47)
Variable ‘configBus’ does not exist.
Suggested Actions:
• Load a file into base workspace. – Fix
• Create a new variable. – Fix
Which is really wierd, since it seems that Matlab is confusing the type and the variable. But I have checked and everything seems to be declare as it should.
My investigation
When I look at my top bus definition it do not seems that field corresponding to subbuses are mapped properly. Even though the correct bus type exist.
Here is an example :
SK_requirement is supposed to be of type bus: SK_requirement but is of type SK_requirement which I don’t know what type it points to.
And if I set it correctly I get :
Is there any reason why this is behaving like this ? I would expect that the configbus declartion to be correctly typed. (I will try to manually set the good type and see if there is any improvement). My naive guess is that it might solve error1, but not sure.
Questions
1) Is there a better way to create the top level bus ? Or is it just a bug ?
2) Do you have any idea for error1 ?
3) Do you have any idea for solutioning error2 ?
Information
Runing matlab25a without the last update. Using MacOS with Apple chip.
Thank you in advance for your insights.Hello everyone!
Settings
I am facing a very strange issue. Here is my situation : I am creating a Simulink model that call a complex Matlab function. The function, name MD, is take a nested struct as an input, named config. The struct will be updated meaning adding fields (only on the first call), and updated value.
After some research, I have understood that the best way to solve my problem is to create a type ‘bus :configbus’, via
Simulink.Bus.createObject(config)
evalin(‘base’, ‘configbus = slBus1;’);
clear("slBus1")
Then, in Simulink I have my Matlab function block, linked to Data Store Read / write for interfacing the config input. This is for the setup.
Adding fields
To solve the fact that on the first call I am adding fields, I run once the function MD, before the simulation and creating the bus, to get all the correct field. I am open to better solution that this bit if you have any.
Errors encounter
However, when configuring the Data Store Memory with the Initial value I get the following error (error1):
Invalid setting in ‘path to Data Store Read’ for parameter ‘InitialValue’.
I am trying the following combination:
Inital Value : config
type : Bus:configBus.
(my function as the input define as the correct type and there is no issue there)
When I run my model I get the error (error2):
Error using Leia_main (line 47)
Expression ‘configBus’ for type of data ‘config’ did not evaluate to a valid type.
Caused by:
Error using Leia_main (line 47)
Invalid setting in ‘Guidance/If Action Subsystem2/If Action Subsystem1/New Planing/MATLAB Function’ for parameter ‘Datatype’
Error using Leia_main (line 47)
Error evaluating MATLAB Function parameter data
‘Datatype’ in its parent workspace.
Error using Leia_main (line 47)
Unrecognized function or variable ‘configBus’.
Error using Leia_main (line 47)
Variable ‘configBus’ does not exist.
Suggested Actions:
• Load a file into base workspace. – Fix
• Create a new variable. – Fix
Which is really wierd, since it seems that Matlab is confusing the type and the variable. But I have checked and everything seems to be declare as it should.
My investigation
When I look at my top bus definition it do not seems that field corresponding to subbuses are mapped properly. Even though the correct bus type exist.
Here is an example :
SK_requirement is supposed to be of type bus: SK_requirement but is of type SK_requirement which I don’t know what type it points to.
And if I set it correctly I get :
Is there any reason why this is behaving like this ? I would expect that the configbus declartion to be correctly typed. (I will try to manually set the good type and see if there is any improvement). My naive guess is that it might solve error1, but not sure.
Questions
1) Is there a better way to create the top level bus ? Or is it just a bug ?
2) Do you have any idea for error1 ?
3) Do you have any idea for solutioning error2 ?
Information
Runing matlab25a without the last update. Using MacOS with Apple chip.
Thank you in advance for your insights. Hello everyone!
Settings
I am facing a very strange issue. Here is my situation : I am creating a Simulink model that call a complex Matlab function. The function, name MD, is take a nested struct as an input, named config. The struct will be updated meaning adding fields (only on the first call), and updated value.
After some research, I have understood that the best way to solve my problem is to create a type ‘bus :configbus’, via
Simulink.Bus.createObject(config)
evalin(‘base’, ‘configbus = slBus1;’);
clear("slBus1")
Then, in Simulink I have my Matlab function block, linked to Data Store Read / write for interfacing the config input. This is for the setup.
Adding fields
To solve the fact that on the first call I am adding fields, I run once the function MD, before the simulation and creating the bus, to get all the correct field. I am open to better solution that this bit if you have any.
Errors encounter
However, when configuring the Data Store Memory with the Initial value I get the following error (error1):
Invalid setting in ‘path to Data Store Read’ for parameter ‘InitialValue’.
I am trying the following combination:
Inital Value : config
type : Bus:configBus.
(my function as the input define as the correct type and there is no issue there)
When I run my model I get the error (error2):
Error using Leia_main (line 47)
Expression ‘configBus’ for type of data ‘config’ did not evaluate to a valid type.
Caused by:
Error using Leia_main (line 47)
Invalid setting in ‘Guidance/If Action Subsystem2/If Action Subsystem1/New Planing/MATLAB Function’ for parameter ‘Datatype’
Error using Leia_main (line 47)
Error evaluating MATLAB Function parameter data
‘Datatype’ in its parent workspace.
Error using Leia_main (line 47)
Unrecognized function or variable ‘configBus’.
Error using Leia_main (line 47)
Variable ‘configBus’ does not exist.
Suggested Actions:
• Load a file into base workspace. – Fix
• Create a new variable. – Fix
Which is really wierd, since it seems that Matlab is confusing the type and the variable. But I have checked and everything seems to be declare as it should.
My investigation
When I look at my top bus definition it do not seems that field corresponding to subbuses are mapped properly. Even though the correct bus type exist.
Here is an example :
SK_requirement is supposed to be of type bus: SK_requirement but is of type SK_requirement which I don’t know what type it points to.
And if I set it correctly I get :
Is there any reason why this is behaving like this ? I would expect that the configbus declartion to be correctly typed. (I will try to manually set the good type and see if there is any improvement). My naive guess is that it might solve error1, but not sure.
Questions
1) Is there a better way to create the top level bus ? Or is it just a bug ?
2) Do you have any idea for error1 ?
3) Do you have any idea for solutioning error2 ?
Information
Runing matlab25a without the last update. Using MacOS with Apple chip.
Thank you in advance for your insights. simulink, bus, sub-bus, type, datastorememory, matlab function MATLAB Answers — New Questions
Autocoder settings to get variables declared in *_mr_private.h file vs in *_mr_data.cpp.
I am upgrading a simulink/embedded coder project from R2020b to R2024b. Having successfully generated code in the new version, we examined some differences in the generated code files. Some data "myVar" is being duplicated in a *_mr_data.cpp file for a model reference "myModel", that is already declared in shared location const_params.cpp.
The data in the image displayed below for reference….
2020b example
myVar is a simulink parameter in a constant block in the toplevel model myModel.
when generating code we get the relevant lines
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
(other vars, myVar not included)}
myModel_mr_private.h:
(no include)
extern myVar_bstruct *myVar; // Variable: myVar
myModel_mr_data.cpp:
#include "myModel_mr.h"
#include "myModel_mr_private.h"
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: anotherVar (myVar not in file)
// Referenced by:
….
{ lots of data }
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
typedef struct { other structs that make up myVar } myVar_bstruct;
2024b example
same setup with myVar and myModel
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
myVar_bstruct myVar; (and other vars)}
myModel_mr_private.h:
#include "myModel_mr_types.h"
No listing
myModel_mr_data.cpp:
#include "myModel_mr.h"
(no mr_private.h include)
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: myVar
// Referenced by:
….
{ duplicate myVar data (is also in const_params.cpp) and other vars}
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
struct myVar_bstruct { other structs that make up myVar };
end example.
As you can see above there is a little bit of a difference of how the myVar data is getting declared in the autocode. The 2024b version is causing the myModel_mr_data.cpp file to go from 300k to 3MB with the duplicated data. (this may be small for some but its important in this use case)
Some of the settings i’ve already tried on the configuration of the model.
set_param(‘myModel’, ‘CodeInterfacePackaging’, ‘Nonreusable function’)
set_param(‘myModel’, ‘ParameterStorageClass’, ‘Model default’);
Was attempting this and matlab went poof, after the Headerfile field wasn’t avail.
myVar.CoderInfo.StorageClass = ‘Custom’;
myVar.CoderInfo.CustomAttributes.HeaderFile = ‘myModel_mr_private.h’;
Anyinsight would be greatly appreciated…I am upgrading a simulink/embedded coder project from R2020b to R2024b. Having successfully generated code in the new version, we examined some differences in the generated code files. Some data "myVar" is being duplicated in a *_mr_data.cpp file for a model reference "myModel", that is already declared in shared location const_params.cpp.
The data in the image displayed below for reference….
2020b example
myVar is a simulink parameter in a constant block in the toplevel model myModel.
when generating code we get the relevant lines
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
(other vars, myVar not included)}
myModel_mr_private.h:
(no include)
extern myVar_bstruct *myVar; // Variable: myVar
myModel_mr_data.cpp:
#include "myModel_mr.h"
#include "myModel_mr_private.h"
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: anotherVar (myVar not in file)
// Referenced by:
….
{ lots of data }
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
typedef struct { other structs that make up myVar } myVar_bstruct;
2024b example
same setup with myVar and myModel
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
myVar_bstruct myVar; (and other vars)}
myModel_mr_private.h:
#include "myModel_mr_types.h"
No listing
myModel_mr_data.cpp:
#include "myModel_mr.h"
(no mr_private.h include)
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: myVar
// Referenced by:
….
{ duplicate myVar data (is also in const_params.cpp) and other vars}
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
struct myVar_bstruct { other structs that make up myVar };
end example.
As you can see above there is a little bit of a difference of how the myVar data is getting declared in the autocode. The 2024b version is causing the myModel_mr_data.cpp file to go from 300k to 3MB with the duplicated data. (this may be small for some but its important in this use case)
Some of the settings i’ve already tried on the configuration of the model.
set_param(‘myModel’, ‘CodeInterfacePackaging’, ‘Nonreusable function’)
set_param(‘myModel’, ‘ParameterStorageClass’, ‘Model default’);
Was attempting this and matlab went poof, after the Headerfile field wasn’t avail.
myVar.CoderInfo.StorageClass = ‘Custom’;
myVar.CoderInfo.CustomAttributes.HeaderFile = ‘myModel_mr_private.h’;
Anyinsight would be greatly appreciated… I am upgrading a simulink/embedded coder project from R2020b to R2024b. Having successfully generated code in the new version, we examined some differences in the generated code files. Some data "myVar" is being duplicated in a *_mr_data.cpp file for a model reference "myModel", that is already declared in shared location const_params.cpp.
The data in the image displayed below for reference….
2020b example
myVar is a simulink parameter in a constant block in the toplevel model myModel.
when generating code we get the relevant lines
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
(other vars, myVar not included)}
myModel_mr_private.h:
(no include)
extern myVar_bstruct *myVar; // Variable: myVar
myModel_mr_data.cpp:
#include "myModel_mr.h"
#include "myModel_mr_private.h"
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: anotherVar (myVar not in file)
// Referenced by:
….
{ lots of data }
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
typedef struct { other structs that make up myVar } myVar_bstruct;
2024b example
same setup with myVar and myModel
myModel_mr.h:
// Parameters (default storage)
struct P_myModel_mr_T_ {
myVar_bstruct myVar; (and other vars)}
myModel_mr_private.h:
#include "myModel_mr_types.h"
No listing
myModel_mr_data.cpp:
#include "myModel_mr.h"
(no mr_private.h include)
// Block parameters (default storage)
P_myModel_mr_T myModel_mr_P{
// Variable: myVar
// Referenced by:
….
{ duplicate myVar data (is also in const_params.cpp) and other vars}
slprj/ert/_sharedutils/const_params.cpp:
extern const myVar_bstruct rtCP_pooled_(mangled);
const myVar_bstruct rtCP_pooled_(mangled) = {all the data (its alot)}
slprj/ert/_sharedutils/my_shared_bus.h:
// Simulink Bus: myVar_bstruct
struct myVar_bstruct { other structs that make up myVar };
end example.
As you can see above there is a little bit of a difference of how the myVar data is getting declared in the autocode. The 2024b version is causing the myModel_mr_data.cpp file to go from 300k to 3MB with the duplicated data. (this may be small for some but its important in this use case)
Some of the settings i’ve already tried on the configuration of the model.
set_param(‘myModel’, ‘CodeInterfacePackaging’, ‘Nonreusable function’)
set_param(‘myModel’, ‘ParameterStorageClass’, ‘Model default’);
Was attempting this and matlab went poof, after the Headerfile field wasn’t avail.
myVar.CoderInfo.StorageClass = ‘Custom’;
myVar.CoderInfo.CustomAttributes.HeaderFile = ‘myModel_mr_private.h’;
Anyinsight would be greatly appreciated… autocode, embedded coder, code generation, simulink coder MATLAB Answers — New Questions
Gaps in contour plot using custom secant method (when solving for two-plume merger)
Hello all,
I’m working on a MATLAB script that computes the merging contour between two turbulent plumes, using a custom root-finding function called mnhf_secant. This function implements a supervisor-provided secant method to solve a nonlinear equation that describes the interface between the plumes. The governing equation being solved is located at the bottom of the code and is derived from plume interaction theory.
The issue arises in the else branch of the loop that iterates over polar angles (θ). When the code enters this branch, the contour plot generated shows visible gaps between the red line (plume boundary) and the black line (reference contour), indicating that the solution is not continuous or fails to resolve in those regions.
This breakdown does not occur in the first half of the angular domain (handled by the if condition), where the contours are computed correctly as seen by the continuous black line. The discontinuity seems localized to the else loop, despite using the same root-finding logic.I tried different guesses for the secant function but is not helping to solve for the gaps.
My main question is:
Is there a modification I could implement in the else branch to ensure a continuous contour across the full angular domain? I have attached the code below.
close all; clc; clf
global r0 k theta
%% Parameter input, plume source of finite size
r0 = 1/3;
k_array = [0.3 0.5 0.7 1-r0^2 1]
Nt = 20001; % Must be odd for symmetry
theta_array = linspace(-pi/2, pi/2, Nt);
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
if k >= 1 – r0^2
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
else
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
% Identify breakdown angle where rho fails
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij)) % closest valid angle before breakdown
theta_array2 = linspace(theta_min, -theta_min, Nt); % symmetric gap domain
rho_array2 = zeros(1, length(theta_array2));
% Solve numerically in gap region
for ii = 1:length(theta_array2)
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@TwoPlumes_Equation, [0.1 0.4], 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.’); axis square; xlim([0 2]); ylim([-1 1]);
end
end
pos1 = [1 – r0, -r0, 2*r0, 2*r0];
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, [0 0 0]);
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
%% Two-Plume Interaction Equation (B3 from LF20B)
function f = TwoPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho.*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho.*cos(theta + pi) + 1 – r0^2) – k^2;
endHello all,
I’m working on a MATLAB script that computes the merging contour between two turbulent plumes, using a custom root-finding function called mnhf_secant. This function implements a supervisor-provided secant method to solve a nonlinear equation that describes the interface between the plumes. The governing equation being solved is located at the bottom of the code and is derived from plume interaction theory.
The issue arises in the else branch of the loop that iterates over polar angles (θ). When the code enters this branch, the contour plot generated shows visible gaps between the red line (plume boundary) and the black line (reference contour), indicating that the solution is not continuous or fails to resolve in those regions.
This breakdown does not occur in the first half of the angular domain (handled by the if condition), where the contours are computed correctly as seen by the continuous black line. The discontinuity seems localized to the else loop, despite using the same root-finding logic.I tried different guesses for the secant function but is not helping to solve for the gaps.
My main question is:
Is there a modification I could implement in the else branch to ensure a continuous contour across the full angular domain? I have attached the code below.
close all; clc; clf
global r0 k theta
%% Parameter input, plume source of finite size
r0 = 1/3;
k_array = [0.3 0.5 0.7 1-r0^2 1]
Nt = 20001; % Must be odd for symmetry
theta_array = linspace(-pi/2, pi/2, Nt);
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
if k >= 1 – r0^2
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
else
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
% Identify breakdown angle where rho fails
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij)) % closest valid angle before breakdown
theta_array2 = linspace(theta_min, -theta_min, Nt); % symmetric gap domain
rho_array2 = zeros(1, length(theta_array2));
% Solve numerically in gap region
for ii = 1:length(theta_array2)
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@TwoPlumes_Equation, [0.1 0.4], 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.’); axis square; xlim([0 2]); ylim([-1 1]);
end
end
pos1 = [1 – r0, -r0, 2*r0, 2*r0];
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, [0 0 0]);
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
%% Two-Plume Interaction Equation (B3 from LF20B)
function f = TwoPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho.*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho.*cos(theta + pi) + 1 – r0^2) – k^2;
end Hello all,
I’m working on a MATLAB script that computes the merging contour between two turbulent plumes, using a custom root-finding function called mnhf_secant. This function implements a supervisor-provided secant method to solve a nonlinear equation that describes the interface between the plumes. The governing equation being solved is located at the bottom of the code and is derived from plume interaction theory.
The issue arises in the else branch of the loop that iterates over polar angles (θ). When the code enters this branch, the contour plot generated shows visible gaps between the red line (plume boundary) and the black line (reference contour), indicating that the solution is not continuous or fails to resolve in those regions.
This breakdown does not occur in the first half of the angular domain (handled by the if condition), where the contours are computed correctly as seen by the continuous black line. The discontinuity seems localized to the else loop, despite using the same root-finding logic.I tried different guesses for the secant function but is not helping to solve for the gaps.
My main question is:
Is there a modification I could implement in the else branch to ensure a continuous contour across the full angular domain? I have attached the code below.
close all; clc; clf
global r0 k theta
%% Parameter input, plume source of finite size
r0 = 1/3;
k_array = [0.3 0.5 0.7 1-r0^2 1]
Nt = 20001; % Must be odd for symmetry
theta_array = linspace(-pi/2, pi/2, Nt);
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
if k >= 1 – r0^2
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
else
rho_array1 = zeros(1,length(theta_array));
for ii = 1:length(theta_array)
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@TwoPlumes_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]);
% Identify breakdown angle where rho fails
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij)) % closest valid angle before breakdown
theta_array2 = linspace(theta_min, -theta_min, Nt); % symmetric gap domain
rho_array2 = zeros(1, length(theta_array2));
% Solve numerically in gap region
for ii = 1:length(theta_array2)
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@TwoPlumes_Equation, [0.1 0.4], 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.’); axis square; xlim([0 2]); ylim([-1 1]);
end
end
pos1 = [1 – r0, -r0, 2*r0, 2*r0];
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, [0 0 0]);
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
%% Two-Plume Interaction Equation (B3 from LF20B)
function f = TwoPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho.*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho.*cos(theta + pi) + 1 – r0^2) – k^2;
end numerical method, contour plot, discontinuities MATLAB Answers — New Questions
MathWorksUpdateInstaller and R2025a in Linux
Hi!
Until now (e.g., with R2024b), whenever I needed to update my MATLAB in Linux, I used to run
sudo /usr/local/MATLAB/R2024b/bin/glnxa64/MathWorksUpdateInstaller
but I cannot find the equivalent executable for R2025a. Did it change name/location? Or what is the suggested update approach, now?
Note that I can’t simply run the updater from the MATLAB desktop, because as normal user I don’t have privilegies to write in the MATLAB root directory. And I can’t start MATLAB as root, either, because of the name in the license.
Thanks in advance!Hi!
Until now (e.g., with R2024b), whenever I needed to update my MATLAB in Linux, I used to run
sudo /usr/local/MATLAB/R2024b/bin/glnxa64/MathWorksUpdateInstaller
but I cannot find the equivalent executable for R2025a. Did it change name/location? Or what is the suggested update approach, now?
Note that I can’t simply run the updater from the MATLAB desktop, because as normal user I don’t have privilegies to write in the MATLAB root directory. And I can’t start MATLAB as root, either, because of the name in the license.
Thanks in advance! Hi!
Until now (e.g., with R2024b), whenever I needed to update my MATLAB in Linux, I used to run
sudo /usr/local/MATLAB/R2024b/bin/glnxa64/MathWorksUpdateInstaller
but I cannot find the equivalent executable for R2025a. Did it change name/location? Or what is the suggested update approach, now?
Note that I can’t simply run the updater from the MATLAB desktop, because as normal user I don’t have privilegies to write in the MATLAB root directory. And I can’t start MATLAB as root, either, because of the name in the license.
Thanks in advance! update, r2025a, linux MATLAB Answers — New Questions
Associating labels to licenses
While I can see what licenses I have active for my account, the installs are associated to computer labels. How can I determine what computer label a current PC has?
I ask as I am upgrading my PC and want to deactivate a given license, but I need to know which.
Thank you.While I can see what licenses I have active for my account, the installs are associated to computer labels. How can I determine what computer label a current PC has?
I ask as I am upgrading my PC and want to deactivate a given license, but I need to know which.
Thank you. While I can see what licenses I have active for my account, the installs are associated to computer labels. How can I determine what computer label a current PC has?
I ask as I am upgrading my PC and want to deactivate a given license, but I need to know which.
Thank you. licensing MATLAB Answers — New Questions
New Outlook for Windows Enables S/MIME Inheritance Control
Same NoSignOnReply Control for S/MIME Inheritance for Replies as Outlook (Classic)
Message center notification MC1072404 (last updated 21 July 2025) announces the provision of a control over S/MIME inheritance for email replies. The new setting allows tenant administrators to determine whether S/MIME signatures are inherited by default when people use the Reply and Reply All options to generate responses to signed messages.
Essentially, this is the same capability as previously implemented through ADMX Group Policy template files for Outlook (classic), so it’s part of the ongoing work to make sure that the new Outlook is as functional as Outlook classic before the eventual retirement of the old client sometime in 2029 (that date might change if features aren’t in place).
As an online client, the new Outlook depends more on server-based controls than the policy settings stored in the system registry as used by traditional Office apps. Support is rolling out now and should be complete worldwide by early August 2025. Deployment then moves to GCC and should be finished there by late August 2025.
Dropping OWA
When first announced, Microsoft included OWA along with the new Outlook for Windows. This is logical because the two clients share a lot of code. The new Outlook supports functionality that isn’t in OWA, like PSTs (including the recently-introduced export to PST feature) and better offline access, but generally the two clients support the same set of server settings. This is not the case here as Microsoft has decided not to support S/MIME inheritance for replies in OWA.
Updating S/MIME Settings
MC1072404 states that the NoSignOnReply setting is available in Entra ID. This might mean that the tenant S/MIME configuration is stored in Entra ID. However, the Set-SMIMEConfig cmdlet is very much part of both Exchange Server and Exchange Online (the cmdlet goes back at least as far as Exchange 2013 – I can’t recall if it was available for previous versions). Most of the settings manipulated by the cmdlet affect how OWA deals with S/MIME. The NoSignOnReply setting is explicitly excluded for OWA.
In any case, the default value for NoSignOnReply is $true. This means that reply messages created with Reply or Reply All do not inherit the S/MIME signature (Figure 1) from the original message. However, if the original message is encrypted, the replies inherit the same encryption. Microsoft notes that the default setting is useful when an organization has not configured S/MIME signatures for all users.

When the setting is $false, replies inherit the S/MIME signature from the original message. If this is undesirable (for instance, it’s the wrong signature), the user must open S/MIME settings and remove the signature.
Set-SMIMEConfig -NoSignOnReply $false
Details of the S/MIME configuration can be retrieved using the Get-SMIMEConfig cmdlet.
Sites that Duplicate Message Center Notifications are Useless
While checking details of MC1072404, I noticed that there are many sites that simply take the text of message center notifications and publish them as written. No attempt is made to add any value whatsoever in terms of interpretation, insight, or additional information. It’s a wonder to me why people republish message center notifications in this manner. They might get a few page views, but apart from that they clutter up the internet with duplicated material. In fact, given the way that generative AI summaries are now used by Google and other search engines, the number of page views that these sites gain must be much decreased.
We do report on message center notifications, but only when we think we have something useful to add that helps readers understand the nature of the change and how it impacts the Microsoft 365 ecosystem. We don’t always get things right, but at least we’re not a “me too” site.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive monthly insights into what happens, why it happens, and what new features and capabilities mean for your tenant.
Why do I see the wrong Service End Date in my License Center?
Why do I see the wrong Service End Date in my License Center?Why do I see the wrong Service End Date in my License Center? Why do I see the wrong Service End Date in my License Center? MATLAB Answers — New Questions