Month: February 2026
How to export Simulink models (with Stateflow components) to XML ?
Hello,
I would need to know how can I export Simulink models (and some of these latter may also have Stateflow components, such as State Charts etc.) to XML.
I have typed the following MATLAB commands:
modelName = ‘sf_aircraft’ % model of the name without extension
save_system(modelName, ‘xml_model.xml’, ‘ExportToXML’, true)
But I have the following warning :
Warning: The ‘ExportToXML’ option is no longer supported and will be removed in a future release.
And I have also noticed that in the XML file the State Chart component is just mentioned, so basically I cannot see what it contains from the XML file.
So what I would like to ask is if there are other functions or ways that allow Simulink models with State Charts components to be exported in a XML format.
Thanks in advance.Hello,
I would need to know how can I export Simulink models (and some of these latter may also have Stateflow components, such as State Charts etc.) to XML.
I have typed the following MATLAB commands:
modelName = ‘sf_aircraft’ % model of the name without extension
save_system(modelName, ‘xml_model.xml’, ‘ExportToXML’, true)
But I have the following warning :
Warning: The ‘ExportToXML’ option is no longer supported and will be removed in a future release.
And I have also noticed that in the XML file the State Chart component is just mentioned, so basically I cannot see what it contains from the XML file.
So what I would like to ask is if there are other functions or ways that allow Simulink models with State Charts components to be exported in a XML format.
Thanks in advance. Hello,
I would need to know how can I export Simulink models (and some of these latter may also have Stateflow components, such as State Charts etc.) to XML.
I have typed the following MATLAB commands:
modelName = ‘sf_aircraft’ % model of the name without extension
save_system(modelName, ‘xml_model.xml’, ‘ExportToXML’, true)
But I have the following warning :
Warning: The ‘ExportToXML’ option is no longer supported and will be removed in a future release.
And I have also noticed that in the XML file the State Chart component is just mentioned, so basically I cannot see what it contains from the XML file.
So what I would like to ask is if there are other functions or ways that allow Simulink models with State Charts components to be exported in a XML format.
Thanks in advance. simulink, stateflow, xml MATLAB Answers — New Questions
Valid MATLAB Runtime installer not found.
When trying to compile a stand alone ap in ap designer, it throws the error "Valid MATLAB Runtime installer not found". It prompts for MATLAB Runtime installer location. Here is what my IT guy installed:
At C:Program FilesMatlab
R2024b
MATLAB Compiler Runtime
MATLAB Runtime
The IT guy reported that he was unable to add paths to the ENVIRONMENT VARIABLES.
What do I need to do so that I can compile stand alone .exe applications?When trying to compile a stand alone ap in ap designer, it throws the error "Valid MATLAB Runtime installer not found". It prompts for MATLAB Runtime installer location. Here is what my IT guy installed:
At C:Program FilesMatlab
R2024b
MATLAB Compiler Runtime
MATLAB Runtime
The IT guy reported that he was unable to add paths to the ENVIRONMENT VARIABLES.
What do I need to do so that I can compile stand alone .exe applications? When trying to compile a stand alone ap in ap designer, it throws the error "Valid MATLAB Runtime installer not found". It prompts for MATLAB Runtime installer location. Here is what my IT guy installed:
At C:Program FilesMatlab
R2024b
MATLAB Compiler Runtime
MATLAB Runtime
The IT guy reported that he was unable to add paths to the ENVIRONMENT VARIABLES.
What do I need to do so that I can compile stand alone .exe applications? runtime installer path MATLAB Answers — New Questions
New Outlook Gets Smarter DLP
Custom Oversharing Dialog Works in the New Outlook Client
Given that message center notification MC1202974 (Microsoft 365 roadmap item 498921) appeared on 22 December 2025, I might have been forgiven for overlooking the announcement that the new Outlook for Windows client (aka Monarch) will support custom oversharing dialog for Data Loss Prevention (DLP) policies by the end of January 2026. But I have written about oversharing dialogs before, so it seemed like a good idea to examine how the custom variation works.
What an Oversharing Dialog Does
In a nutshell, an oversharing dialog is a pop-up invoked by an Outlook client when a DLP policy detects a potential rule violation in a message or its attachments. The idea is that the dialog gives the user the chance to amend the message before it is sent. A custom oversharing dialog contains information customized by the Microsoft 365 tenant. Figure 1 shows a custom oversharing dialog in Outlook (classic).

As you can see, the oversharing dialog gives the user the opportunity to override the block by providing a justification and acknowledging that the content meets organizational standards.
Outlook must have the opportunity to recognize that a violation is present, and it is possible that the oversharing dialog never appears if a user creates and sends a message quickly. You can configure a delay in sending to allow time for content evaluation against policies or let the message flow through to the transport pipeline. If the DLP evaluation in the transport pipeline detects a problem there, it will take whatever action is configured in the policy, such as blocking delivery of the message to external recipients.
Creating a Custom Oversharing Dialog
To implement a custom oversharing dialog, upload a JSON file to a policy rule after setting the “upload a JSON file containing custom content that will be used in the pop-up dialog” checkbox in the policy tips section of the rule configuration.
The JSON file contains the text for the custom directives in up to ten languages (a default language must be chosen). The text can include tokens for matched recipients, attachment file names, and sensitivity labels. The format and syntax of the JSON file is checked when the updated policy is submitted in the Purview portal.
Composing JSON can be a challenge if you’re not fluent in this subject. I usually start with the example file in the Microsoft documentation and make the necessary changes in Visual Studio Code (Figure 2).

