Category: News
Microsoft’s Push to Save Office Files in the Cloud
New Policy Setting to Force Office to Save to Cloud Locations
Announced in Microsoft 365 message notification MC1137593 on 18 August 2025, Microsoft is introducing a new policy setting to force the creation (saving) of Office files in cloud locations. The setting only applies to Word, Excel, and PowerPoint files saved using the Microsoft 365 enterprise apps (subscription version of Office). No other Office version is affected.
Cloud locations means SharePoint Online, OneDrive for Business, and third-party cloud storage services like Dropbox or ShareFile (if the feature is enabled for the Microsoft 365 tenant).
The new policy enablecloudonlysaveasmode setting can be deployed to clients using Group policies or registry updates. The setting is available in the Administrative Template files for Microsoft Office (version 5516.1000 or newer) and applies to the Windows versions of the Microsoft 365 enterprise apps version 2506 (build 19029.2000) or later. I checked the feature using version 2508 (build 19127.20192) (Current Channel Preview).
MC1137593 says that public preview started to roll out in late August 2025 and is scheduled to complete by mid-September 2025. General availability for all clouds will start in mid-September 2025 and should be available everywhere by the end of September 2025. If you don’t take steps to apply the policy setting, nothing changes.
Higher Cloud Usage
Microsoft says that the new policy is “part of a new set of tools for IT Administrators to move their organizations towards higher Cloud usage and Increase security and compliance.” Increasing cloud usage adds stickiness to the Microsoft cloud because the more data that users store in SharePoint Online and OneDrive for Business, the harder it is to move to any other platform.
The point about increasing security and compliance is justified by the fact that SharePoint Online and OneDrive for Business are subject to the tenant’s security and compliance policies. It’s true that cloud files are more resilient than files stored on a local drive and it is very convenient to be able to move from PC to PC while keeping files available. However, everything depends on the network and if the network’s not available or you don’t want to use a potentially insecure network like free wi-fi, losing the ability to save files to the local drive can be a real pain. I often save copies of Offices files as PDFs to share with other people, and I don’t really want those PDFs cluttering up OneDrive.
Microsoft sometimes goes overboard in its enthusiasm to save files in OneDrive, like PowerShell modules. Some might consider this step to be in that category.
What Users See
The default situation is shown in Figure 1. No policy is configured, and the user can save to SharePoint Online, OneDrive for Business, the local hard drive, and other cloud services (configured through Add a Place).

With the policy setting enabled, Office applications are limited to cloud locations to save new files or save existing files as a new file (Figure 2). Note that the “This PC” and “Browse” (for folder) options are missing.

Updating Office with the Microsoft 365 Apps Policy
Microsoft 365 tenants can apply the setting to restrict saving to the cloud via a cloud policy configured in the Microsoft 365 Apps center. Search for the Restrict saving on non-cloud locations setting and change the value from not configured to enabled (Figure 3).

After saving the policy, its settings are applied by the click to run service and the new setting should be active within a day.
Like most Office settings, the change can be made manually by updating the system registry on a PC. In this case, it seems like the setting is controlled by two settings. The first enables the cloud only save mode by creating a new DWORD value called EnableCloudOnlySaveAsMode at HKEY_CURRENT_USERSOFTWAREMicrosoftOffice16.0CommonFileIO. The second apparently removes the UI options for non-cloud locations through another DWORD value called PreferCloudSaveLocations at HKEY_CURRENT_USERSoftwareMicrosoftOffice16.0CommonGeneral. Both values are set to 1 to enable or 0 to disable. When I tested, the settings worked on one PC and not on another. It took too long to figure out that the PC where things worked ran Current Channel (Preview) while the one where the feature didn’t work ran Current Channel.
A Change That Might Annoy Some
Some will hate this change and ask what’s the point of having a local drive if it’s inaccessible. Others might not notice that all files are stored in the cloud because they do that as the norm. And some will only notice the change when they go to save a file locally. I save most of what I do with Word, Excel, and PowerPoint in the cloud, so I guess that I’m in the last category.
If I was forced to live with storing all Office files in the cloud, I could adapt my workflow without much difficulty. Until a network outage occurs…

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!
start app by doubleclicking mat-file with custom extension
An application which was greated using GUIDE can save *.mat files with a cusom extension, like *.MyExtension. What I want is, that I doubleclick in the windows explorer such a file, which will:
1. open my application (probably some settings in windows)
2. pass the file path to the application, so that the data can be loaded. Can someone help me on this?An application which was greated using GUIDE can save *.mat files with a cusom extension, like *.MyExtension. What I want is, that I doubleclick in the windows explorer such a file, which will:
1. open my application (probably some settings in windows)
2. pass the file path to the application, so that the data can be loaded. Can someone help me on this? An application which was greated using GUIDE can save *.mat files with a cusom extension, like *.MyExtension. What I want is, that I doubleclick in the windows explorer such a file, which will:
1. open my application (probably some settings in windows)
2. pass the file path to the application, so that the data can be loaded. Can someone help me on this? load file in application MATLAB Answers — New Questions
Performing 2D convolution
Hello,
I am new to image processing and had a conceptual question. I am currently trying to perform a 2D convolution of an image and a kernel (filter) in simulink using the 2D convolution block. I have code that transposes the image, then flips it, then performs the 2D convolution with the kernel. However from my (very limited) understanding convolution already flips the filter that I want to apply. I was told that the output of me transposing and flipping the image, then convolving with the kernel looks correct, however from my understanding I would be transposing and flipping the image once then convolving, which involves another flip, so therefore not actually convolving? I have read that this would just produce instead a correlation?
Hoping someone who knows more may be able to help give me a better understanding.
Thank you!Hello,
I am new to image processing and had a conceptual question. I am currently trying to perform a 2D convolution of an image and a kernel (filter) in simulink using the 2D convolution block. I have code that transposes the image, then flips it, then performs the 2D convolution with the kernel. However from my (very limited) understanding convolution already flips the filter that I want to apply. I was told that the output of me transposing and flipping the image, then convolving with the kernel looks correct, however from my understanding I would be transposing and flipping the image once then convolving, which involves another flip, so therefore not actually convolving? I have read that this would just produce instead a correlation?
Hoping someone who knows more may be able to help give me a better understanding.
Thank you! Hello,
I am new to image processing and had a conceptual question. I am currently trying to perform a 2D convolution of an image and a kernel (filter) in simulink using the 2D convolution block. I have code that transposes the image, then flips it, then performs the 2D convolution with the kernel. However from my (very limited) understanding convolution already flips the filter that I want to apply. I was told that the output of me transposing and flipping the image, then convolving with the kernel looks correct, however from my understanding I would be transposing and flipping the image once then convolving, which involves another flip, so therefore not actually convolving? I have read that this would just produce instead a correlation?
Hoping someone who knows more may be able to help give me a better understanding.
Thank you! convolution, simulink, image processing MATLAB Answers — New Questions
Problem on startup. MacMini M4, Sequoia 15.6.1
On starup I get this meggage:
Ubable yo communicate with required MathWorks services (error 201)
Any ideas?On starup I get this meggage:
Ubable yo communicate with required MathWorks services (error 201)
Any ideas? On starup I get this meggage:
Ubable yo communicate with required MathWorks services (error 201)
Any ideas? jon’s q MATLAB Answers — New Questions
Microsoft Bolts on Copilot License Check onto ExRCA
Hard to Find Logic for Copilot License Check in Exchange Connectivity Tool
Unless you’re a keen reader of the Microsoft blogs posted to the Microsoft Technical community, you might have missed the August 25 article about a new diagnostic tool for a “Copilot License Details Check.” According to the text, it’s “a powerful tool designed to streamline and validate your license readiness by confirming whether Copilot for Microsoft 365 licenses are properly assigned to users.” In reality, it’s some Graph API requests cobbled together to report details of a Microsoft 365 Copilot license assignment to a user account that’s been bolted onto the side of the Exchange Remote Connectivity Analyzer (ExRCA).
As I explain in another article, ExRCA started as a troubleshooting tool to help Exchange on-premises administrators debug connectivity problems with protocols like Autodiscover and ActiveSync (check out the YouTube video from that time). Later, Microsoft upgraded ExRCA to support Exchange Online and Teams. At this point, it’s fair to say that ExRCA is an invaluable tool for Microsoft 365 tenant administrators.
However, having a valuable support tool is no reason to bolt on a license checker. I’m sure Microsoft will point to the inclusion of the message header analyzer tool in ExRCA as evidence that ExRCA has become a toolbox, but that’s missing the point that the message header tool is at least associated with a messaging protocol (SMTP) whereas the Copilot license check is a barefaced attempt to help people use more Copilot features.
Running a Copilot License Check
Running a Copilot license check is very simple. Input the user principal name or primary SMTP address of a user account, sign in as an administrator with permissions to access user account details, and the code runs to verify that the account has a Microsoft 365 Copilot license with all its service plans intact (Figure 1).