A DLP rule can also be updated with the JSON to describe a custom oversharing dialog via PowerShell. To do this, put the content of the file in a variable and then use the Set-DlpComplianceRule cmdlet to update the rule. Before you can run the cmdlet, you’ll need to connect to the compliance endpoint after connecting to Exchange Online (run Connect-ExchangeOnline and then Connect-IPPSSession):
$JSONCustomContent = Get-Content "c:tempRule.JSON" -Encoding UTF8 | Out-String Set-DlpComplianceRule -Identity "Oversharing Rule 1" -NotifyPolicyTipCustomDialog $JSONCustomContent -NotifyPolicyTipDisplayOption Dialog
Validation of the JSON content occurs when PowerShell attempts to update the rule. For example, DLP checks that the custom title property for each language does not exceed the 75-character maximum.
Like other changes to DLP policies, it can take a few hours to synchronize the update within a tenant. Clients must then pick up the updated policies before the changes are fully active. Both Outlook (classic) and the new Outlook support the same custom oversharing dialogs.
Oversharing Dialog Works
The oversharing dialog for DLP policies is a good idea that works well. Tweaking the JSON to create the desired effect for the dialog can take a few attempts and the limitations imposed by Microsoft are a little restrictive. But all-in-all, oversharing dialogs are a feature that should be considered for any DLP email-focused policy.
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!
how to plot 3d surface maps? interpolation?
Hi All,
i am struggeling to have a correct interpolation (IDW) for 3d surface maps for the spatial analysis of the parameters collected by CTD to plot temperature (as an example). There is something wrong!
any help is very much appreciated
the steps are below:
1- list of mat fiels each of this mat files contains T table inside (screenshot shows).
2- download the mat fiels
3- grid the data from mulitple CTD locations
4- Surface maps with the coastlines
dataDir = ‘/’;
files = dir(fullfile(dataDir, ‘*.mat’));
T_all = table();
for i = 1:length(files)
fname = fullfile(dataDir, files(i).name);
S = load(fname);
if isfield(S,’T’)
Ti = S.T;
Ti.SourceFile = repmat(string(files(i).name), height(Ti), 1);
Tall = [Tall; Ti];
else
warning(‘%s does not contain table T’, files(i).name)
end
end
depth_target = 2.0; % meters
tol = 0.5; % ±0.5 m
Tz = Tall(abs(Tall.Depth_m – depth_target) <= tol, :);
[G, station, date] = findgroups(Tz.Station, Tz.Date);
Tmap = table();
Tmap.Station = station;
Tmap.Date = date;
Tmap.Lat = splitapply(@mean, Tz.Lat, G);
Tmap.Lon = splitapply(@mean, Tz.Lon, G);
Tmap.Temp = splitapply(@mean, Tz.Temp_C, G);
min_map_lon = 35.2;
max_map_lon = 37.2;
min_map_lat = 25.1;
max_map_lat = 27.6;
[LonGrid, LatGrid] = meshgrid( …
linspace(min_map_lon, max_map_lon, 250), …
linspace(min_map_lat, max_map_lat, 250));
TempGrid = griddata( …
Tmap.Lon, Tmap.Lat, Tmap.Temp, …
LonGrid, LatGrid, ‘v4’); % IDW
load RS_bathy_gebgo % longitude, latitude, bathy
orient portrait
figure
hold on
m_proj(‘mercator’, …
‘lon’,[min_map_lon max_map_lon], …
‘lat’,[min_map_lat max_map_lat]);
m_pcolor(longitude, latitude, bathy);
shading interp
colormap(flipud(gray))
caxis([-1200 0])
h = m_pcolor(LonGrid, LatGrid, TempGrid);
set(h,’FaceAlpha’,0.85) % transparency so bathy shows
shading interp
colormap(turbo)
m_usercoast(‘red_sea_f’,’patch’,[0.8 0.8 0.8])
m_grid(‘contour’,’on’,’tickdir’,’out’, …
‘box’,’fancy’,’fontsize’,10, …
‘linewidth’,1,’linestyle’,’–‘);
colorbar
ylabel(‘Latitude’,’fontsize’,16,’fontweight’,’bold’);
xlabel(‘Longitude’,’fontsize’,16,’fontweight’,’bold’);Hi All,
i am struggeling to have a correct interpolation (IDW) for 3d surface maps for the spatial analysis of the parameters collected by CTD to plot temperature (as an example). There is something wrong!
any help is very much appreciated
the steps are below:
1- list of mat fiels each of this mat files contains T table inside (screenshot shows).
2- download the mat fiels
3- grid the data from mulitple CTD locations
4- Surface maps with the coastlines
dataDir = ‘/’;
files = dir(fullfile(dataDir, ‘*.mat’));
T_all = table();
for i = 1:length(files)
fname = fullfile(dataDir, files(i).name);
S = load(fname);
if isfield(S,’T’)
Ti = S.T;
Ti.SourceFile = repmat(string(files(i).name), height(Ti), 1);
Tall = [Tall; Ti];
else
warning(‘%s does not contain table T’, files(i).name)
end
end
depth_target = 2.0; % meters
tol = 0.5; % ±0.5 m
Tz = Tall(abs(Tall.Depth_m – depth_target) <= tol, :);
[G, station, date] = findgroups(Tz.Station, Tz.Date);
Tmap = table();
Tmap.Station = station;
Tmap.Date = date;
Tmap.Lat = splitapply(@mean, Tz.Lat, G);
Tmap.Lon = splitapply(@mean, Tz.Lon, G);
Tmap.Temp = splitapply(@mean, Tz.Temp_C, G);
min_map_lon = 35.2;
max_map_lon = 37.2;
min_map_lat = 25.1;
max_map_lat = 27.6;
[LonGrid, LatGrid] = meshgrid( …
linspace(min_map_lon, max_map_lon, 250), …
linspace(min_map_lat, max_map_lat, 250));
TempGrid = griddata( …
Tmap.Lon, Tmap.Lat, Tmap.Temp, …
LonGrid, LatGrid, ‘v4’); % IDW
load RS_bathy_gebgo % longitude, latitude, bathy
orient portrait
figure
hold on
m_proj(‘mercator’, …
‘lon’,[min_map_lon max_map_lon], …
‘lat’,[min_map_lat max_map_lat]);
m_pcolor(longitude, latitude, bathy);
shading interp
colormap(flipud(gray))
caxis([-1200 0])
h = m_pcolor(LonGrid, LatGrid, TempGrid);
set(h,’FaceAlpha’,0.85) % transparency so bathy shows
shading interp
colormap(turbo)
m_usercoast(‘red_sea_f’,’patch’,[0.8 0.8 0.8])
m_grid(‘contour’,’on’,’tickdir’,’out’, …
‘box’,’fancy’,’fontsize’,10, …
‘linewidth’,1,’linestyle’,’–‘);
colorbar
ylabel(‘Latitude’,’fontsize’,16,’fontweight’,’bold’);
xlabel(‘Longitude’,’fontsize’,16,’fontweight’,’bold’); Hi All,
i am struggeling to have a correct interpolation (IDW) for 3d surface maps for the spatial analysis of the parameters collected by CTD to plot temperature (as an example). There is something wrong!
any help is very much appreciated
the steps are below:
1- list of mat fiels each of this mat files contains T table inside (screenshot shows).
2- download the mat fiels
3- grid the data from mulitple CTD locations
4- Surface maps with the coastlines
dataDir = ‘/’;
files = dir(fullfile(dataDir, ‘*.mat’));
T_all = table();
for i = 1:length(files)
fname = fullfile(dataDir, files(i).name);
S = load(fname);
if isfield(S,’T’)
Ti = S.T;
Ti.SourceFile = repmat(string(files(i).name), height(Ti), 1);
Tall = [Tall; Ti];
else
warning(‘%s does not contain table T’, files(i).name)
end
end
depth_target = 2.0; % meters
tol = 0.5; % ±0.5 m
Tz = Tall(abs(Tall.Depth_m – depth_target) <= tol, :);
[G, station, date] = findgroups(Tz.Station, Tz.Date);
Tmap = table();
Tmap.Station = station;
Tmap.Date = date;
Tmap.Lat = splitapply(@mean, Tz.Lat, G);
Tmap.Lon = splitapply(@mean, Tz.Lon, G);
Tmap.Temp = splitapply(@mean, Tz.Temp_C, G);
min_map_lon = 35.2;
max_map_lon = 37.2;
min_map_lat = 25.1;
max_map_lat = 27.6;
[LonGrid, LatGrid] = meshgrid( …
linspace(min_map_lon, max_map_lon, 250), …
linspace(min_map_lat, max_map_lat, 250));
TempGrid = griddata( …
Tmap.Lon, Tmap.Lat, Tmap.Temp, …
LonGrid, LatGrid, ‘v4’); % IDW
load RS_bathy_gebgo % longitude, latitude, bathy
orient portrait
figure
hold on
m_proj(‘mercator’, …
‘lon’,[min_map_lon max_map_lon], …
‘lat’,[min_map_lat max_map_lat]);
m_pcolor(longitude, latitude, bathy);
shading interp
colormap(flipud(gray))
caxis([-1200 0])
h = m_pcolor(LonGrid, LatGrid, TempGrid);
set(h,’FaceAlpha’,0.85) % transparency so bathy shows
shading interp
colormap(turbo)
m_usercoast(‘red_sea_f’,’patch’,[0.8 0.8 0.8])
m_grid(‘contour’,’on’,’tickdir’,’out’, …
‘box’,’fancy’,’fontsize’,10, …
‘linewidth’,1,’linestyle’,’–‘);
colorbar
ylabel(‘Latitude’,’fontsize’,16,’fontweight’,’bold’);
xlabel(‘Longitude’,’fontsize’,16,’fontweight’,’bold’); interpolation, 3d plots, surface MATLAB Answers — New Questions
Writecell/table to Excel error
Hi all,
I can no longer export data to Excel using writecell/table, because the function crashes due to an import issue :
Error using writetable (line 278)
Error: File: createWorkbook.m Line: 80 Column: 12
Unable to find or import ‘matlab.io.spreadsheet.internal.BookType’.Imported names must end with ‘.*’ or be fully qualified.
No problem in Matlab R2023, as it does not seem to use the same sub-functions.
Regards,
Stéphane.Hi all,
I can no longer export data to Excel using writecell/table, because the function crashes due to an import issue :
Error using writetable (line 278)
Error: File: createWorkbook.m Line: 80 Column: 12
Unable to find or import ‘matlab.io.spreadsheet.internal.BookType’.Imported names must end with ‘.*’ or be fully qualified.
No problem in Matlab R2023, as it does not seem to use the same sub-functions.
Regards,
Stéphane. Hi all,
I can no longer export data to Excel using writecell/table, because the function crashes due to an import issue :
Error using writetable (line 278)
Error: File: createWorkbook.m Line: 80 Column: 12
Unable to find or import ‘matlab.io.spreadsheet.internal.BookType’.Imported names must end with ‘.*’ or be fully qualified.
No problem in Matlab R2023, as it does not seem to use the same sub-functions.
Regards,
Stéphane. booktype, writecell, writetable MATLAB Answers — New Questions
How to hide the view selection cube
How can I hide the view selection cube in multibody explorer during a simulation?
Also the Orientation Triad.How can I hide the view selection cube in multibody explorer during a simulation?
Also the Orientation Triad. How can I hide the view selection cube in multibody explorer during a simulation?
Also the Orientation Triad. multibody explorer, view selection cube MATLAB Answers — New Questions
How to connect a PID signal to a H-bridge driver
Hello, a very simple question, but how do you connect a PID to the input of a H-bridge driver? I have read the relevant documentation on the H-bridge driver and tried using a simulink-PS converter however, none of these work, please could someone show me how to do this. Thanks.Hello, a very simple question, but how do you connect a PID to the input of a H-bridge driver? I have read the relevant documentation on the H-bridge driver and tried using a simulink-PS converter however, none of these work, please could someone show me how to do this. Thanks. Hello, a very simple question, but how do you connect a PID to the input of a H-bridge driver? I have read the relevant documentation on the H-bridge driver and tried using a simulink-PS converter however, none of these work, please could someone show me how to do this. Thanks. simscape, simulink, pid MATLAB Answers — New Questions
Deactivating an Entra ID Application
Deactivate Applications to Halt Access to Resources
Microsoft Entra ID documentation includes a page titled “Deactivate an enterprise application,” which explains that deactivating an application stops it being used because Entra ID will not issue access tokens to the application while it is deactivated, meaning that users cannot sign into the application and the application cannot be used to access protected resources (data) using its assigned permissions. Existing access tokens issued by Entra ID to the application continue to be valid until they expire (usually within an hour). The big plus point is that unlike the more radical deletion option, deactivation keeps application properties, roles, and permissions in place in a state that is easily reactivated to put the application back into use.
Applications are activated by default. Only an administrator or application owner can deactivate an application. If they’re signed into a Microsoft Graph PowerShell SDK interactive session, the delegated Application.ReadWrite.All permission must be available.
Microsoft says that deactivation is useful for security investigations, perhaps when a suspicious or unknown application is discovered during a periodic review of the app inventory or after a review of service principal sign-in activity. In these circumstances, it’s good to temporarily deactivate the application while everything is checked out.
Enterprise Applications and App Registrations
Microsoft’s use of the term “enterprise application” is loose and a tad misleading. Many enterprise applications, such as the first-party applications used by Microsoft 365 and the Microsoft Graph, or the Microsoft Graph PowerShell Tools application used for Microsoft Graph PowerShell SDK interactive sessions cannot be deactivated for a very simple reason: the ownership of these applications is tied to the Microsoft tenant, not yours. Deactivation is only possible if done in the tenant that owns an application.
In practical terms, this means that you can deactivate applications created in your tenant (often called app registrations), including applications designed for multi-tenant use because you have write access to those applications.
The isDisabled Property
The key to deactivate applications is to set the isDisabled property for applications to true. Today, this must be done through PowerShell because the Entra admin center doesn’t currently have an option to deactivate an application. Access to the isDisabled property is only available through the beta version of the Graph application endpoint.
When deactivating an application, I recommend that you update the application display name and notes to make sure that other administrators know about the application’s new status. This code creates a hash table containing the body for the Graph request and posts the request using the Update-MgApplication cmdlet:
# Create the request body
$NewDisplayName = $ApplicationObject.displayName + " (disabled)"
$NewNotes = ($ApplicationObject.notes.trim()) + "`nApp disabled on " + (Get-Date -format "dd-MMM-yyyy HH:mm") + " by " + (Get-MgContext).account
$RequestBody = @{}
$RequestBody.Add("isDisabled", $true)
$RequestBody.Add("displayName", $NewDisplayName)
$RequestBody.Add("notes", $NewNotes)
# Update the application
Update-MgApplication -ApplicationId $ApplicationObject.Id -BodyParameter $RequestBody
Assuming a successful request, the Entra admin center highlights the application’s deactivated status (Figure 1).