A Simple Check
Stripping everything away, the license check is very simple and the results that it generates are equally simple (no expensive CPU cycles for AI analysis are burned here). Figure 2 shows that the user being checked is good to go. I’m sure that this is deemed to be a successful test.

But some issues exist. First, the test doesn’t distinguish between direct-assigned licenses and group-assigned licenses, which is valuable information for an administrator to know if they want to address a problem highlighted by the test. Second, the test only considers a “full” Microsoft 365 Copilot license to be valid. Trial licenses are not considered valid. Third, disabling some Copilot features is a perfectly reasonable thing to do. Not everyone needs to create new agents through Copilot Studio, for example.
PowerShell Code for the Copilot License Check
To show what the ExRCA Copilot check does, I recreated the check using the Microsoft Graph PowerShell SDK. The code is simple and took about an hour to write (including testing):
- Sign into the Graph with Connect-MgGraph using an administrator account.
- Prompt for a user account and validate that the account exists.
- Check that the account has a valid Microsoft 365 Copilot license (including trial licenses). License and service plan information is available online.
- Run the Get-MgUserLicenseDetail cmdlet to retrieve service plan information for the Copilot SKU.
- Check each of the service plans defined in the license to report if it is enabled or disabled.
Figure 3 shows some sample output.

You can download the script from the Office 365 for IT Pros GitHub repository.
No Reason to Use ExRCA to Check License Details
I don’t know how many Microsoft 365 tenant administrators will seek out ExRCA to answer questions like “I wonder if the Copilot license assigned to John Doe is good to go?” It seems like an unnatural reaction to consider ExRCA in that light when it’s straightforward to build your own tools to measure user readiness for Copilot or analyze and report licenses assigned to user accounts (including disabled service plans).
The idea might be a good one, but I fear it’s implemented in the wrong place and is too limited to deliver much value.
Need some assistance 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 am I not getting printed all zones and info from one column in my table?
Here are the steps that lead to the results:
1) You start by running app2_tester that leads to app3_tester ( for making the problem simpler, I have just made it possible choosing just one combination of salts, NaCl KCl and ZnBr2: so that I don’t need to attach many function files, though there are listed up many salts in the listbox of app3_tester.
2) Each time you have pressed the choices for every zone, you press the button “done with the zone”, for instance when you in start have chosen that there are two zones, you first begin to selecting information for zone1 then do the same for zone 2
3) When you have finished pressing info about both zones, you press “ computed water activity and osmotic pressure” in app2_tester
I have problems in app2_tester and app3_tester. The other apps and some functions that are needed to run the apps are correct. I get error in app3_tester. So what I am wondering is:
Why am I not getting the zone nr 2 writtten in my osmotic table data that is printed out when I press on the button “display results from all zones”, and neither the names of the different combinations of salts in the column called combination_of_salts in my table?
The error I get says:
Error using table (line 231)
All input variables must have the same number of rows.
Error in app3_tester/StartanalysisButtonPushed (line 259)
app.Callingapp.Osmotisk_data(app.zone_now,:) = table(app.zone_now, app.combinations_of_salts, app.vekt_prosent_best_salt_1,app.vekt_prosent_best_salt_2, app.samlet_vannaktivitet,P,effect);Here are the steps that lead to the results:
1) You start by running app2_tester that leads to app3_tester ( for making the problem simpler, I have just made it possible choosing just one combination of salts, NaCl KCl and ZnBr2: so that I don’t need to attach many function files, though there are listed up many salts in the listbox of app3_tester.
2) Each time you have pressed the choices for every zone, you press the button “done with the zone”, for instance when you in start have chosen that there are two zones, you first begin to selecting information for zone1 then do the same for zone 2
3) When you have finished pressing info about both zones, you press “ computed water activity and osmotic pressure” in app2_tester
I have problems in app2_tester and app3_tester. The other apps and some functions that are needed to run the apps are correct. I get error in app3_tester. So what I am wondering is:
Why am I not getting the zone nr 2 writtten in my osmotic table data that is printed out when I press on the button “display results from all zones”, and neither the names of the different combinations of salts in the column called combination_of_salts in my table?
The error I get says:
Error using table (line 231)
All input variables must have the same number of rows.
Error in app3_tester/StartanalysisButtonPushed (line 259)
app.Callingapp.Osmotisk_data(app.zone_now,:) = table(app.zone_now, app.combinations_of_salts, app.vekt_prosent_best_salt_1,app.vekt_prosent_best_salt_2, app.samlet_vannaktivitet,P,effect); Here are the steps that lead to the results:
1) You start by running app2_tester that leads to app3_tester ( for making the problem simpler, I have just made it possible choosing just one combination of salts, NaCl KCl and ZnBr2: so that I don’t need to attach many function files, though there are listed up many salts in the listbox of app3_tester.
2) Each time you have pressed the choices for every zone, you press the button “done with the zone”, for instance when you in start have chosen that there are two zones, you first begin to selecting information for zone1 then do the same for zone 2
3) When you have finished pressing info about both zones, you press “ computed water activity and osmotic pressure” in app2_tester
I have problems in app2_tester and app3_tester. The other apps and some functions that are needed to run the apps are correct. I get error in app3_tester. So what I am wondering is:
Why am I not getting the zone nr 2 writtten in my osmotic table data that is printed out when I press on the button “display results from all zones”, and neither the names of the different combinations of salts in the column called combination_of_salts in my table?
The error I get says:
Error using table (line 231)
All input variables must have the same number of rows.
Error in app3_tester/StartanalysisButtonPushed (line 259)
app.Callingapp.Osmotisk_data(app.zone_now,:) = table(app.zone_now, app.combinations_of_salts, app.vekt_prosent_best_salt_1,app.vekt_prosent_best_salt_2, app.samlet_vannaktivitet,P,effect); appdesigner, table MATLAB Answers — New Questions
What is the fastest way to swap large blocks of data between RAM and disk storage?
Hi all. I need to work with 4 large matrix variables repeatedly in sequence. But only one of them can fit in RAM at a time. (70 GB each, 128 GB of RAM). The operations are time-sensitive, so I need to be able to load one block of data, do some computations, release the memory, load the next block…and so on, as fast as possible. I have been looking at data store & tall arrays — I could concatenate the 4 into one tall array — but that seems intended for operations that have to span more rows than memory can hold, like taking a max across all of them. Here I just need access to one contiguous block that -will- all fit in memory, but to cycle through multiple of them. What is the preferred approach? I am using the parallel processing toolbox, but am not sure how to apply parallelization to this issue in a way that doesn’t just add more overhead. Currently I save data into uncompressed v7.3 .mat files, but I can convert to whatever helps. Thanks in advance for your insights!Hi all. I need to work with 4 large matrix variables repeatedly in sequence. But only one of them can fit in RAM at a time. (70 GB each, 128 GB of RAM). The operations are time-sensitive, so I need to be able to load one block of data, do some computations, release the memory, load the next block…and so on, as fast as possible. I have been looking at data store & tall arrays — I could concatenate the 4 into one tall array — but that seems intended for operations that have to span more rows than memory can hold, like taking a max across all of them. Here I just need access to one contiguous block that -will- all fit in memory, but to cycle through multiple of them. What is the preferred approach? I am using the parallel processing toolbox, but am not sure how to apply parallelization to this issue in a way that doesn’t just add more overhead. Currently I save data into uncompressed v7.3 .mat files, but I can convert to whatever helps. Thanks in advance for your insights! Hi all. I need to work with 4 large matrix variables repeatedly in sequence. But only one of them can fit in RAM at a time. (70 GB each, 128 GB of RAM). The operations are time-sensitive, so I need to be able to load one block of data, do some computations, release the memory, load the next block…and so on, as fast as possible. I have been looking at data store & tall arrays — I could concatenate the 4 into one tall array — but that seems intended for operations that have to span more rows than memory can hold, like taking a max across all of them. Here I just need access to one contiguous block that -will- all fit in memory, but to cycle through multiple of them. What is the preferred approach? I am using the parallel processing toolbox, but am not sure how to apply parallelization to this issue in a way that doesn’t just add more overhead. Currently I save data into uncompressed v7.3 .mat files, but I can convert to whatever helps. Thanks in advance for your insights! memory management, tall arrays MATLAB Answers — New Questions
Issues with the quality difference between plots created in live script and normal script or command window.
Hey there, recently I’ve updated from 2024b to 2025a and immediately the thing that grabbed my attention was the fact that plots created in live editor and command window are vastly different in resolution and smoothness. I’ve tried searching for people with similar experience in Matlab answers but couldn’t find anything related. Some had issues with the gpu or renderer but my problem is only happening in live editor.
Here’s a comparison between a plot created in two environments:
clear; close; clc
t = linspace(0, 2*pi, 1000);
f = 4;
y = 0.8*sin(2*pi*f*t);
figure
plot(t, y)
axis tight
Lower res from live editor:
Higher res from work space:
I’ve also attached the plots incase uploding them corrupts the quality.
Now the interesting thing is that when I open up the figure window of the same plot that I had created in live editor then suddenly the quality is high again. I tried my luck with chat gpt and grok but they were pulling their results from the same forums that I had already visited so nothing useful was found that way.Hey there, recently I’ve updated from 2024b to 2025a and immediately the thing that grabbed my attention was the fact that plots created in live editor and command window are vastly different in resolution and smoothness. I’ve tried searching for people with similar experience in Matlab answers but couldn’t find anything related. Some had issues with the gpu or renderer but my problem is only happening in live editor.
Here’s a comparison between a plot created in two environments:
clear; close; clc
t = linspace(0, 2*pi, 1000);
f = 4;
y = 0.8*sin(2*pi*f*t);
figure
plot(t, y)
axis tight
Lower res from live editor:
Higher res from work space:
I’ve also attached the plots incase uploding them corrupts the quality.
Now the interesting thing is that when I open up the figure window of the same plot that I had created in live editor then suddenly the quality is high again. I tried my luck with chat gpt and grok but they were pulling their results from the same forums that I had already visited so nothing useful was found that way. Hey there, recently I’ve updated from 2024b to 2025a and immediately the thing that grabbed my attention was the fact that plots created in live editor and command window are vastly different in resolution and smoothness. I’ve tried searching for people with similar experience in Matlab answers but couldn’t find anything related. Some had issues with the gpu or renderer but my problem is only happening in live editor.
Here’s a comparison between a plot created in two environments:
clear; close; clc
t = linspace(0, 2*pi, 1000);
f = 4;
y = 0.8*sin(2*pi*f*t);
figure
plot(t, y)
axis tight
Lower res from live editor:
Higher res from work space:
I’ve also attached the plots incase uploding them corrupts the quality.
Now the interesting thing is that when I open up the figure window of the same plot that I had created in live editor then suddenly the quality is high again. I tried my luck with chat gpt and grok but they were pulling their results from the same forums that I had already visited so nothing useful was found that way. low resolution plot, live editor MATLAB Answers — New Questions
How to force Embedded coder to use a specific struct name (instead of struct_xxxxxx) for system object parameters?
I have a custom System object that uses a configuration struct returned by a helper function:
classdef Demo_setpoint_adjuster < matlab.System
properties
config = Demo.getconfig;
end
methods
function obj = Demo_setpoint_adjuster()
% Optionally initialize config/state here if needed
end
end
methods(Access = protected)
function [adjusted_setpoint] = stepImpl(obj, setpoint)
% Default passthrough implementation
% Assign outputs
adjusted_setpoint = setpoint * obj.config.gain;
% TODO implement
end
function num = getNumInputsImpl(~), num = 1; end
function varargout = getNumOutputsImpl(~), varargout = {1, []}; end
function varargout = getOutputSizeImpl(~), varargout = {1}; end
function varargout = getOutputDataTypeImpl(~), varargout = {‘double’}; end
function varargout = isOutputComplexImpl(~), varargout = {false}; end
function varargout = isOutputFixedSizeImpl(~), varargout = {true}; end
end
end
My getconfig function looks like this:
function cfg = getconfig(varargin)
cfg = Simulink.Bus.createMATLABStruct(‘DEMO_config_def’);
cfg.gain = 10;
cfg.offset = 1e-13;
coder.cstructname(cfg, ‘my_struct’);
end % end of main function getconfig
When I generate code with Embedded coder, the header file defines the parameter type as something like:
typedef struct {
real_T gain;
real_T offset;
} struct_6h72eH5WFuEIyQr5YrdGuB;
Instead of my desired:
typedef struct {
real_T gain;
real_T offset;
} my_struct;
Even though I use coder.cstructname, Simulink still generates the anonymous struct_xxxxxx
Question:
When using a System object parameter inside a simulink model, how can i ensure embedded coder generates a struct with a specific typedef name (e.g., my_struct)? Is the recommended approach to use Simulink.Bus/Simulink.Parameter, or can coder.cstructname be applied directly in this workflow?I have a custom System object that uses a configuration struct returned by a helper function:
classdef Demo_setpoint_adjuster < matlab.System
properties
config = Demo.getconfig;
end
methods
function obj = Demo_setpoint_adjuster()
% Optionally initialize config/state here if needed
end
end
methods(Access = protected)
function [adjusted_setpoint] = stepImpl(obj, setpoint)
% Default passthrough implementation
% Assign outputs
adjusted_setpoint = setpoint * obj.config.gain;
% TODO implement
end
function num = getNumInputsImpl(~), num = 1; end
function varargout = getNumOutputsImpl(~), varargout = {1, []}; end
function varargout = getOutputSizeImpl(~), varargout = {1}; end
function varargout = getOutputDataTypeImpl(~), varargout = {‘double’}; end
function varargout = isOutputComplexImpl(~), varargout = {false}; end
function varargout = isOutputFixedSizeImpl(~), varargout = {true}; end
end
end
My getconfig function looks like this:
function cfg = getconfig(varargin)
cfg = Simulink.Bus.createMATLABStruct(‘DEMO_config_def’);
cfg.gain = 10;
cfg.offset = 1e-13;
coder.cstructname(cfg, ‘my_struct’);
end % end of main function getconfig
When I generate code with Embedded coder, the header file defines the parameter type as something like:
typedef struct {
real_T gain;
real_T offset;
} struct_6h72eH5WFuEIyQr5YrdGuB;
Instead of my desired:
typedef struct {
real_T gain;
real_T offset;
} my_struct;
Even though I use coder.cstructname, Simulink still generates the anonymous struct_xxxxxx
Question:
When using a System object parameter inside a simulink model, how can i ensure embedded coder generates a struct with a specific typedef name (e.g., my_struct)? Is the recommended approach to use Simulink.Bus/Simulink.Parameter, or can coder.cstructname be applied directly in this workflow? I have a custom System object that uses a configuration struct returned by a helper function:
classdef Demo_setpoint_adjuster < matlab.System
properties
config = Demo.getconfig;
end
methods
function obj = Demo_setpoint_adjuster()
% Optionally initialize config/state here if needed
end
end
methods(Access = protected)
function [adjusted_setpoint] = stepImpl(obj, setpoint)
% Default passthrough implementation
% Assign outputs
adjusted_setpoint = setpoint * obj.config.gain;
% TODO implement
end
function num = getNumInputsImpl(~), num = 1; end
function varargout = getNumOutputsImpl(~), varargout = {1, []}; end
function varargout = getOutputSizeImpl(~), varargout = {1}; end
function varargout = getOutputDataTypeImpl(~), varargout = {‘double’}; end
function varargout = isOutputComplexImpl(~), varargout = {false}; end
function varargout = isOutputFixedSizeImpl(~), varargout = {true}; end
end
end
My getconfig function looks like this:
function cfg = getconfig(varargin)
cfg = Simulink.Bus.createMATLABStruct(‘DEMO_config_def’);
cfg.gain = 10;
cfg.offset = 1e-13;
coder.cstructname(cfg, ‘my_struct’);
end % end of main function getconfig
When I generate code with Embedded coder, the header file defines the parameter type as something like:
typedef struct {
real_T gain;
real_T offset;
} struct_6h72eH5WFuEIyQr5YrdGuB;
Instead of my desired:
typedef struct {
real_T gain;
real_T offset;
} my_struct;
Even though I use coder.cstructname, Simulink still generates the anonymous struct_xxxxxx
Question:
When using a System object parameter inside a simulink model, how can i ensure embedded coder generates a struct with a specific typedef name (e.g., my_struct)? Is the recommended approach to use Simulink.Bus/Simulink.Parameter, or can coder.cstructname be applied directly in this workflow? embedded coder MATLAB Answers — New Questions
How do I implement a script using system objects?
Hello, I am new to Simulink so please go easy on me. I am trying to implement this particular example using system objects from the related toolboxes.
https://www.mathworks.com/help/phased/ug/integrated-sensing-and-communication-2-communication-centric-approach-using-mimo-ofdm.html
I have tried using different transmitters available but it does not seem to work. Any idea to create the Tx/Rx arras and set their locations? Thanks.Hello, I am new to Simulink so please go easy on me. I am trying to implement this particular example using system objects from the related toolboxes.
https://www.mathworks.com/help/phased/ug/integrated-sensing-and-communication-2-communication-centric-approach-using-mimo-ofdm.html
I have tried using different transmitters available but it does not seem to work. Any idea to create the Tx/Rx arras and set their locations? Thanks. Hello, I am new to Simulink so please go easy on me. I am trying to implement this particular example using system objects from the related toolboxes.
https://www.mathworks.com/help/phased/ug/integrated-sensing-and-communication-2-communication-centric-approach-using-mimo-ofdm.html
I have tried using different transmitters available but it does not seem to work. Any idea to create the Tx/Rx arras and set their locations? Thanks. simulink, phased array MATLAB Answers — New Questions
How to correctly find the solution of a system of equations containing trigonometric functions
theta=70;L=1500;h=200;D=1;
eq=[l1+l2==L;
(cosd(theta)*cosd(x1)-sind(theta)*sind(x1))/x==cosd(x1)/l2;
(cosd(theta)*cosd(x1)+sind(theta)*sind(x1))/x==cosd(x1)/l1;
tand(x1)==D/(2*f);tand(x1)==x/y;cosd(theta)==h/(y+f)];
vars=[x1,l1,l2,f,x,y];
[x1,l1,l2,f,x,y]=solve(eq,vars)
The code is as above,the solution show
l1 =
7590603.4479823424160756070250191
l2 =
-7587603.8886555868349951502850662,I think the solution is wrong,but I don’t know what is wrong,Can anyone fix this?theta=70;L=1500;h=200;D=1;
eq=[l1+l2==L;
(cosd(theta)*cosd(x1)-sind(theta)*sind(x1))/x==cosd(x1)/l2;
(cosd(theta)*cosd(x1)+sind(theta)*sind(x1))/x==cosd(x1)/l1;
tand(x1)==D/(2*f);tand(x1)==x/y;cosd(theta)==h/(y+f)];
vars=[x1,l1,l2,f,x,y];
[x1,l1,l2,f,x,y]=solve(eq,vars)
The code is as above,the solution show
l1 =
7590603.4479823424160756070250191
l2 =
-7587603.8886555868349951502850662,I think the solution is wrong,but I don’t know what is wrong,Can anyone fix this? theta=70;L=1500;h=200;D=1;
eq=[l1+l2==L;
(cosd(theta)*cosd(x1)-sind(theta)*sind(x1))/x==cosd(x1)/l2;
(cosd(theta)*cosd(x1)+sind(theta)*sind(x1))/x==cosd(x1)/l1;
tand(x1)==D/(2*f);tand(x1)==x/y;cosd(theta)==h/(y+f)];
vars=[x1,l1,l2,f,x,y];
[x1,l1,l2,f,x,y]=solve(eq,vars)
The code is as above,the solution show
l1 =
7590603.4479823424160756070250191
l2 =
-7587603.8886555868349951502850662,I think the solution is wrong,but I don’t know what is wrong,Can anyone fix this? trigonometric functions;, equations MATLAB Answers — New Questions
How to keep Host ID from changing on Linux
I am currently on a trial of matlab and my host ID changes upon completely random circumstances, I can have consequtive launches with no problem then suddenly it says my hwid is mismatched, happened once when I installed new desktop to get dark mode, then just randomly a few times. I am on Arch, what could be causing this? It’s not like it changes every other launch either
> matlab
MATLAB is selecting SOFTWARE rendering.
License checkout failed.
License Manager Error -9
Host ID ‘125e69df2eff’ in the license file does not match your computer’s host ID: "1643c734f6fd f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab
MATLAB is selecting SOFTWARE rendering.
> matlab -nosoftwareopengl
License checkout failed.
License Manager Error -9
Host ID ‘1643c734f6fd’ in the license file does not match your computer’s host ID: "2652814a85c3 f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab -nosoftwareopengl
> matlab
This is all within one single terminal session, and a few more has happened before this, what do I do?I am currently on a trial of matlab and my host ID changes upon completely random circumstances, I can have consequtive launches with no problem then suddenly it says my hwid is mismatched, happened once when I installed new desktop to get dark mode, then just randomly a few times. I am on Arch, what could be causing this? It’s not like it changes every other launch either
> matlab
MATLAB is selecting SOFTWARE rendering.
License checkout failed.
License Manager Error -9
Host ID ‘125e69df2eff’ in the license file does not match your computer’s host ID: "1643c734f6fd f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab
MATLAB is selecting SOFTWARE rendering.
> matlab -nosoftwareopengl
License checkout failed.
License Manager Error -9
Host ID ‘1643c734f6fd’ in the license file does not match your computer’s host ID: "2652814a85c3 f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab -nosoftwareopengl
> matlab
This is all within one single terminal session, and a few more has happened before this, what do I do? I am currently on a trial of matlab and my host ID changes upon completely random circumstances, I can have consequtive launches with no problem then suddenly it says my hwid is mismatched, happened once when I installed new desktop to get dark mode, then just randomly a few times. I am on Arch, what could be causing this? It’s not like it changes every other launch either
> matlab
MATLAB is selecting SOFTWARE rendering.
License checkout failed.
License Manager Error -9
Host ID ‘125e69df2eff’ in the license file does not match your computer’s host ID: "1643c734f6fd f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab
MATLAB is selecting SOFTWARE rendering.
> matlab -nosoftwareopengl
License checkout failed.
License Manager Error -9
Host ID ‘1643c734f6fd’ in the license file does not match your computer’s host ID: "2652814a85c3 f02f741d5011 f02f741d4fb4".
To resolve this issue, reactivate your license.
Troubleshoot this issue by visiting:
https://www.mathworks.com/support/lme/9
Diagnostic Information:
Feature: MATLAB
License path: /home/ciel/.matlab/R2024b_licenses:/home/ciel/MATLAB/2024B/licenses/license.dat:/home/ciel/MATLAB/2024B/licenses/trial_12942131_R2024b.lic
Licensing error: -9,57.
Unable to launch MVM server: License Error: Licensing shutdown
> ./MATLAB/2024B/bin/glnxa64/MathWorksProductAuthorizer
> matlab -nosoftwareopengl
> matlab
This is all within one single terminal session, and a few more has happened before this, what do I do? installataion, licensing, host id MATLAB Answers — New Questions
Error using Git source control with Simulink
I’m using MATLAB 2023a and Git for a Simulink Project (.prj). The project contains a "main" Simulink model that references several other models using Model Reference blocks. Most of these models also have test harnesses.
When I try to compare my model against its ancestor (or any Git revision), I get the following error pop-up:
Cannot open test harness ‘name-of-test’ as another model with the same name is currently open. Please close the other model before opening this harness
Additionaly, when comparing the "main" model, the comparison results show only changes in test harnesses but no differences in the actual model itself.
Important notes:
I am not editing the test harness
I don’t have any harness open during the comparison
Has anyone run into this behaviour? Is there a way to configure MATLAB/Simulink (or Git) to ignore test harness models during comparison so that only actual model changes are shown?I’m using MATLAB 2023a and Git for a Simulink Project (.prj). The project contains a "main" Simulink model that references several other models using Model Reference blocks. Most of these models also have test harnesses.
When I try to compare my model against its ancestor (or any Git revision), I get the following error pop-up:
Cannot open test harness ‘name-of-test’ as another model with the same name is currently open. Please close the other model before opening this harness
Additionaly, when comparing the "main" model, the comparison results show only changes in test harnesses but no differences in the actual model itself.
Important notes:
I am not editing the test harness
I don’t have any harness open during the comparison
Has anyone run into this behaviour? Is there a way to configure MATLAB/Simulink (or Git) to ignore test harness models during comparison so that only actual model changes are shown? I’m using MATLAB 2023a and Git for a Simulink Project (.prj). The project contains a "main" Simulink model that references several other models using Model Reference blocks. Most of these models also have test harnesses.
When I try to compare my model against its ancestor (or any Git revision), I get the following error pop-up:
Cannot open test harness ‘name-of-test’ as another model with the same name is currently open. Please close the other model before opening this harness
Additionaly, when comparing the "main" model, the comparison results show only changes in test harnesses but no differences in the actual model itself.
Important notes:
I am not editing the test harness
I don’t have any harness open during the comparison
Has anyone run into this behaviour? Is there a way to configure MATLAB/Simulink (or Git) to ignore test harness models during comparison so that only actual model changes are shown? test harness, git, source control MATLAB Answers — New Questions
Change color of diagonal bars (1,1), (2,2), (3,3)… in bar3
I am plotting a 2D histogram where there are 7 bars in each axis. An example of the data is attached as N.
On this plot, I would like to be able to color the diagonal bars [e.g., (1,1), (2,2) … (7,7)] green, while leaving the rest of the bars the the base color.
I’ve built the chart using:
[N, Xedges, Yedges] = histcounts2(Xvals, yVals, [7, 7]);
h = bar3(N);
And I’m trying to color the bars using something like this, but I can’t seem to figure out how to select the only the kth bar in each row:
for k = 1 : length(h) % operate on each row of bars
% Set FaceColor to ‘flat’ to use CData for coloring
h(k).FaceColor = ‘flat’;
set(h(k),’facecolor’,[0 1 0]) % green
end
Ideally, I’d like to color both the top and sides of the selected bars green.I am plotting a 2D histogram where there are 7 bars in each axis. An example of the data is attached as N.
On this plot, I would like to be able to color the diagonal bars [e.g., (1,1), (2,2) … (7,7)] green, while leaving the rest of the bars the the base color.
I’ve built the chart using:
[N, Xedges, Yedges] = histcounts2(Xvals, yVals, [7, 7]);
h = bar3(N);
And I’m trying to color the bars using something like this, but I can’t seem to figure out how to select the only the kth bar in each row:
for k = 1 : length(h) % operate on each row of bars
% Set FaceColor to ‘flat’ to use CData for coloring
h(k).FaceColor = ‘flat’;
set(h(k),’facecolor’,[0 1 0]) % green
end
Ideally, I’d like to color both the top and sides of the selected bars green. I am plotting a 2D histogram where there are 7 bars in each axis. An example of the data is attached as N.
On this plot, I would like to be able to color the diagonal bars [e.g., (1,1), (2,2) … (7,7)] green, while leaving the rest of the bars the the base color.
I’ve built the chart using:
[N, Xedges, Yedges] = histcounts2(Xvals, yVals, [7, 7]);
h = bar3(N);
And I’m trying to color the bars using something like this, but I can’t seem to figure out how to select the only the kth bar in each row:
for k = 1 : length(h) % operate on each row of bars
% Set FaceColor to ‘flat’ to use CData for coloring
h(k).FaceColor = ‘flat’;
set(h(k),’facecolor’,[0 1 0]) % green
end
Ideally, I’d like to color both the top and sides of the selected bars green. bar3, color specific bars, handles MATLAB Answers — New Questions
why exportgraphics fails to print the legend when the content type is vector and the legend is latex interpreted?
when exporting a fig as a vector, e.g. eps or pdf, if the legend is latex interpreted, the exported graphics do not show the legend. Below a snippet of my code:
% Figure
if showFig
f = figure(‘Color’,’w’);
else
f = figure(‘Visible’,’off’,’Color’,’w’);
end
hold on; grid on; box on; set(gca,’YScale’,’log’);
cols = lines(9);
% Plot ML refined (solid) and CRB/PEB (dashed, black markers)
% Case A
p1 = semilogy(x, RMSE_A, ‘-o’, ‘Color’, cols(1,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p2 = semilogy(x, PEB_A, ‘–o’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case B
p3 = semilogy(x, RMSE_B, ‘-s’, ‘Color’, cols(2,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p4 = semilogy(x, PEB_B, ‘–s’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case C
p5 = semilogy(x, RMSE_C, ‘-^’, ‘Color’, cols(3,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p6 = semilogy(x, PEB_C, ‘–^’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
semilogy(R.values, 20*ones(size(R.values)),’:r’,’LineWidth’,1.8);
xlim([min(x) max(x)])
legend([p1 p2 p3 p4 p5 p6], …
{‘ML RMSE_A’,’PEB_A’,’ML RMSE_B’,’PEB_B’,’ML RMSE_C’,’PEB_C’}, …
‘Location’,’best’,’Interpreter’,’latex’);
xlabel(xlab, ‘Interpreter’,’latex’);
ylabel(‘RMSE / PEB [mm]’, ‘Interpreter’,’latex’);
title(run_title, ‘Interpreter’,’none’);
set(gca,’TickLabelInterpreter’,’latex’,’FontSize’,18,’LineWidth’,1.2);
% EXPORT FIG
drawnow; % ensure legend is drawn
set(f, ‘Renderer’, ‘painters’); % force vector renderer
set(f, ‘PaperPositionMode’,’auto’); % match figure size
[~, base, ~] = fileparts(mat_path);
out_path = fullfile(files(i).folder, sprintf(‘%s_PEB_ML.%s’, base, fmt));
switch lower(fmt)
case ‘eps’
saveas(f,out_path,’epsc’)
case ‘pdf’
exportgraphics(gca, [out_path, ‘.pdf’], ‘ContentType’,’vector’)
case ‘png’
print(f, out_path, ‘-dpng’,’-r300′);
otherwise
warning(‘Unknown fmt: %s. Skipping save.’, fmt);
end
endwhen exporting a fig as a vector, e.g. eps or pdf, if the legend is latex interpreted, the exported graphics do not show the legend. Below a snippet of my code:
% Figure
if showFig
f = figure(‘Color’,’w’);
else
f = figure(‘Visible’,’off’,’Color’,’w’);
end
hold on; grid on; box on; set(gca,’YScale’,’log’);
cols = lines(9);
% Plot ML refined (solid) and CRB/PEB (dashed, black markers)
% Case A
p1 = semilogy(x, RMSE_A, ‘-o’, ‘Color’, cols(1,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p2 = semilogy(x, PEB_A, ‘–o’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case B
p3 = semilogy(x, RMSE_B, ‘-s’, ‘Color’, cols(2,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p4 = semilogy(x, PEB_B, ‘–s’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case C
p5 = semilogy(x, RMSE_C, ‘-^’, ‘Color’, cols(3,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p6 = semilogy(x, PEB_C, ‘–^’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
semilogy(R.values, 20*ones(size(R.values)),’:r’,’LineWidth’,1.8);
xlim([min(x) max(x)])
legend([p1 p2 p3 p4 p5 p6], …
{‘ML RMSE_A’,’PEB_A’,’ML RMSE_B’,’PEB_B’,’ML RMSE_C’,’PEB_C’}, …
‘Location’,’best’,’Interpreter’,’latex’);
xlabel(xlab, ‘Interpreter’,’latex’);
ylabel(‘RMSE / PEB [mm]’, ‘Interpreter’,’latex’);
title(run_title, ‘Interpreter’,’none’);
set(gca,’TickLabelInterpreter’,’latex’,’FontSize’,18,’LineWidth’,1.2);
% EXPORT FIG
drawnow; % ensure legend is drawn
set(f, ‘Renderer’, ‘painters’); % force vector renderer
set(f, ‘PaperPositionMode’,’auto’); % match figure size
[~, base, ~] = fileparts(mat_path);
out_path = fullfile(files(i).folder, sprintf(‘%s_PEB_ML.%s’, base, fmt));
switch lower(fmt)
case ‘eps’
saveas(f,out_path,’epsc’)
case ‘pdf’
exportgraphics(gca, [out_path, ‘.pdf’], ‘ContentType’,’vector’)
case ‘png’
print(f, out_path, ‘-dpng’,’-r300′);
otherwise
warning(‘Unknown fmt: %s. Skipping save.’, fmt);
end
end when exporting a fig as a vector, e.g. eps or pdf, if the legend is latex interpreted, the exported graphics do not show the legend. Below a snippet of my code:
% Figure
if showFig
f = figure(‘Color’,’w’);
else
f = figure(‘Visible’,’off’,’Color’,’w’);
end
hold on; grid on; box on; set(gca,’YScale’,’log’);
cols = lines(9);
% Plot ML refined (solid) and CRB/PEB (dashed, black markers)
% Case A
p1 = semilogy(x, RMSE_A, ‘-o’, ‘Color’, cols(1,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p2 = semilogy(x, PEB_A, ‘–o’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case B
p3 = semilogy(x, RMSE_B, ‘-s’, ‘Color’, cols(2,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p4 = semilogy(x, PEB_B, ‘–s’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
% Case C
p5 = semilogy(x, RMSE_C, ‘-^’, ‘Color’, cols(3,:), ‘LineWidth’, 1.8, ‘MarkerSize’, 6);
p6 = semilogy(x, PEB_C, ‘–^’, ‘Color’, [0 0 0], ‘LineWidth’, 1.3, ‘MarkerSize’, 5);
semilogy(R.values, 20*ones(size(R.values)),’:r’,’LineWidth’,1.8);
xlim([min(x) max(x)])
legend([p1 p2 p3 p4 p5 p6], …
{‘ML RMSE_A’,’PEB_A’,’ML RMSE_B’,’PEB_B’,’ML RMSE_C’,’PEB_C’}, …
‘Location’,’best’,’Interpreter’,’latex’);
xlabel(xlab, ‘Interpreter’,’latex’);
ylabel(‘RMSE / PEB [mm]’, ‘Interpreter’,’latex’);
title(run_title, ‘Interpreter’,’none’);
set(gca,’TickLabelInterpreter’,’latex’,’FontSize’,18,’LineWidth’,1.2);
% EXPORT FIG
drawnow; % ensure legend is drawn
set(f, ‘Renderer’, ‘painters’); % force vector renderer
set(f, ‘PaperPositionMode’,’auto’); % match figure size
[~, base, ~] = fileparts(mat_path);
out_path = fullfile(files(i).folder, sprintf(‘%s_PEB_ML.%s’, base, fmt));
switch lower(fmt)
case ‘eps’
saveas(f,out_path,’epsc’)
case ‘pdf’
exportgraphics(gca, [out_path, ‘.pdf’], ‘ContentType’,’vector’)
case ‘png’
print(f, out_path, ‘-dpng’,’-r300′);
otherwise
warning(‘Unknown fmt: %s. Skipping save.’, fmt);
end
end plot, exportgraphics MATLAB Answers — New Questions
I have a code but am unable to use if conditions with matrix value
My code required a condition for avoiding if 0 value read from text and continue to verify the next valueMy code required a condition for avoiding if 0 value read from text and continue to verify the next value My code required a condition for avoiding if 0 value read from text and continue to verify the next value if statement, continue MATLAB Answers — New Questions
Supressing Live Script plotting figure inline
I am plotting a figure from a Live Script using the
set(gcf, ‘Visible’, ‘on’);
option to make it appear in a separate, external window.
However, a copy of the figure still appears inline the Live Script and I could not find a way to avoid it.
The figure should only appear externally (i.e. in a separate window, which it already does), and not get created inline too.I am plotting a figure from a Live Script using the
set(gcf, ‘Visible’, ‘on’);
option to make it appear in a separate, external window.
However, a copy of the figure still appears inline the Live Script and I could not find a way to avoid it.
The figure should only appear externally (i.e. in a separate window, which it already does), and not get created inline too. I am plotting a figure from a Live Script using the
set(gcf, ‘Visible’, ‘on’);
option to make it appear in a separate, external window.
However, a copy of the figure still appears inline the Live Script and I could not find a way to avoid it.
The figure should only appear externally (i.e. in a separate window, which it already does), and not get created inline too. live script, figure, plot, window MATLAB Answers — New Questions
How to Update Entra ID Apps to Run Teams Cmdlets
Find and Update Apps to Run Teams PowerShell
When message center notification MC1134747 first appeared on 13 August 2025, a slew of poorly-grounded commentary ensued. Microsoft updated the content on 2 September 2025, and hopefully the same kind of overreaction won’t happen again.
The post describes a new authentication requirement for Entra ID apps that use the Teams PowerShell module to run Teams cmdlets without the presence of a signed-in user. For example, a tenant might have an Azure Automation runbook that uses cmdlets from the Teams PowerShell modules to process actions such as reporting team structures (channels, apps, etc.) and membership.
I’m sure that most of the previous fuss and bother was generated because Microsoft labelled this change as an important security and authentication update. In reality, the change is only important if a tenant has apps that call the Teams PowerShell module to interact with Teams.
Authentication is involved because the apps now two additional Graph application permissions. The RoleManagement.Read.Directory permission is used to validate if the app can read information about Entra administrative units, and the GroupMember.Read.All permission is needed to read group membership if the app calls the Group Policy Assignment and Group Policy Package Assignment cmdlets.
Respecting the boundaries of Entra administrative units is important and justifies the statement that this change strengthens security. You don’t want unauthorized apps to read information about teams governed by administrative units.
It doesn’t take much to add these permissions to an Entra ID app and any tenant affected by the update should find that it takes little time to address the problem.
Finding Entra ID Apps that Use the Teams PowerShell Module
The first step is to discover if any Entra ID apps are in the tenant that use the Teams PowerShell module. One way to check is to find which apps have been assigned the Teams service administrator role. Apps don’t need the Teams administrator role unless they’re going to sign into Teams in app-only mode to run Teams cmdlets, so the presence of the role assignment for an app is a good litmus test.
With a good repository of PowerShell scripts for Microsoft 365 to call upon, we can steal some code from the script used in the article describing how to report PIM role assignments and repurpose it as follows:
$TeamsAdminRole = Get-MgDirectoryRoleTemplate | Where-Object {$_.displayName -eq "Teams administrator"} | Select-Object -ExpandProperty Id [array]$ActiveAssignments = Get-MgBetaRoleManagementDirectoryRoleAssignmentSchedule -Filter "(RoleDefinitionId eq '$($TeamsAdminRole)')" -ExpandProperty RoleDefinition, Principal, DirectoryScope -All $Report = [System.Collections.Generic.List[Object]]::new() ForEach ($Member in $ActiveAssignments.Principal.Id) { $SP = Get-MgServicePrincipal -ServicePrincipalId $Member -ErrorAction SilentlyContinue -Property Id, displayName, AppId, ServicePrincipalType, Owners If ($SP) { $ReportLine = [PSCustomObject]@{ SPIdentifier = $SP.Id Name = $SP.DisplayName AppId = $SP.AppId Type = $SP.ServicePrincipalType } $Report.Add($ReportLine) } # End if }
The output looks like Figure 1. It’s raw, but it’s enough to advise which apps need attention.

Reporting Holders of The Teams Administrator Role
Proving that there’s usually many ways to do something in PowerShell, this code reports all the holders of the Teams administrator role, including users, groups, and service principals (apps or managed identities).
$Report = [System.Collections.Generic.List[Object]]::new() Get-MgRoleManagementDirectoryRoleAssignment -Filter "roleDefinitionId eq '$($TeamsAdminRole)'" | ForEach-Object { $Principal = Get-MgDirectoryObject -DirectoryObjectId $_.PrincipalId Switch ($Principal.AdditionalProperties.'@odata.type') { "#microsoft.graph.user" { $ObjectType = "User account" } "#microsoft.graph.group" { $ObjectType = "Group" } "#microsoft.graph.servicePrincipal" { $ObjectType = "App or managed identity" } } $ReportLine = [PSCustomObject]@{ PrincipalName = $Principal.AdditionalProperties.displayName PrincipalType = $ObjectType Scope = $_.DirectoryScopeId Id = $_.PrincipalId RoleAssignmentId = $_.Id } $Report.Add($ReportLine) }
Updating Entra ID Apps with the Permissions Needed to Run Teams Cmdlets
The point is that there’s no problem discovering what apps need to be updated, and if you want to use PowerShell to add the missing permissions, that’s easily done too. First, extract the list of service principal identifiers from the report:
[array]$Apps = $Report | Where-Object {$_.PrincipalType -eq 'App or Managed Identity'} | Select-Object -ExpandProperty Id
Now loop through the identifiers to assign the permissions now required to run Teams PowerShell cmdlets:
[array]$Permissions = "RoleManagement.Read.Directory", "GroupMember.Read.All" # Get Graph app details $GraphApp = Get-MgServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" # Loop through each app and assign the permissions to the app ForEach ($App in $Apps) { # Loop through each permission and assign it to the target ForEach ($Permission in $Permissions) { $Role = $GraphApp.AppRoles | Where-Object {$_.Value -eq $Permission} $AppRoleAssignment = @{} $AppRoleAssignment.Add("PrincipalId",$App) $AppRoleAssignment.Add("ResourceId",$GraphApp.Id) $AppRoleAssignment.Add("AppRoleId", $Role.Id) # Assign Graph permission Try { New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $App -BodyParameter $AppRoleAssignment -ErrorAction Stop } Catch { Write-Host ("Unable to assign {0} permission to service principal {1}" -f $Permission, $App) } } }
No bother, no fuss, just some extra permissions assigned to Entra ID apps that need to run cmdlets from the Microsoft Teams PowerShell module.
Need some assistance 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.
tf2sos input argument
I have a question about the input argument to the method tf2sos.
The documentation says it takes the coefficients as vectors of the transfer function
.
I suspect that what is actually meant is that it takes as vectors of the transfer function
.
I have tried the following code, but I can not make sense of it.
clear all;
close all;
ts = 1/10000;
z = tf(‘z’, ts);
b0 = 1;
b1 = 2;
b2 = 3;
a0 = 1;
a1 = -2;
a2 = 5;
H = tf([b2, b1, b0], [a2, a1, a0], ts);
Hi = (b0 + b1*z^-1 + b2*z^-2)/(a0 + a1*z^-1 + a2*z^-2);
[sos_H,g_H] = tf2sos(H.Numerator{1}, H.Denominator{1});
[sos_Hi,g_Hi] = tf2sos(Hi.Numerator{1}, Hi.Denominator{1});
K_H = g_H*(sos_H(1,1) + sos_H(1,2)*z^-1 + sos_H(1,3)*z^-2)/(sos_H(1,4) + sos_H(1,5)*z^-1 + sos_H(1,6)*z^-2);
K_Hi = g_Hi*(sos_Hi(1,1) + sos_Hi(1,2)*z^-1 + sos_Hi(1,3)*z^-2)/(sos_Hi(1,4) + sos_Hi(1,5)*z^-1 + sos_Hi(1,6)*z^-2);
figure()
hold on
step(H);
step(K_H, ‘–‘);
legend();
grid();
figure()
hold on;
step(Hi);
step(K_Hi, ‘–‘);
legend();
grid();
What am I doing wrong?I have a question about the input argument to the method tf2sos.
The documentation says it takes the coefficients as vectors of the transfer function
.
I suspect that what is actually meant is that it takes as vectors of the transfer function
.
I have tried the following code, but I can not make sense of it.
clear all;
close all;
ts = 1/10000;
z = tf(‘z’, ts);
b0 = 1;
b1 = 2;
b2 = 3;
a0 = 1;
a1 = -2;
a2 = 5;
H = tf([b2, b1, b0], [a2, a1, a0], ts);
Hi = (b0 + b1*z^-1 + b2*z^-2)/(a0 + a1*z^-1 + a2*z^-2);
[sos_H,g_H] = tf2sos(H.Numerator{1}, H.Denominator{1});
[sos_Hi,g_Hi] = tf2sos(Hi.Numerator{1}, Hi.Denominator{1});
K_H = g_H*(sos_H(1,1) + sos_H(1,2)*z^-1 + sos_H(1,3)*z^-2)/(sos_H(1,4) + sos_H(1,5)*z^-1 + sos_H(1,6)*z^-2);
K_Hi = g_Hi*(sos_Hi(1,1) + sos_Hi(1,2)*z^-1 + sos_Hi(1,3)*z^-2)/(sos_Hi(1,4) + sos_Hi(1,5)*z^-1 + sos_Hi(1,6)*z^-2);
figure()
hold on
step(H);
step(K_H, ‘–‘);
legend();
grid();
figure()
hold on;
step(Hi);
step(K_Hi, ‘–‘);
legend();
grid();
What am I doing wrong? I have a question about the input argument to the method tf2sos.
The documentation says it takes the coefficients as vectors of the transfer function
.
I suspect that what is actually meant is that it takes as vectors of the transfer function
.
I have tried the following code, but I can not make sense of it.
clear all;
close all;
ts = 1/10000;
z = tf(‘z’, ts);
b0 = 1;
b1 = 2;
b2 = 3;
a0 = 1;
a1 = -2;
a2 = 5;
H = tf([b2, b1, b0], [a2, a1, a0], ts);
Hi = (b0 + b1*z^-1 + b2*z^-2)/(a0 + a1*z^-1 + a2*z^-2);
[sos_H,g_H] = tf2sos(H.Numerator{1}, H.Denominator{1});
[sos_Hi,g_Hi] = tf2sos(Hi.Numerator{1}, Hi.Denominator{1});
K_H = g_H*(sos_H(1,1) + sos_H(1,2)*z^-1 + sos_H(1,3)*z^-2)/(sos_H(1,4) + sos_H(1,5)*z^-1 + sos_H(1,6)*z^-2);
K_Hi = g_Hi*(sos_Hi(1,1) + sos_Hi(1,2)*z^-1 + sos_Hi(1,3)*z^-2)/(sos_Hi(1,4) + sos_Hi(1,5)*z^-1 + sos_Hi(1,6)*z^-2);
figure()
hold on
step(H);
step(K_H, ‘–‘);
legend();
grid();
figure()
hold on;
step(Hi);
step(K_Hi, ‘–‘);
legend();
grid();
What am I doing wrong? tf2sos, tf, second order sections MATLAB Answers — New Questions
Help needed with simulink onramp Discrete systems
This is task 4 in Discrete systems and I have already enabled the scope on the legend, and still it’s showing legend not enabled. It’s the same every time I try and I have attempted this twice already. What is wrong?
It is the same in a few other tasks that require legend to be enabled as well. I am unable to submit them even if the legend is clearly enabled.This is task 4 in Discrete systems and I have already enabled the scope on the legend, and still it’s showing legend not enabled. It’s the same every time I try and I have attempted this twice already. What is wrong?
It is the same in a few other tasks that require legend to be enabled as well. I am unable to submit them even if the legend is clearly enabled. This is task 4 in Discrete systems and I have already enabled the scope on the legend, and still it’s showing legend not enabled. It’s the same every time I try and I have attempted this twice already. What is wrong?
It is the same in a few other tasks that require legend to be enabled as well. I am unable to submit them even if the legend is clearly enabled. graph, scope, simulink MATLAB Answers — New Questions