Attempts to sign into the deactivated application generate AADSTS7000112 (“application is disabled”) errors.
Reactivating an application is easily done by adjusting the content of the request body to reset the isDisabled property. This code also adjusts the display name and updates the application notes to record the reactivation:
$NewDisplayName = $ApplicationObject.displayName.split("(")[0]
$NewNotes = ($ApplicationObject.notes.trim()) + "`nApp reactivated on " + (Get-Date -format "dd-MMM-yyyy HH:mm") + " by " + (Get-MgContext).account
$RequestBody = @{}
$RequestBody.Add("isDisabled", $false)
$RequestBody.Add("displayName", $NewDisplayName)
$RequestBody.Add("notes", $NewNotes)
Update-MgApplication -ApplicationId $ApplicationObject.Id -BodyParameter $RequestBody
Remove App Owners
The documentation suggests that you remove application owners before deactivation to make sure that only administrators can reactivate the application. This advice is contrary to the assertion that deactivation is good because it preserves application data. However, let’s not argue and go ahead with some code to remove application owners (if present):
# Remove application owners
[array]$Owners = Get-MgApplicationOwner -ApplicationId $ApplicationObject.Id -All
ForEach ($Owner in $Owners) {
Try {
Remove-MgApplicationOwnerDirectoryObjectByRef -ApplicationId $ApplicationObject.Id -DirectoryObjectId $Owner.Id
Write-Host ("Removed owner {0} from application..." -f $Owner.DisplayName)
} Catch {
Write-Host ("Failed to remove owner {0} from application. Error details:" -f $Owner.DisplayName)
Write-Host $_.Exception.Message
}
}
Remember to add the application owners back when you reactivate the application.
You can download a working script containing the code described above and other steps (like error checking) from the Office 365 for IT Pros GitHub repository.
Deactivate Applications is a Step Toward Full Application Lifecycle
Application deactivation is now the go-to method to put an application into an inactive state. It’s another small but welcome step along the path to full lifecycle management for Entra ID applications.
Need help to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
Why Doesn’t pwelch with the ‘centered’ Option Follow the Same Convention as fftshift for Even nfft?
When the fft length is even, fftshift flips the input so that the Nyquist point is to the left. But pwelch with freqrange = ‘centered’ keeps the Nyquist point on the right.
The behavior in pwelch is documented, so can’t complain.
Just wondering why the developers might have made that choice for pwelch (and others, like periodogram), rather than maintaining consistency.
rng(100);
x = rand(1,10);
X = fftshift(fft(x));
% this usage of pwelch is undocumented because noverlap is supposed to be
% a positive integer
[P,f] = pwelch(x,ones(size(x)),0,10,1,’centered’);
figure
plot(f,P*10,’-o’,(-5:4)/10,X.*conj(X),’-x’)
axis paddedWhen the fft length is even, fftshift flips the input so that the Nyquist point is to the left. But pwelch with freqrange = ‘centered’ keeps the Nyquist point on the right.
The behavior in pwelch is documented, so can’t complain.
Just wondering why the developers might have made that choice for pwelch (and others, like periodogram), rather than maintaining consistency.
rng(100);
x = rand(1,10);
X = fftshift(fft(x));
% this usage of pwelch is undocumented because noverlap is supposed to be
% a positive integer
[P,f] = pwelch(x,ones(size(x)),0,10,1,’centered’);
figure
plot(f,P*10,’-o’,(-5:4)/10,X.*conj(X),’-x’)
axis padded When the fft length is even, fftshift flips the input so that the Nyquist point is to the left. But pwelch with freqrange = ‘centered’ keeps the Nyquist point on the right.
The behavior in pwelch is documented, so can’t complain.
Just wondering why the developers might have made that choice for pwelch (and others, like periodogram), rather than maintaining consistency.
rng(100);
x = rand(1,10);
X = fftshift(fft(x));
% this usage of pwelch is undocumented because noverlap is supposed to be
% a positive integer
[P,f] = pwelch(x,ones(size(x)),0,10,1,’centered’);
figure
plot(f,P*10,’-o’,(-5:4)/10,X.*conj(X),’-x’)
axis padded pwelch, fftshift, centered MATLAB Answers — New Questions
Trying to read a text field from my Thingspeak channel (text) and display it using arduino giga display shield.
Matlab Visualization Code (works properly)
My first 3 lines of information display properly on my giga display shield.
The 4th line which is supposed to be a timestamp stored in my field as text (ex:
Displays as -1, not the text timestamp I am looking for. Any help is appreciated.
% Read the last entry and its timestamp
[data, timestamps] = thingSpeakRead(x, ‘NumPoints’, 1);
% Add a timezone offset of 5 hours
localTime = timestamps – hours(5);
% Display the local timestamp as text
text(0.5, 0.5, datestr(localTime), ‘FontSize’, 20, ‘HorizontalAlignment’, ‘center’);
axis off;
Note – sensitive info replaced with X
Arduino code
#include <WiFi.h> //library for connecting to WiFi
#include <ThingSpeak.h> //library for reading data from ThingSpeak
#include "Arduino_GigaDisplay_GFX.h" //library for using the GigaDisplay shield
//define WiFi credentials
const char* ssid = "x";
const char* password = "x";
WiFiClient client;
String textData = "";
//define ThingSpeak channel IDs and read APIs
unsigned long lakeChannelID = x;
const char* lakeReadAPI = "x";
//define GigaDisplay object
GigaDisplay_GFX display;
#define BLACK 0x0000
#define WHITE 0xFFFF
#define NEW 0xFF6B35
void setup() {
//initialize serial communication for debugging
Serial.begin(9600);
//connect to WiFi
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi…");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("Connected!");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
ThingSpeak.begin(client); // Initialize ThingSpeak
display.begin();
}
void loop() {
float homeTemp = ThingSpeak.readFloatField(lakeChannelID, 8, lakeReadAPI);
float lakeTemp1 = ThingSpeak.readFloatField(lakeChannelID, 1, lakeReadAPI);
float lakeTemp2 = ThingSpeak.readFloatField(lakeChannelID, 2, lakeReadAPI);
float lakeTemp3 = ThingSpeak.readFloatField(lakeChannelID, 3, lakeReadAPI);
float lakeTemp4 = ThingSpeak.readFloatField(lakeChannelID, 4, lakeReadAPI);
float lakeTemp5 = ThingSpeak.readFloatField(lakeChannelID, 5, lakeReadAPI);
float lakeTemp6 = ThingSpeak.readFloatField(lakeChannelID, 6, lakeReadAPI);
String textData = ThingSpeak.readStringField(lakeChannelID,7, lakeReadAPI);
float lakeTempOutAvg = (lakeTemp1 + lakeTemp2 + lakeTemp3)/3;
float lakeTempUnderAvg = (lakeTemp4 + lakeTemp5 + lakeTemp6)/3;
long statuscode = ThingSpeak.getLastReadStatus();
if (statuscode == 200)
{
//print temperature data to serial monitor for debugging
Serial.print("Home Outside Temp: ");
Serial.println(homeTemp);
Serial.print("Lake Outside Temp: ");
Serial.println(lakeTemp1);
Serial.print("Lake Outside Average: ");
Serial.println(lakeTempOutAvg);
Serial.print("Lake Under Average: ");
Serial.println(lakeTempUnderAvg);
Serial.print("Last Read: ");
Serial.println(textData);
//clear display and set cursor to top left corner
display.setRotation(1); // -90 degrees rotation
display.fillScreen(BLACK);
display.setTextColor(NEW);
display.setTextSize( 5);
display.setCursor(50, 10); // Adjusted for rotated display
display.print("Home Outdoors");
display.setCursor(200, 60); // Adjusted for rotated display
display.print(homeTemp, 1);
display.print(" F");
display.setCursor(50, 120); // Adjusted for rotated display
display.print("Lake Outdoors");
display.setCursor(200, 170); // Adjusted for rotated display
display.print(lakeTempOutAvg, 1);
display.print(" F");
display.setCursor(50, 230); // Adjusted for rotated display
display.print("Lake Under House");
display.setCursor(200, 280); // Adjusted for rotated display
display.print(lakeTempUnderAvg, 1);
display.print(" F");
display.setCursor(50, 340); // Adjusted for rotated display
display.print("Data Last Reported");
display.setCursor(200, 390); // Adjusted for rotated display
display.print(textData);
//wait for 10 seconds before updating again
delay(10000);
}
}
//Code sourced from ThingSpeak and GigaDisplay libraries.Matlab Visualization Code (works properly)
My first 3 lines of information display properly on my giga display shield.
The 4th line which is supposed to be a timestamp stored in my field as text (ex:
Displays as -1, not the text timestamp I am looking for. Any help is appreciated.
% Read the last entry and its timestamp
[data, timestamps] = thingSpeakRead(x, ‘NumPoints’, 1);
% Add a timezone offset of 5 hours
localTime = timestamps – hours(5);
% Display the local timestamp as text
text(0.5, 0.5, datestr(localTime), ‘FontSize’, 20, ‘HorizontalAlignment’, ‘center’);
axis off;
Note – sensitive info replaced with X
Arduino code
#include <WiFi.h> //library for connecting to WiFi
#include <ThingSpeak.h> //library for reading data from ThingSpeak
#include "Arduino_GigaDisplay_GFX.h" //library for using the GigaDisplay shield
//define WiFi credentials
const char* ssid = "x";
const char* password = "x";
WiFiClient client;
String textData = "";
//define ThingSpeak channel IDs and read APIs
unsigned long lakeChannelID = x;
const char* lakeReadAPI = "x";
//define GigaDisplay object
GigaDisplay_GFX display;
#define BLACK 0x0000
#define WHITE 0xFFFF
#define NEW 0xFF6B35
void setup() {
//initialize serial communication for debugging
Serial.begin(9600);
//connect to WiFi
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi…");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("Connected!");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
ThingSpeak.begin(client); // Initialize ThingSpeak
display.begin();
}
void loop() {
float homeTemp = ThingSpeak.readFloatField(lakeChannelID, 8, lakeReadAPI);
float lakeTemp1 = ThingSpeak.readFloatField(lakeChannelID, 1, lakeReadAPI);
float lakeTemp2 = ThingSpeak.readFloatField(lakeChannelID, 2, lakeReadAPI);
float lakeTemp3 = ThingSpeak.readFloatField(lakeChannelID, 3, lakeReadAPI);
float lakeTemp4 = ThingSpeak.readFloatField(lakeChannelID, 4, lakeReadAPI);
float lakeTemp5 = ThingSpeak.readFloatField(lakeChannelID, 5, lakeReadAPI);
float lakeTemp6 = ThingSpeak.readFloatField(lakeChannelID, 6, lakeReadAPI);
String textData = ThingSpeak.readStringField(lakeChannelID,7, lakeReadAPI);
float lakeTempOutAvg = (lakeTemp1 + lakeTemp2 + lakeTemp3)/3;
float lakeTempUnderAvg = (lakeTemp4 + lakeTemp5 + lakeTemp6)/3;
long statuscode = ThingSpeak.getLastReadStatus();
if (statuscode == 200)
{
//print temperature data to serial monitor for debugging
Serial.print("Home Outside Temp: ");
Serial.println(homeTemp);
Serial.print("Lake Outside Temp: ");
Serial.println(lakeTemp1);
Serial.print("Lake Outside Average: ");
Serial.println(lakeTempOutAvg);
Serial.print("Lake Under Average: ");
Serial.println(lakeTempUnderAvg);
Serial.print("Last Read: ");
Serial.println(textData);
//clear display and set cursor to top left corner
display.setRotation(1); // -90 degrees rotation
display.fillScreen(BLACK);
display.setTextColor(NEW);
display.setTextSize( 5);
display.setCursor(50, 10); // Adjusted for rotated display
display.print("Home Outdoors");
display.setCursor(200, 60); // Adjusted for rotated display
display.print(homeTemp, 1);
display.print(" F");
display.setCursor(50, 120); // Adjusted for rotated display
display.print("Lake Outdoors");
display.setCursor(200, 170); // Adjusted for rotated display
display.print(lakeTempOutAvg, 1);
display.print(" F");
display.setCursor(50, 230); // Adjusted for rotated display
display.print("Lake Under House");
display.setCursor(200, 280); // Adjusted for rotated display
display.print(lakeTempUnderAvg, 1);
display.print(" F");
display.setCursor(50, 340); // Adjusted for rotated display
display.print("Data Last Reported");
display.setCursor(200, 390); // Adjusted for rotated display
display.print(textData);
//wait for 10 seconds before updating again
delay(10000);
}
}
//Code sourced from ThingSpeak and GigaDisplay libraries. Matlab Visualization Code (works properly)
My first 3 lines of information display properly on my giga display shield.
The 4th line which is supposed to be a timestamp stored in my field as text (ex:
Displays as -1, not the text timestamp I am looking for. Any help is appreciated.
% Read the last entry and its timestamp
[data, timestamps] = thingSpeakRead(x, ‘NumPoints’, 1);
% Add a timezone offset of 5 hours
localTime = timestamps – hours(5);
% Display the local timestamp as text
text(0.5, 0.5, datestr(localTime), ‘FontSize’, 20, ‘HorizontalAlignment’, ‘center’);
axis off;
Note – sensitive info replaced with X
Arduino code
#include <WiFi.h> //library for connecting to WiFi
#include <ThingSpeak.h> //library for reading data from ThingSpeak
#include "Arduino_GigaDisplay_GFX.h" //library for using the GigaDisplay shield
//define WiFi credentials
const char* ssid = "x";
const char* password = "x";
WiFiClient client;
String textData = "";
//define ThingSpeak channel IDs and read APIs
unsigned long lakeChannelID = x;
const char* lakeReadAPI = "x";
//define GigaDisplay object
GigaDisplay_GFX display;
#define BLACK 0x0000
#define WHITE 0xFFFF
#define NEW 0xFF6B35
void setup() {
//initialize serial communication for debugging
Serial.begin(9600);
//connect to WiFi
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi…");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("Connected!");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
ThingSpeak.begin(client); // Initialize ThingSpeak
display.begin();
}
void loop() {
float homeTemp = ThingSpeak.readFloatField(lakeChannelID, 8, lakeReadAPI);
float lakeTemp1 = ThingSpeak.readFloatField(lakeChannelID, 1, lakeReadAPI);
float lakeTemp2 = ThingSpeak.readFloatField(lakeChannelID, 2, lakeReadAPI);
float lakeTemp3 = ThingSpeak.readFloatField(lakeChannelID, 3, lakeReadAPI);
float lakeTemp4 = ThingSpeak.readFloatField(lakeChannelID, 4, lakeReadAPI);
float lakeTemp5 = ThingSpeak.readFloatField(lakeChannelID, 5, lakeReadAPI);
float lakeTemp6 = ThingSpeak.readFloatField(lakeChannelID, 6, lakeReadAPI);
String textData = ThingSpeak.readStringField(lakeChannelID,7, lakeReadAPI);
float lakeTempOutAvg = (lakeTemp1 + lakeTemp2 + lakeTemp3)/3;
float lakeTempUnderAvg = (lakeTemp4 + lakeTemp5 + lakeTemp6)/3;
long statuscode = ThingSpeak.getLastReadStatus();
if (statuscode == 200)
{
//print temperature data to serial monitor for debugging
Serial.print("Home Outside Temp: ");
Serial.println(homeTemp);
Serial.print("Lake Outside Temp: ");
Serial.println(lakeTemp1);
Serial.print("Lake Outside Average: ");
Serial.println(lakeTempOutAvg);
Serial.print("Lake Under Average: ");
Serial.println(lakeTempUnderAvg);
Serial.print("Last Read: ");
Serial.println(textData);
//clear display and set cursor to top left corner
display.setRotation(1); // -90 degrees rotation
display.fillScreen(BLACK);
display.setTextColor(NEW);
display.setTextSize( 5);
display.setCursor(50, 10); // Adjusted for rotated display
display.print("Home Outdoors");
display.setCursor(200, 60); // Adjusted for rotated display
display.print(homeTemp, 1);
display.print(" F");
display.setCursor(50, 120); // Adjusted for rotated display
display.print("Lake Outdoors");
display.setCursor(200, 170); // Adjusted for rotated display
display.print(lakeTempOutAvg, 1);
display.print(" F");
display.setCursor(50, 230); // Adjusted for rotated display
display.print("Lake Under House");
display.setCursor(200, 280); // Adjusted for rotated display
display.print(lakeTempUnderAvg, 1);
display.print(" F");
display.setCursor(50, 340); // Adjusted for rotated display
display.print("Data Last Reported");
display.setCursor(200, 390); // Adjusted for rotated display
display.print(textData);
//wait for 10 seconds before updating again
delay(10000);
}
}
//Code sourced from ThingSpeak and GigaDisplay libraries. thingspeak, arduino MATLAB Answers — New Questions
How would i get acces to a object that i only know the name of?
I have this custom component that i want to make for the app designer, the issue is that i am unable to send the object in question to the custom component on creation as that isnt allowed.
This code snippet was something i tried but didnt work as its not allowed to have custom components with input parameters.
function obj = Movcomp(Scenemanager)
addlisterner(Scenemanager,’Delete’,@Movcomp.Delete)
end
i would still like to do something like this As the Scenemanager will be one or multilple objects that will create and delete different components using callbacks. I couldnt find a way to create global callbacks similair to what can be done using a singleton for signals in godotI have this custom component that i want to make for the app designer, the issue is that i am unable to send the object in question to the custom component on creation as that isnt allowed.
This code snippet was something i tried but didnt work as its not allowed to have custom components with input parameters.
function obj = Movcomp(Scenemanager)
addlisterner(Scenemanager,’Delete’,@Movcomp.Delete)
end
i would still like to do something like this As the Scenemanager will be one or multilple objects that will create and delete different components using callbacks. I couldnt find a way to create global callbacks similair to what can be done using a singleton for signals in godot I have this custom component that i want to make for the app designer, the issue is that i am unable to send the object in question to the custom component on creation as that isnt allowed.
This code snippet was something i tried but didnt work as its not allowed to have custom components with input parameters.
function obj = Movcomp(Scenemanager)
addlisterner(Scenemanager,’Delete’,@Movcomp.Delete)
end
i would still like to do something like this As the Scenemanager will be one or multilple objects that will create and delete different components using callbacks. I couldnt find a way to create global callbacks similair to what can be done using a singleton for signals in godot appdesigner MATLAB Answers — New Questions
How to display square root symbol instead of decimal.
The number of display format does not include the square, I can only select decimal, rational…, but not square root. When I input sqrt(5) in a matrix and display it, it is transformed to decimal. Can I keep the square root form?The number of display format does not include the square, I can only select decimal, rational…, but not square root. When I input sqrt(5) in a matrix and display it, it is transformed to decimal. Can I keep the square root form? The number of display format does not include the square, I can only select decimal, rational…, but not square root. When I input sqrt(5) in a matrix and display it, it is transformed to decimal. Can I keep the square root form? number display format MATLAB Answers — New Questions
Maester and UTCM Are Complementary Tools for Microsoft 365 Tenant Management
UTCM and Maester Serve Different Purposes
With the arrival (in preview) of Microsoft’s Unified Tenant Configuration Management (UTCM) solution, some have asked if any potential overlap exists between UTCM and the community-driven Maester project. The answer is no. Both projects do different things and can be considered complementary to each other. Let me explain why.
UTCM Attacks the Problem of Configuration Settings
Microsoft 365 is a complex system to manage. The different workloads do not share common approaches to configurations and tenant administrators must deal with anything from a system registry setting to control how individual clients work to Graph API requests to update settings like obfuscation for report data. The lack of consistency and coherence means that Microsoft 365 administration is challenging, especially when something “goes wrong” after working perfectly happily for months.
Unified Tenant Configuration Management (UTCM) is the start of a project to help tenant administrators detect changes to important configuration settings within Entra ID and the wider Microsoft 365 ecosystem. It’s only a start because UTCM cannot monitor everything. As explained in this article, UTCM has an inventory of approximately 300 workload resources that it can monitor to note when changes occur to specified properties. This change is called drift, and it’s the kind of thing that can cause a workload not to function as expected. The set of resource types and properties is defined in a schema that Microsoft is likely to expand over time to increase the usefulness of UTCM.
UTCM works by checking the current properties of a monitored resource against the value captured in a snapshot. Tenant administrators must decide what resources and properties to monitor, how they will detect change (by checking the configuration drift records generated by UTCM), and what they will do when a property changes. In addition, because UTCM doesn’t tell you who changed a setting, effort is required to track down the culprit using audit logs (if the action is audited).
Today, UTCM is unfinished in that it cannot advise when change happens or what should happen about the change. Microsoft has said that they will improve UTCM functionality (listen to this podcast with Nik Charlebois, Principal Program Manager for UTCM), but the most exciting part of UTCM is that its workings are exposed through Graph APIs. ISVs and individual tenants can therefore fill in the gaps left by Microsoft. Because the problem of configuration drift is so intense, I anticipate that we’ll hear a lot about extensions and enhancements for UTCM in the coming months.
Maester Features Security and Custom Tests
Maester is an open-source community-driven platform to test different aspects of a Microsoft 365 tenant against best practice. Instead of being accessed via Graph APIs, Maester gives tenants the ability to add custom Pester, the PowerShell test framework. The tests can call Graph APIs to extract data about a workload. Being able to customize the test framework with your own tests is a very powerful capability.
Reporting a tenant’s current configuration against best practice (as determined by the community) helps tenants to maintain secure configurations. Many of the original Maester tests were written to test aspects of Entra ID like conditional access policies. With some extra effort, Maester tests can run against components like Exchange Online and Microsoft Teams and can execute in Azure Automation runbooks to ensure that assessments happen on a scheduled basis. Like UTCM, Maester doesn’t tell you who last updated a setting.
Reporting focuses on inconsistencies between the observed tenant configuration and best practice. It’s important to understand that failing a Maester test might be inconsequential if the setting being reported on is acceptable to your organization. For example, among the test failures Maester reported in a recent run (Figure 1) was “ORCA.240: Outlook is configured to display external tags for external emails,” a test belonging to the Microsoft Defender for Office 365 Recommended Configuration Analyzer (ORCA).The failure is because I disabled Outlook’s external email tagging option for some reason, probably because I can recognize external email.

Maester can be integrated with GitHub and Azure DevOps to improve the effectiveness of its operations. When Maester detects inconsistencies, it can flag the problem through email, Teams, or Slack. For more details, see the Maester home page.
Two Very Useful Tools
Maester and UTCM are not competitors. Maester has community backing and draws upon industry standards like CISA and CIS in addition to Microsoft recommendations for the security configurations that its tests assess. Customization and reporting are the core strength of Maester.
On the other hand, UTCM is a Microsoft solution that will come with support when it’s generally available. UTCM doesn’t draw upon the same kind of material because it’s simply concerned about measuring configuration drift within individual tenants.
You could say that Maester helps you get your tenant’s configuration into a secure and supportable shape and UTCM then measures change that happens in that configuration. Of course, some of the drift might come from updated recommendations in Maester tests, but that just reflects the changing nature of the Microsoft 365 ecosystem. In either case, any Microsoft 365 tenant can benefit from these tools.
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!
Generated “*.m” file could not be real time updated
hello:
As showed in figure. I have a ‘main.m’ file, which feature is read external files and generate ‘a.m’ file, then run ‘a.m’. I found that, after run(‘a.m’) on ‘Step 2’, the resault represent that ‘a.m’ is not newest. After run ‘main.m’, when I check ‘a.m’, it is newest.
My question is there any way to run newest ‘a.m’ in ‘main.m’.
Thank you.hello:
As showed in figure. I have a ‘main.m’ file, which feature is read external files and generate ‘a.m’ file, then run ‘a.m’. I found that, after run(‘a.m’) on ‘Step 2’, the resault represent that ‘a.m’ is not newest. After run ‘main.m’, when I check ‘a.m’, it is newest.
My question is there any way to run newest ‘a.m’ in ‘main.m’.
Thank you. hello:
As showed in figure. I have a ‘main.m’ file, which feature is read external files and generate ‘a.m’ file, then run ‘a.m’. I found that, after run(‘a.m’) on ‘Step 2’, the resault represent that ‘a.m’ is not newest. After run ‘main.m’, when I check ‘a.m’, it is newest.
My question is there any way to run newest ‘a.m’ in ‘main.m’.
Thank you. file MATLAB Answers — New Questions
vehicle dynamics code problems
says t isn’t defined and gives me a hard time. Where t is the time component of the function.
%%VEHICLE_MODEL IDNLGREY model file
%%function [dx,y] = VEHICLE_MODEL(t, x, u, m, a, b, Cy, varargin)
function [dx,y] = VEHICLE_MODEL_test(t, x, u, m, a, b, Cy, varargin)
%% prompt = ‘Please enter the intial start time. ‘;
%% t = input(prompt);
%% prompt = ‘Please enter the Vehicle Mass in Kg ‘;
%% m = input(prompt);
% function parameters:
% t: the current time
% x: the state vector at time t
% u: the input vector at time t
% m: mass of the vehicle [kg]
% a: distance from front axle to COG [m]
% b: distance from rear axle to COG [m]
% Cy: lateral tire stiffness (Axis skew stiffness) [N/rad]
% varargin: optional inputs to the model file
J = m * 0.25 *(a+b)^2; % moment of inertia [kg*m^2]
Fyf = Cy*(u(1)-atan((x(4)+a*x(2))./x(3))); % lateral tire force on front tires [N]
Fyr = -Cy*atan((x(4)-b*x(2))./x(3)); % lateral tire force on rear tires [N]
vx_inertial = x(3).*cos(x(1))-x(4).*sin(x(1)); % longitudinal velocity in inertial reference frame [m/s]
vy_inertial = x(3).*sin(x(1))+x(4).*cos(x(1)); % lateral velocity in inertial reference frame [m/s]
% state equations.
dx = [x(2); … % yaw angle velocity [rad/s]
1/J*(a*(u(2)*sin(u(1))+Fyf*cos(u(1)))-b*Fyr); … % yaw angle accel. [rad/s^2]
1/m*(u(2)*cos(u(1))-Fyf*sin(u(1))+u(3))+x(4).*x(2); … % longitudinal accel. in body reference frame [m/s^2]
1/m*(u(2)*sin(u(1))+Fyf*cos(u(1))+Fyr)-x(3).*x(2); … % lateral accel. in body reference frame [m/s^2]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial … % lateral velocity in inertial reference frame [m/s]
];
% output equations.
y = [x(1); … % yaw angle [rad]
x(2); … % yaw angle velocity [rad/s]
x(3); … % longitudinal velocity in body reference frame [m/s]
x(4); … % lateral velocity in body reference frame [m/s]
x(5); … % longitudinal position in inertial reference frame [m]
x(6); … % lateral position in inertial reference frame [m]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial; … % lateral velocity in inertial reference frame [m/s]
Fyf; … % lateral tire force on front tires [N]
Fyr … % lateral tire force on rear tires [N]
];
endsays t isn’t defined and gives me a hard time. Where t is the time component of the function.
%%VEHICLE_MODEL IDNLGREY model file
%%function [dx,y] = VEHICLE_MODEL(t, x, u, m, a, b, Cy, varargin)
function [dx,y] = VEHICLE_MODEL_test(t, x, u, m, a, b, Cy, varargin)
%% prompt = ‘Please enter the intial start time. ‘;
%% t = input(prompt);
%% prompt = ‘Please enter the Vehicle Mass in Kg ‘;
%% m = input(prompt);
% function parameters:
% t: the current time
% x: the state vector at time t
% u: the input vector at time t
% m: mass of the vehicle [kg]
% a: distance from front axle to COG [m]
% b: distance from rear axle to COG [m]
% Cy: lateral tire stiffness (Axis skew stiffness) [N/rad]
% varargin: optional inputs to the model file
J = m * 0.25 *(a+b)^2; % moment of inertia [kg*m^2]
Fyf = Cy*(u(1)-atan((x(4)+a*x(2))./x(3))); % lateral tire force on front tires [N]
Fyr = -Cy*atan((x(4)-b*x(2))./x(3)); % lateral tire force on rear tires [N]
vx_inertial = x(3).*cos(x(1))-x(4).*sin(x(1)); % longitudinal velocity in inertial reference frame [m/s]
vy_inertial = x(3).*sin(x(1))+x(4).*cos(x(1)); % lateral velocity in inertial reference frame [m/s]
% state equations.
dx = [x(2); … % yaw angle velocity [rad/s]
1/J*(a*(u(2)*sin(u(1))+Fyf*cos(u(1)))-b*Fyr); … % yaw angle accel. [rad/s^2]
1/m*(u(2)*cos(u(1))-Fyf*sin(u(1))+u(3))+x(4).*x(2); … % longitudinal accel. in body reference frame [m/s^2]
1/m*(u(2)*sin(u(1))+Fyf*cos(u(1))+Fyr)-x(3).*x(2); … % lateral accel. in body reference frame [m/s^2]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial … % lateral velocity in inertial reference frame [m/s]
];
% output equations.
y = [x(1); … % yaw angle [rad]
x(2); … % yaw angle velocity [rad/s]
x(3); … % longitudinal velocity in body reference frame [m/s]
x(4); … % lateral velocity in body reference frame [m/s]
x(5); … % longitudinal position in inertial reference frame [m]
x(6); … % lateral position in inertial reference frame [m]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial; … % lateral velocity in inertial reference frame [m/s]
Fyf; … % lateral tire force on front tires [N]
Fyr … % lateral tire force on rear tires [N]
];
end says t isn’t defined and gives me a hard time. Where t is the time component of the function.
%%VEHICLE_MODEL IDNLGREY model file
%%function [dx,y] = VEHICLE_MODEL(t, x, u, m, a, b, Cy, varargin)
function [dx,y] = VEHICLE_MODEL_test(t, x, u, m, a, b, Cy, varargin)
%% prompt = ‘Please enter the intial start time. ‘;
%% t = input(prompt);
%% prompt = ‘Please enter the Vehicle Mass in Kg ‘;
%% m = input(prompt);
% function parameters:
% t: the current time
% x: the state vector at time t
% u: the input vector at time t
% m: mass of the vehicle [kg]
% a: distance from front axle to COG [m]
% b: distance from rear axle to COG [m]
% Cy: lateral tire stiffness (Axis skew stiffness) [N/rad]
% varargin: optional inputs to the model file
J = m * 0.25 *(a+b)^2; % moment of inertia [kg*m^2]
Fyf = Cy*(u(1)-atan((x(4)+a*x(2))./x(3))); % lateral tire force on front tires [N]
Fyr = -Cy*atan((x(4)-b*x(2))./x(3)); % lateral tire force on rear tires [N]
vx_inertial = x(3).*cos(x(1))-x(4).*sin(x(1)); % longitudinal velocity in inertial reference frame [m/s]
vy_inertial = x(3).*sin(x(1))+x(4).*cos(x(1)); % lateral velocity in inertial reference frame [m/s]
% state equations.
dx = [x(2); … % yaw angle velocity [rad/s]
1/J*(a*(u(2)*sin(u(1))+Fyf*cos(u(1)))-b*Fyr); … % yaw angle accel. [rad/s^2]
1/m*(u(2)*cos(u(1))-Fyf*sin(u(1))+u(3))+x(4).*x(2); … % longitudinal accel. in body reference frame [m/s^2]
1/m*(u(2)*sin(u(1))+Fyf*cos(u(1))+Fyr)-x(3).*x(2); … % lateral accel. in body reference frame [m/s^2]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial … % lateral velocity in inertial reference frame [m/s]
];
% output equations.
y = [x(1); … % yaw angle [rad]
x(2); … % yaw angle velocity [rad/s]
x(3); … % longitudinal velocity in body reference frame [m/s]
x(4); … % lateral velocity in body reference frame [m/s]
x(5); … % longitudinal position in inertial reference frame [m]
x(6); … % lateral position in inertial reference frame [m]
vx_inertial; … % longitudinal velocity in inertial reference frame [m/s]
vy_inertial; … % lateral velocity in inertial reference frame [m/s]
Fyf; … % lateral tire force on front tires [N]
Fyr … % lateral tire force on rear tires [N]
];
end matlab function MATLAB Answers — New Questions
Why do my calculations not match up with the simulation results?
Hello,
For one of my university project we are tasked with designing a suspension system. Using hand calculations I have worked out that the maximum displacement of the mass should be 19.5mm when the spring stiffness is 54772.5N/m and the damping ratio is 3462.78N/(m/s). However, when I am modelling this system on simscape I get a displacement of around 200mm. I am new to using this software so suggestions as to where I’m going wrong would be great.
Below is the setup I’m trying to model where v=13.33m/s , go=0.015m and d=5m
This is the setup I’ve been using on simscapeHello,
For one of my university project we are tasked with designing a suspension system. Using hand calculations I have worked out that the maximum displacement of the mass should be 19.5mm when the spring stiffness is 54772.5N/m and the damping ratio is 3462.78N/(m/s). However, when I am modelling this system on simscape I get a displacement of around 200mm. I am new to using this software so suggestions as to where I’m going wrong would be great.
Below is the setup I’m trying to model where v=13.33m/s , go=0.015m and d=5m
This is the setup I’ve been using on simscape Hello,
For one of my university project we are tasked with designing a suspension system. Using hand calculations I have worked out that the maximum displacement of the mass should be 19.5mm when the spring stiffness is 54772.5N/m and the damping ratio is 3462.78N/(m/s). However, when I am modelling this system on simscape I get a displacement of around 200mm. I am new to using this software so suggestions as to where I’m going wrong would be great.
Below is the setup I’m trying to model where v=13.33m/s , go=0.015m and d=5m
This is the setup I’ve been using on simscape suspension, displacement, simscape, mass, damper, spring MATLAB Answers — New Questions
code is running but nothing pops up in my workspace?
in my command window it says
lab4
Enter a score (-1 to stop):
ctA = 0; %fill this with the quantity of A grades
ctB = 0; %fill this with the quantity of B grades
ctC = 0; %fill this with the quantity of C grades
ctD = 0; %fill this with the quantity of D grades
ctF = 0; %fill this with the quantity of F grades
d = input(‘Enter a score (-1 to stop): ‘);
scores = []; %empty array where values are stored
while d ~= -1
scores = [scores d]
d = input(‘Enter a score (-1 to stop): ‘);
end
for i =1:length(scores) % length of value i
if (scores(i) >= 90) % input if value is less than or equal to 90
ctA = ctA + 1 % how many As
scores = [scores, i]; % store the # of As in to score
elseif (scores(i) >=80) %input if value is less than or equal to 80
ctB = ctB +1 % how many Bs
scores= [scores i]; %store the # of Bs in to score
elseif (scores(i) >=70) %input if value is less than or equal to 70
ctC = ctC + 1 % how many Cs
scores= [scores i]; %store the # of Cs in to score
elseif (scores(i) >=60) %input if value is less than or equal to 60
ctD = ctD + 1
scores= [scores i];
elseif (scores(i) <60)
ctF = ctF + 1
scores= [scores i];
end
end
%displaying grades
disp("# of As: " + ctA);
disp("# of Bs: " + ctB);
disp("# of Cs: " + ctC);
disp("# of Ds: " + ctD);
disp("# of Fs: " + ctF);in my command window it says
lab4
Enter a score (-1 to stop):
ctA = 0; %fill this with the quantity of A grades
ctB = 0; %fill this with the quantity of B grades
ctC = 0; %fill this with the quantity of C grades
ctD = 0; %fill this with the quantity of D grades
ctF = 0; %fill this with the quantity of F grades
d = input(‘Enter a score (-1 to stop): ‘);
scores = []; %empty array where values are stored
while d ~= -1
scores = [scores d]
d = input(‘Enter a score (-1 to stop): ‘);
end
for i =1:length(scores) % length of value i
if (scores(i) >= 90) % input if value is less than or equal to 90
ctA = ctA + 1 % how many As
scores = [scores, i]; % store the # of As in to score
elseif (scores(i) >=80) %input if value is less than or equal to 80
ctB = ctB +1 % how many Bs
scores= [scores i]; %store the # of Bs in to score
elseif (scores(i) >=70) %input if value is less than or equal to 70
ctC = ctC + 1 % how many Cs
scores= [scores i]; %store the # of Cs in to score
elseif (scores(i) >=60) %input if value is less than or equal to 60
ctD = ctD + 1
scores= [scores i];
elseif (scores(i) <60)
ctF = ctF + 1
scores= [scores i];
end
end
%displaying grades
disp("# of As: " + ctA);
disp("# of Bs: " + ctB);
disp("# of Cs: " + ctC);
disp("# of Ds: " + ctD);
disp("# of Fs: " + ctF); in my command window it says
lab4
Enter a score (-1 to stop):
ctA = 0; %fill this with the quantity of A grades
ctB = 0; %fill this with the quantity of B grades
ctC = 0; %fill this with the quantity of C grades
ctD = 0; %fill this with the quantity of D grades
ctF = 0; %fill this with the quantity of F grades
d = input(‘Enter a score (-1 to stop): ‘);
scores = []; %empty array where values are stored
while d ~= -1
scores = [scores d]
d = input(‘Enter a score (-1 to stop): ‘);
end
for i =1:length(scores) % length of value i
if (scores(i) >= 90) % input if value is less than or equal to 90
ctA = ctA + 1 % how many As
scores = [scores, i]; % store the # of As in to score
elseif (scores(i) >=80) %input if value is less than or equal to 80
ctB = ctB +1 % how many Bs
scores= [scores i]; %store the # of Bs in to score
elseif (scores(i) >=70) %input if value is less than or equal to 70
ctC = ctC + 1 % how many Cs
scores= [scores i]; %store the # of Cs in to score
elseif (scores(i) >=60) %input if value is less than or equal to 60
ctD = ctD + 1
scores= [scores i];
elseif (scores(i) <60)
ctF = ctF + 1
scores= [scores i];
end
end
%displaying grades
disp("# of As: " + ctA);
disp("# of Bs: " + ctB);
disp("# of Cs: " + ctC);
disp("# of Ds: " + ctD);
disp("# of Fs: " + ctF); workspace MATLAB Answers — New Questions
PMSM FOC Hall sensor input for custom GPIO pin configurations
Hello Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for one of my PMSM control using FOC with Hall sensor for my custom board with TI F280049C and TI DRV8350 board. My custom board have fixed Hall sensor input cofigured at GPIO29, GPIO30,GPIO31. Below are my quires.
As these example have Hall sensor input captured using ECAP module. How to change GPIO for Hall sensor input in same model using ECAP?
How to check hall commutation sequence in model simulation and in hardware?
As above example uses DRV8305, I need to use DRV8350,what changes need to do in model?
Awaiting for valuable response.
Thanks.Hello Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for one of my PMSM control using FOC with Hall sensor for my custom board with TI F280049C and TI DRV8350 board. My custom board have fixed Hall sensor input cofigured at GPIO29, GPIO30,GPIO31. Below are my quires.
As these example have Hall sensor input captured using ECAP module. How to change GPIO for Hall sensor input in same model using ECAP?
How to check hall commutation sequence in model simulation and in hardware?
As above example uses DRV8305, I need to use DRV8350,what changes need to do in model?
Awaiting for valuable response.
Thanks. Hello Community,
I am refering https://in.mathworks.com/help/mcb/gs/foc-pmsm-using-hall-sensor-example.html for one of my PMSM control using FOC with Hall sensor for my custom board with TI F280049C and TI DRV8350 board. My custom board have fixed Hall sensor input cofigured at GPIO29, GPIO30,GPIO31. Below are my quires.
As these example have Hall sensor input captured using ECAP module. How to change GPIO for Hall sensor input in same model using ECAP?
How to check hall commutation sequence in model simulation and in hardware?
As above example uses DRV8305, I need to use DRV8350,what changes need to do in model?
Awaiting for valuable response.
Thanks. pmsm, foc, hallsensor, drv8350 MATLAB Answers — New Questions
How to Report Adaptive Scope Membership
New Get-AdaptiveScopeMembers Cmdlet Reveals Adaptive Scope Membership
Message center notification MC1221450 (23 January 2026) reports the addition of the Get-AdaptiveScopeMembers cmdlet, available in the latest version of the Exchange Online management module. Adaptive scopes (an E5 feature) are widely used by Purview solutions to find target locations for processing. For instance, an adaptive scope can find mailboxes to apply retention policies.
Scopes are adaptive because they are based on queries to find target objects. If the settings of an object change to match the scope, that object is found by the adaptive scope and will be processed. Different approaches can be taken to populate the targets of an adaptive scope. For example, here’s how to use the membership of a dynamic group with an adaptive scope.
Programmatic Reporting of Scope Targets
Adding a user, group, or site to an adaptive scope is not an immediate operation. Background processes that you cannot control must run to evaluate the scope query and determine which directory objects match. It can take between two and five days for the process to complete, so waiting for adjustments to adaptive scope membership is a waiting game. Until now, the only way to check the membership of an adaptive scope is by examining scope details through the Purview compliance portal (Figure 1).

The new Get-AdaptiveScopeMembers cmdlet is a programmatic way to report the membership of an adaptive scope. It is relatively easy to extract the membership for scopes targeted at user accounts and Microsoft 365 groups because the scope filter can be resolved with the Get-Recipient cmdlet. However, things aren’t quite so easy for scopes targeted at SharePoint Online sites and OneDrive accounts. The Get-AdaptiveScopeMembers cmdlet handles both types of scope. It also reports members that have been added and removed from a scope.
Adaptive Scope Membership in Action
The results of Get-AdaptiveScopeMembers are divided into a summary record (aka, result metadata) for the scope with subsequent records holding details for individual members. Here’s an example of a summary record:
TotalMemberCount : 7 CurrentPageMemberCount : 7 Watermark : IsLastPage : True Identity : office365itpros.onmicrosoft.comExecutive Mailboxes IsValid : True ObjectState : Unchanged
Member records capture details of member additions and removals. This is an example of a record for a user being added to a scope. The LocationType property can also be Group (Microsoft 365 Group) or Site (SharePoint Online site or OneDrive account).
LocationType : User State : Added EventDateTime : 10/26/2021 16:02:32 +00:00 DisplayName : James.A.Abrahams@office365itpros.com MailboxGuid : 4ee41d66-5ab0-4570-8707-6c865804f55e SmtpAddress : James.A.Abrahams@office365itpros.com ObjectId : d446f6d7-5728-44f8-9eac-71adb354fc89 SiteUrl : SiteId : 00000000-0000-0000-0000-000000000000 Upn : James.A.Abrahams@office365itpros.com
The EventDateTime property is when the background process added or removed an object from the scope. It’s an odd date format that needs a little manipulation to generate a printable date in PowerShell.
The ObjectId property is the GUID for the user’s Entra ID account. You can use it with the Get-MgUser cmdlet to fetch details of the account:
Get-MgUser -UserId $Members.ObjectId
The error handling for the Get-AdaptiveScopeMembers cmdlet could be better. If you attempt to fetch the membership of an empty scope (one with no members), the response isn’t very helpful.
Get-AdaptiveScopeMembers -Identity 'French IT Architects' Get-AdaptiveScopeMembers: Failed to get adaptive scope members response. Status: Request failed with status code NotFound for AdaptiveScopeReport: 3e275435-aa56-4578-803c-5324f732b0e5, InnerException: , StackTrace: at Microsoft.Office.CompliancePolicy.Tasks.ComplianceWorkbenchClient.GetAdaptiveLocationAsync(String policyOrScopeId, Int32 adaptiveReportTenantShardId, String query, Boolean isPolicyLocation) at Microsoft.Office.CompliancePolicy.Tasks.GetAdaptiveScopeMembers.GetAdaptiveLocationsResponse(String policyOrScopeId,String query).
To avoid unsightly errors, it’s best to do something like this:
$ScopeName = "Permanent Employees”
[array]$Membership = Get-AdaptiveScopeMembers -Identity $ScopeName -ErrorAction SilentlyContinue
If (!($Membership)) {
Write-Output ("No members found for {0} scope" -f $ScopeName )
} Else {
Write-Output ("{0} members found in {1} scope" -f $Membership.count, $ScopeName)
}
By default, the Get-AdaptiveScopeMembers cmdlet fetches the first 10,000 members. The PageResultSize parameter gives control over how many records the cmdlet fetches. You can set the value to Unlimited to fetch all. According to the documentation, Microsoft doesn’t recommend this approach because it might lead to long-running queries.
[array]$Members = Get-AdaptiveScopeMembers -Identity $Scope.Name -PageResultSize Unlimited -ErrorAction SilentlyContinue
In larger tenants, you might need to retrieve successive pages of membership records until all available data is fetched. The summary record in the results contains a watermark (called nextlink for Graph pagination) to fetch the next set of records. Here’s an example where a watermark is returned after fetching 100 member records:
TotalMemberCount : 142 CurrentPageMemberCount : 100 Watermark : H4sIAAAAAAAACh2R207CUBBF16cYYhQTm2gQRBMfUEEU8QJWlBdTsVwCIpSLEeO/u9qcTDN7z549c05/yTEzTo1tlnyJziiyI+ozYiIXk8jl6RGxEOdp+42yyj5b7GY4UT1lINqTi5lnlQofnthI+dS154yVyqWeadfKasovGOswy3YYy02tX1Ewr3iqzhhmUzsEvHFBVzZko6Jr7YAWTbUDFS3RtU5DlT01oXmbsvmEW0ocOSHmUfepWZUnq3PROQ07E7m1rg/id545NrrUudch4pBLNx1x4i6B/R2ZunMb3rCkx8ZTM0+cEOlaUzHWq+/0kkzgtKbZj3e4853XvHDDt8ynW1Z1TW8a8Wr/wn1De8tqC35zvnZONv1bRf74B8DSM628AQAA IsLastPage : False
We can see that 42 remaining members must be fetched. Using the watermark from the first members record, we can do the following to fetch the 42 records:
$Watermark = $Members[0].Watermark [array]$NextMembers = Get-AdaptiveScopeMembers -Identity $Scope.Name -PageCookie $Watermark $Members = $Members + $NextMembers
If more pages of data were available, the process of fetching pages would continue until no more data remains and the IsLastPage property is True. An example of fetching membership results page by page is available online.
Example Script
After understanding the basics of fetching scope members with the Get-AdaptiveScopeMembers cmdlet, let’s create a report to allow administrators to review the membership of the adaptive scopes defined in a tenant. I wrote a PowerShell script to do the job, which you can download from the Office 365 for IT Pros GitHub repository.
Figure 2 shows an extract from the HTML report generated by the script. Notice the warnings when mailboxes cannot be found. Adaptive scopes keep deleted objects in their membership. I’m not quite sure why this happens because some of the mailboxes are not inactive mailboxes retained because of a policy or retention label.

Microsoft seems to have put a fair amount of effort into developing the cmdlet, so customer demand for such a facility must exist. It will be interesting to see how Microsoft 365 tenants use the Get-AdaptiveScopeMembers cmdlet in production.
Need help to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle (incredible value!)
Matlab’s new appearance after R2025a hinders its usability.
Hello,
As we know, Matlab kept its appearance (or user interface) pretty much the same till R2024b version. As we know, from R2025a onwards, there was a major change, and I tried to avoid both R2025a and R2025b versions. At the same time, there were some essential functionalities of these versions, and I now have to use both R2025b and R2024b.
The major problem for me is this: I created a dark mode in R2024b (I also use it for let’s say 10 years), it may look like the dark mode in later releases, but I cannot directly control the colors of some objects, for example, the variable windows text color is fixed, I believe. The appearance of the figures is also different; overall, the sizes of the logos and buttons seem a bit different. When I see all these small details, frankly, it doesn’t look like/feel like the Matlab I’ve been using for so many years. (So it is a serious distraction source, at least for me, and I cannot fix it.
My question/request would be a simple one: would it be possible to bring the old skin of Matlab back? I would be so grateful.
Regards
DenizHello,
As we know, Matlab kept its appearance (or user interface) pretty much the same till R2024b version. As we know, from R2025a onwards, there was a major change, and I tried to avoid both R2025a and R2025b versions. At the same time, there were some essential functionalities of these versions, and I now have to use both R2025b and R2024b.
The major problem for me is this: I created a dark mode in R2024b (I also use it for let’s say 10 years), it may look like the dark mode in later releases, but I cannot directly control the colors of some objects, for example, the variable windows text color is fixed, I believe. The appearance of the figures is also different; overall, the sizes of the logos and buttons seem a bit different. When I see all these small details, frankly, it doesn’t look like/feel like the Matlab I’ve been using for so many years. (So it is a serious distraction source, at least for me, and I cannot fix it.
My question/request would be a simple one: would it be possible to bring the old skin of Matlab back? I would be so grateful.
Regards
Deniz Hello,
As we know, Matlab kept its appearance (or user interface) pretty much the same till R2024b version. As we know, from R2025a onwards, there was a major change, and I tried to avoid both R2025a and R2025b versions. At the same time, there were some essential functionalities of these versions, and I now have to use both R2025b and R2024b.
The major problem for me is this: I created a dark mode in R2024b (I also use it for let’s say 10 years), it may look like the dark mode in later releases, but I cannot directly control the colors of some objects, for example, the variable windows text color is fixed, I believe. The appearance of the figures is also different; overall, the sizes of the logos and buttons seem a bit different. When I see all these small details, frankly, it doesn’t look like/feel like the Matlab I’ve been using for so many years. (So it is a serious distraction source, at least for me, and I cannot fix it.
My question/request would be a simple one: would it be possible to bring the old skin of Matlab back? I would be so grateful.
Regards
Deniz matlab, color MATLAB Answers — New Questions









