Month: April 2026
How do I create a protected model with hidden variables with a mask that provides additional variables?
How do I create a protected model with hidden variables with a mask that provides additional variables? I want to hide the variables I provide to Simulink that would otherwise appear in the base (MATLAB) workspace.How do I create a protected model with hidden variables with a mask that provides additional variables? I want to hide the variables I provide to Simulink that would otherwise appear in the base (MATLAB) workspace. How do I create a protected model with hidden variables with a mask that provides additional variables? I want to hide the variables I provide to Simulink that would otherwise appear in the base (MATLAB) workspace. parameters, mask, modelreference, protected MATLAB Answers — New Questions
Why does backslash behave differently when transposition is used in-line?
Hello, in the process of creating a problem for my students in a numerical methods class I found out that the backslash operation produces different results if you solve A^{T}x=b as "x=(A’)b" when compared to first defining "AT=A’" and then solving as "x=ATb". An example is given below. Order of operations suggests that in the first case, A should be transposed and then the backslash operation performed, which is forced in the second case. One would expect the results to then be the same. Why is there a difference at all?
n = 15;
m = 2*n+1;
t = fliplr(cos(pi/(n)*(0:n))).’;
A = [t.^(0:m);
t.^([0,0:m-1])*diag(max(0,0:m))];
b = (1./((0:m)’+1).*((1).^((0:m)’+1)-(-1).^(((0:m)’+1))));
x = (A’)b;
AT = A’;
x2 = ATb;
difference = norm(x-x2)Hello, in the process of creating a problem for my students in a numerical methods class I found out that the backslash operation produces different results if you solve A^{T}x=b as "x=(A’)b" when compared to first defining "AT=A’" and then solving as "x=ATb". An example is given below. Order of operations suggests that in the first case, A should be transposed and then the backslash operation performed, which is forced in the second case. One would expect the results to then be the same. Why is there a difference at all?
n = 15;
m = 2*n+1;
t = fliplr(cos(pi/(n)*(0:n))).’;
A = [t.^(0:m);
t.^([0,0:m-1])*diag(max(0,0:m))];
b = (1./((0:m)’+1).*((1).^((0:m)’+1)-(-1).^(((0:m)’+1))));
x = (A’)b;
AT = A’;
x2 = ATb;
difference = norm(x-x2) Hello, in the process of creating a problem for my students in a numerical methods class I found out that the backslash operation produces different results if you solve A^{T}x=b as "x=(A’)b" when compared to first defining "AT=A’" and then solving as "x=ATb". An example is given below. Order of operations suggests that in the first case, A should be transposed and then the backslash operation performed, which is forced in the second case. One would expect the results to then be the same. Why is there a difference at all?
n = 15;
m = 2*n+1;
t = fliplr(cos(pi/(n)*(0:n))).’;
A = [t.^(0:m);
t.^([0,0:m-1])*diag(max(0,0:m))];
b = (1./((0:m)’+1).*((1).^((0:m)’+1)-(-1).^(((0:m)’+1))));
x = (A’)b;
AT = A’;
x2 = ATb;
difference = norm(x-x2) backslash, transpose MATLAB Answers — New Questions
Phase unwrapping in 2D
I need to perform phase unwrapping in 2D using MATLAB, but the unwrap function seems to work only in 1D.
I want to have a routine similar to this one, available in a Python library:
http://scikit-image.org/docs/dev/auto_examples/filters/plot_phase_unwrap.html
Any suggestions?I need to perform phase unwrapping in 2D using MATLAB, but the unwrap function seems to work only in 1D.
I want to have a routine similar to this one, available in a Python library:
http://scikit-image.org/docs/dev/auto_examples/filters/plot_phase_unwrap.html
Any suggestions? I need to perform phase unwrapping in 2D using MATLAB, but the unwrap function seems to work only in 1D.
I want to have a routine similar to this one, available in a Python library:
http://scikit-image.org/docs/dev/auto_examples/filters/plot_phase_unwrap.html
Any suggestions? matlab, image analysis, signal processing MATLAB Answers — New Questions
Improving How Outlook Classic Handles Reactions
Reactions For All Types of Microsoft 365 Messages
The announcement about “Improved handling of disallowed and failed email reactions” for Outlook (MC1261593, 25 March 2026, Microsoft 365 roadmap item 558442) got me thinking about how reactions are transmitted and stored by Exchange Online.
Outlook reactions have been around since October 2022. Essentially, instead of responding to a message with another message (the reply), people can respond by selecting an appropriate emoji from a set chosen by Microsoft. You cannot add custom emojis. Figure 1 shows the UI from Outlook classic.

Viva Engage also supports reactions for its conversations, as does Teams, which allows users to select from any of the hundreds of emojis available in a tenant, including custom emojis. Teams even logs a special audit event when people use reactions, which means that it’s possible to report who uses emojis in responses.
Because they are properties of chat and channel messages, Teams also supports reactions via the Graph API. However, reactions are implemented as MAPI properties called MAPIReactionsBlob and ReactionsSummary stored in messages. These properties are not surfaced through the Graph API, which makes it harder to generate reports about the usage of reactions in Outlook.
Suppressing Outlook Reactions with a Transport Rule
Anyway, Exchange Online doesn’t engage in such frippery as customizable emojis for reactions, possibly because reactions can travel outside the tenant and you wouldn’t want custom emojis being shared far and wide. Expressing emotions just six ways is sufficient to convey a response in email. Unless of course you don’t want users to use reactions.
In this scenario, you should follow create a transport rule (mail flow rule) to suppress reactions. The rule sets a “x-ms-reactions” header in email to “disallow.” A transport rule like this does the job:
New-TransportRule –Name "Suppress Outlook Reactions" –Enabled $True –SetHeaderName "x-ms-reactions" -SetHeaderValue "disallow" -FromScope InOrganization –SentToScope InOrganization
The great benefit of transport rules is that Exchange Online runs the rules as messages pass through the transport pipeline en route to recipients. If a rule says that something should be done, it will be. Transport rules are a very effective choke point. In this case, the rule inserts the x-header into any message that it processes (different criteria can be applied to dictate which messages are processed). When Outlook clients display a message with the x-header, the clients should grey out the UI that allows users to respond with reactions. No UI, no responses.
Making Outlook Classic Behave
MC1261593 tell us that Outlook classic has not supported the x-header, which is why an update is needed. Figure 2 shows a message delivered to Outlook classic with the x-header set. The user can still respond with a reaction. For messages sent from the same tenant, people who use other Outlook clients like OWA or the New Outlook won’t see any reactions that are sent for their messages because of the x-header.

According to the notification, Microsoft will release an update in public preview to stop Outlook classic ignoring the x-header in early May 2026. Assuming that nothing problematic is discovered, Microsoft will proceed to update all tenants, including GCC, GCC-High, and DoD in June 2026.
All Change In June
Although my go-to client remains Outlook classic, I must admit that I don’t use reactions to respond to email and would therefore probably not notice that Outlook classic behaves differently to the other clients. After June that won’t be the case and if you’ve implemented a transport rule to insert the x-header to suppress reactions, people who use Outlook clients might notice a change in behavior. Then again, they might not. Or might not care.
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
Input and output process data at different rate. How to match them.
My input sends data at 100ms and output receives at 1s. how do i create a system that collects 10 intevals of data and send it to output after 1 second. I dont want to use rate transition block. I want to use basic blocks. Can someone help me with answer?My input sends data at 100ms and output receives at 1s. how do i create a system that collects 10 intevals of data and send it to output after 1 second. I dont want to use rate transition block. I want to use basic blocks. Can someone help me with answer? My input sends data at 100ms and output receives at 1s. how do i create a system that collects 10 intevals of data and send it to output after 1 second. I dont want to use rate transition block. I want to use basic blocks. Can someone help me with answer? rate transition without using rate transition bloc MATLAB Answers — New Questions
Issue running HIL converting “Design a Guidance System in MATLAB and Simulink” guidance stateflow into HDL using HDL Coder
After set all the data into int16, by using HDL coder advisor i got this error message:
"Error:Error: HDL code generation from Stateflow failed: Entry event for state ‘Target_Search’ implied in ‘aero_guidance_model/Guidance/subsystem/Guidance Processor’. This is not allowed for an HDL target.
HDL code generation failed for ‘Guidance/subsystem/Guidance Processor’ (#59). Consult the Diagnostic Viewer for additional information."
Is it possible to convert the stateflow inside guidance subsystem into HDL for running hardware in the loop? Needing advice to call a stop or continue if its possible.
Example can be obtained https://www.mathworks.com/help/simulink/slref/designing-a-guidance-system-in-matlab-and-simulink.htmlAfter set all the data into int16, by using HDL coder advisor i got this error message:
"Error:Error: HDL code generation from Stateflow failed: Entry event for state ‘Target_Search’ implied in ‘aero_guidance_model/Guidance/subsystem/Guidance Processor’. This is not allowed for an HDL target.
HDL code generation failed for ‘Guidance/subsystem/Guidance Processor’ (#59). Consult the Diagnostic Viewer for additional information."
Is it possible to convert the stateflow inside guidance subsystem into HDL for running hardware in the loop? Needing advice to call a stop or continue if its possible.
Example can be obtained https://www.mathworks.com/help/simulink/slref/designing-a-guidance-system-in-matlab-and-simulink.html After set all the data into int16, by using HDL coder advisor i got this error message:
"Error:Error: HDL code generation from Stateflow failed: Entry event for state ‘Target_Search’ implied in ‘aero_guidance_model/Guidance/subsystem/Guidance Processor’. This is not allowed for an HDL target.
HDL code generation failed for ‘Guidance/subsystem/Guidance Processor’ (#59). Consult the Diagnostic Viewer for additional information."
Is it possible to convert the stateflow inside guidance subsystem into HDL for running hardware in the loop? Needing advice to call a stop or continue if its possible.
Example can be obtained https://www.mathworks.com/help/simulink/slref/designing-a-guidance-system-in-matlab-and-simulink.html hdl coder, hardware-in-the-loop MATLAB Answers — New Questions
BodePlot: Plotting straight lines on the Mag and Phase plots. Can access the phase plot, to do so, but not the mag plot
Hi there
I was customising the standard MATLAB Bode plot to make the gridlines, major and minor bold,
change the x and y label size and bold them and also customise the axis.
Then I tried to plot the straight line approximation, but I can only seem to access the phase plot, and not the magnitude plot.
For the two axes, ax(1) and ax(2), I have called them mag_ax and phase_ax.
I can access the other properties fine, but when I tries to add the lines, my code doesn’t recognise the mag_ax.
Any advice greatly appreciated
close all
s = tf(‘s’);
G_1 = tf(1/(0.1*s + 1));
figure(‘WindowState’,’maximized’);
gg = bodeplot(G_1);
title(‘Bode plot of $frac{1}{0.1s+1}$’,…
‘Interpreter’,’latex’,’FontSize’,18,’FontWeight’,’bold’);
gg.Responses.Color = "blue";
gg.Responses.LineWidth = 2;
gg.XLabel.FontWeight = "bold";
% Get the handles of the axes
ax = findobj(gcf,’type’,’axes’);
mag_ax = ax(1);
phase_ax = ax(2);
mag_ax.XLim = [0.1 1000];
mag_ax.YLim= [-60 +60];
phase_ax.XLim = [0.1 1000];
phase_ax.YLim= [-90 +90];
phase_ax.YTick = (-90:45:90);
grid on
grid minor
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.MinorGridLineStyle = ‘-‘;
mag_ax.MinorGridLineStyle = ‘-‘;
phase_ax.MinorGridLineWidth = 0.75;
mag_ax.MinorGridLineWidth = 0.75;
phase_ax.MinorGridAlpha = 0.5;
mag_ax.MinorGridAlpha = 0.5;
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.GridAlpha = 1;
mag_ax.GridAlpha = 1;
mag_ax.YLabel.FontWeight = "bold";
mag_ax.YLabel.FontSize = 12;
phase_ax.YLabel.FontWeight = "bold";
phase_ax.YLabel.FontSize = 12;
for k = 1:length(phase_ax)
xticks(phase_ax(k), [0.1 1 10 100 1000]); % Set desired tick positions
end
for k = 1:length(phase_ax)
phase_ax(k).XTickLabel = arrayfun(@(x) sprintf(‘%.1f’, x), phase_ax(k).XTick, ‘UniformOutput’, false);
end
set(phase_ax,’fontweight’,’bold’)
set(mag_ax,’fontweight’,’bold’)
gg.Responses.Visible = ‘on’;
gg.Responses.Color = ‘blue’;
mag_ax.NextPlot = ‘add’;
line([0.1 10.0],[0 0],’linewidth’,2,’color’,’red’);
line([10.0 1000],[0 -40],’linewidth’,2,’color’,’red’);
phase_ax.NextPlot = ‘add’;
line([0.1 1.0],[0 0],’linewidth’,2,’color’,’red’);
line([1.0 100],[0 -90],’linewidth’,2,’color’,’red’);
line([100 1000],[-90 -90],’linewidth’,2,’color’,’red’);Hi there
I was customising the standard MATLAB Bode plot to make the gridlines, major and minor bold,
change the x and y label size and bold them and also customise the axis.
Then I tried to plot the straight line approximation, but I can only seem to access the phase plot, and not the magnitude plot.
For the two axes, ax(1) and ax(2), I have called them mag_ax and phase_ax.
I can access the other properties fine, but when I tries to add the lines, my code doesn’t recognise the mag_ax.
Any advice greatly appreciated
close all
s = tf(‘s’);
G_1 = tf(1/(0.1*s + 1));
figure(‘WindowState’,’maximized’);
gg = bodeplot(G_1);
title(‘Bode plot of $frac{1}{0.1s+1}$’,…
‘Interpreter’,’latex’,’FontSize’,18,’FontWeight’,’bold’);
gg.Responses.Color = "blue";
gg.Responses.LineWidth = 2;
gg.XLabel.FontWeight = "bold";
% Get the handles of the axes
ax = findobj(gcf,’type’,’axes’);
mag_ax = ax(1);
phase_ax = ax(2);
mag_ax.XLim = [0.1 1000];
mag_ax.YLim= [-60 +60];
phase_ax.XLim = [0.1 1000];
phase_ax.YLim= [-90 +90];
phase_ax.YTick = (-90:45:90);
grid on
grid minor
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.MinorGridLineStyle = ‘-‘;
mag_ax.MinorGridLineStyle = ‘-‘;
phase_ax.MinorGridLineWidth = 0.75;
mag_ax.MinorGridLineWidth = 0.75;
phase_ax.MinorGridAlpha = 0.5;
mag_ax.MinorGridAlpha = 0.5;
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.GridAlpha = 1;
mag_ax.GridAlpha = 1;
mag_ax.YLabel.FontWeight = "bold";
mag_ax.YLabel.FontSize = 12;
phase_ax.YLabel.FontWeight = "bold";
phase_ax.YLabel.FontSize = 12;
for k = 1:length(phase_ax)
xticks(phase_ax(k), [0.1 1 10 100 1000]); % Set desired tick positions
end
for k = 1:length(phase_ax)
phase_ax(k).XTickLabel = arrayfun(@(x) sprintf(‘%.1f’, x), phase_ax(k).XTick, ‘UniformOutput’, false);
end
set(phase_ax,’fontweight’,’bold’)
set(mag_ax,’fontweight’,’bold’)
gg.Responses.Visible = ‘on’;
gg.Responses.Color = ‘blue’;
mag_ax.NextPlot = ‘add’;
line([0.1 10.0],[0 0],’linewidth’,2,’color’,’red’);
line([10.0 1000],[0 -40],’linewidth’,2,’color’,’red’);
phase_ax.NextPlot = ‘add’;
line([0.1 1.0],[0 0],’linewidth’,2,’color’,’red’);
line([1.0 100],[0 -90],’linewidth’,2,’color’,’red’);
line([100 1000],[-90 -90],’linewidth’,2,’color’,’red’); Hi there
I was customising the standard MATLAB Bode plot to make the gridlines, major and minor bold,
change the x and y label size and bold them and also customise the axis.
Then I tried to plot the straight line approximation, but I can only seem to access the phase plot, and not the magnitude plot.
For the two axes, ax(1) and ax(2), I have called them mag_ax and phase_ax.
I can access the other properties fine, but when I tries to add the lines, my code doesn’t recognise the mag_ax.
Any advice greatly appreciated
close all
s = tf(‘s’);
G_1 = tf(1/(0.1*s + 1));
figure(‘WindowState’,’maximized’);
gg = bodeplot(G_1);
title(‘Bode plot of $frac{1}{0.1s+1}$’,…
‘Interpreter’,’latex’,’FontSize’,18,’FontWeight’,’bold’);
gg.Responses.Color = "blue";
gg.Responses.LineWidth = 2;
gg.XLabel.FontWeight = "bold";
% Get the handles of the axes
ax = findobj(gcf,’type’,’axes’);
mag_ax = ax(1);
phase_ax = ax(2);
mag_ax.XLim = [0.1 1000];
mag_ax.YLim= [-60 +60];
phase_ax.XLim = [0.1 1000];
phase_ax.YLim= [-90 +90];
phase_ax.YTick = (-90:45:90);
grid on
grid minor
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.MinorGridLineStyle = ‘-‘;
mag_ax.MinorGridLineStyle = ‘-‘;
phase_ax.MinorGridLineWidth = 0.75;
mag_ax.MinorGridLineWidth = 0.75;
phase_ax.MinorGridAlpha = 0.5;
mag_ax.MinorGridAlpha = 0.5;
phase_ax.GridLineWidth = 1;
mag_ax.GridLineWidth = 1;
phase_ax.GridAlpha = 1;
mag_ax.GridAlpha = 1;
mag_ax.YLabel.FontWeight = "bold";
mag_ax.YLabel.FontSize = 12;
phase_ax.YLabel.FontWeight = "bold";
phase_ax.YLabel.FontSize = 12;
for k = 1:length(phase_ax)
xticks(phase_ax(k), [0.1 1 10 100 1000]); % Set desired tick positions
end
for k = 1:length(phase_ax)
phase_ax(k).XTickLabel = arrayfun(@(x) sprintf(‘%.1f’, x), phase_ax(k).XTick, ‘UniformOutput’, false);
end
set(phase_ax,’fontweight’,’bold’)
set(mag_ax,’fontweight’,’bold’)
gg.Responses.Visible = ‘on’;
gg.Responses.Color = ‘blue’;
mag_ax.NextPlot = ‘add’;
line([0.1 10.0],[0 0],’linewidth’,2,’color’,’red’);
line([10.0 1000],[0 -40],’linewidth’,2,’color’,’red’);
phase_ax.NextPlot = ‘add’;
line([0.1 1.0],[0 0],’linewidth’,2,’color’,’red’);
line([1.0 100],[0 -90],’linewidth’,2,’color’,’red’);
line([100 1000],[-90 -90],’linewidth’,2,’color’,’red’); bodeplot, matlab MATLAB Answers — New Questions
DLP Extends Its Ability to Control Copilot Processing
New DLP Policy for Copilot Action to Block Processing Web Searches
Recently, there’s been a spate of developments to bring Microsoft 365 content into OpenAI and Anthrophic for processing by external AI models. Microsoft is in a bit of a quandary when it comes to competing with OpenAI and Anthrophic. Microsoft badly wants to sell more Microsoft 365 Copilot licenses. At the same time, Microsoft 365 Copilot is dependent on OpenAI and Anthrophic models, so Microsoft can’t criticize the AI technology from its partners.
What Microsoft can do is emphasize the value of deep integration between Copilot and the Microsoft 365 apps, as evident in its comparison between Microsoft 365 Copilot and ChatGPT Enterprise with the tagline “Not all AI is built for work.”
DLP Policy for Copilot
Surprisingly, Purview Data Loss Prevention (DLP) doesn’t feature in the comparison. However, a DLP policy for Copilot has been available since March 2025 and it’s one of the most valuable pieces of the Copilot ecosystem because it blocks Copilot and Copilot agents from processing files protected by specific sensitivity labels.
I guess you could argue that the OpenAI connectors or Anthrophic’s Connector for Claude don’t need DLP to do any blocking for them because neither integration can open Office or PDF files protected by sensitivity labels with encryption because the external programs cannot authenticate to gain access to the protected content. That’s stretching a deficiency to become a strength in a way that doesn’t hold water.
DLP Policy to Protect Sensitive Copilot Interactions
In any case, DLP comes with a default policy called “Default DLP policy – Protect sensitive M365 Copilot interactions” introduced in late 2025 to control the use of sensitive information types in Copilot prompts. The policy comes preconfigured to protect many different sensitive information types from an ABA routing number to a U.S. social security number (Figure 1).

Before putting the policy to use, it’s a good idea to remove sensitive information types that don’t make sense for your organization or maybe add some that are missing from the default set. You should also turn on incident reports so that administrators become aware of attempts to use sensitive information types in Copilot prompts and switch the mode from simulation to “On.”
Once enabled, DLP will detect attempts to use the sensitive information types specified in the policy in Copilot prompts. Users will be told that the organization has blocked Copilot from responding to some types of content and Copilot will do nothing further to process the prompt.
Extending DLP Policy for Copilot Actions to Block Web Searches
Originally, the DLP policy to protect sensitive Copilot interactions had just one action – to block prompts as described above. MC1263277 (27 March 2026, Microsoft 365 roadmap 548671) describes a new action that’s available in preview and due to roll out in general availability in June 2026. The new action blocks Copilot from performing web searches to ground prompts.
Microsoft 365 Copilot can consult both internal and external sources to ground prompts before it generates responses. External sources are consulting by running Bing searches to find relevant web content. The new action allows Copilot to continue process user prompts against Microsoft 365 content (if the user has a Microsoft 365 Copilot license) while stopping Copilot from sending potentially sensitive data to Bing to perform a search.
A DLP policy created for the special Copilot location can only choose one of the available actions for restricting Copilot from processing content (Figure 2). Apart from that, everything works just like for other DLP policies.

Overall, this is a nice change that demonstrates the value of working within an integrated ecosystem. I’m not saying that the OpenAI and Anthrophic connectors for Microsoft 365 are not valuable because that’s obviously not the case. However, organizations that value aspects like compliance and data governance will consider that being to exert control through mechanisms like DLP is very valuable. Isn’t choice wonderful?
Learn how to use Purview DLP and to exploit the data available to Microsoft 365 tenant administrators through the Office 365 for IT Pros eBook. We love figuring out how things work.
Comparing one 3D point cloud with a selection of collected 3D point clouds?
Hello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
AnileHello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
Anile Hello,
I am relatively new to MATLAB and coding. I am working on a project in which I hope to compare the point cloud of an individual CT scan to a collection of CT scans of the same structure. I would like to be able to receive a "closest-match" output. Basically: You put your scan in, its compared to the existing scans and you are provided with statistical and visual data on which existing scans match the closest.
I am currently in the planning phase for this project and am trying to identify which steps to take and which tools to consider, as well as to see if there i already existing code that can help me. I would really appreciate some ideas, related content or tips, as well as some questions I should ask myself and consider on how to achieve the first steps of this project, which would be to get a comparison going.
I appreciate all the help and pointing in the right direction I can get.
Thanks,
Anile point cloud, image comparison, point set matching MATLAB Answers — New Questions
Drawing planes in geology
Dear all
I need help to add an algoritm or modified the exsit one to get the figures annexed in file:the following is my code:
clc; clear; close all;
%% —————- 1. Load Data ————————————
filename = ‘ThreeFaultModel_Modified.xlsx’;
data = xlsread(filename);
x = data(:,1);
g_Bouguer = data(:,2);
x = x(:); g_Bouguer = g_Bouguer(:);
%% —————- 2. User Inputs ———————————
N_layers = input(‘Enter number of layers: ‘);
rho_profiles = zeros(1, N_layers);
for i = 1:N_layers
rho_profiles(i) = input([‘Density of layer ‘ num2str(i) ‘: ‘]);
end
rho_basement = input(‘Basement density: ‘);
rho_contrasts = rho_profiles – rho_basement;
%% —————- 3. Inversion ————————
G = 6.67e-3;
z_inv = bsxfun(@rdivide, g_Bouguer, (2*pi*G*rho_contrasts));
%% —————- 4. Detect ONE Main Fault ————————
VG = gradient(z_inv(:,1), x);
% اختيار أقوى تغير (fault)
[~, idx_fault] = max(abs(VG));
MainFault.x = x(idx_fault);
MainFault.dip = atan2d(VG(idx_fault),1); % تقدير تقريبي
MainFault.throw = max(z_inv(:,1)) * 0.3; % تقدير بسيط
MainFault.type = ‘Normal’;
if MainFault.dip > 0
MainFault.type = ‘Reverse’;
end
if abs(MainFault.dip) > 85
MainFault.type = ‘Vertical’;
end
%% —————- 5. Apply ONE Fault to All Layers —————-
z_layers = z_inv;
for L = 1:N_layers
if strcmp(MainFault.type,’Reverse’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) + MainFault.throw;
elseif strcmp(MainFault.type,’Normal’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) – MainFault.throw;
else
% Vertical → no vertical shift
end
end
%% —————- 6. Plot Depth ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Depth with Single Fault’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
legend(arrayfun(@(k) sprintf(‘Layer %d’,k),1:N_layers,’UniformOutput’,false));
%% —————- 7. Plot Single Fault Plane ————————
z_max = max(z_layers(:));
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’r–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’r–‘,’LineWidth’,2);
end
%% —————- 8. Dip Line from Surface ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Single Fault Dip Line’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
z1 = max(z_layers(:,1));
dip = MainFault.dip;
x0 = MainFault.x;
if abs(dip) > 89
x1 = x0;
else
x1 = x0 + z1 / tand(dip);
end
plot([x0 x1],[0 z1],’r–‘,’LineWidth’,2);
text((x0+x1)/2,0.3,’Main Fault’,’Color’,’r’);
%% —————- 9. Geological Section ————————
figure; hold on;
colors = lines(N_layers);
for i = N_layers:-1:1
if i == 1
top = zeros(size(x));
else
top = z_layers(:,i-1);
end
bot = z_layers(:,i);
fill([x;flipud(x)], [top;flipud(bot)], colors(i,:), …
‘EdgeColor’,’k’,’FaceAlpha’,0.6);
end
% رسم الصدع
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’k–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’k–‘,’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
title(‘Geological Cross Section with Single Fault’);
legend(arrayfun(@(i) sprintf(‘Layer %d’,i),1:N_layers,’UniformOutput’,false));
we use the following paramters:
Enter number of layers: 3
Density of layer 1: 2.20
Density of layer 2: 2.25
Density of layer 3: 2.30
Basement density: 2.67Dear all
I need help to add an algoritm or modified the exsit one to get the figures annexed in file:the following is my code:
clc; clear; close all;
%% —————- 1. Load Data ————————————
filename = ‘ThreeFaultModel_Modified.xlsx’;
data = xlsread(filename);
x = data(:,1);
g_Bouguer = data(:,2);
x = x(:); g_Bouguer = g_Bouguer(:);
%% —————- 2. User Inputs ———————————
N_layers = input(‘Enter number of layers: ‘);
rho_profiles = zeros(1, N_layers);
for i = 1:N_layers
rho_profiles(i) = input([‘Density of layer ‘ num2str(i) ‘: ‘]);
end
rho_basement = input(‘Basement density: ‘);
rho_contrasts = rho_profiles – rho_basement;
%% —————- 3. Inversion ————————
G = 6.67e-3;
z_inv = bsxfun(@rdivide, g_Bouguer, (2*pi*G*rho_contrasts));
%% —————- 4. Detect ONE Main Fault ————————
VG = gradient(z_inv(:,1), x);
% اختيار أقوى تغير (fault)
[~, idx_fault] = max(abs(VG));
MainFault.x = x(idx_fault);
MainFault.dip = atan2d(VG(idx_fault),1); % تقدير تقريبي
MainFault.throw = max(z_inv(:,1)) * 0.3; % تقدير بسيط
MainFault.type = ‘Normal’;
if MainFault.dip > 0
MainFault.type = ‘Reverse’;
end
if abs(MainFault.dip) > 85
MainFault.type = ‘Vertical’;
end
%% —————- 5. Apply ONE Fault to All Layers —————-
z_layers = z_inv;
for L = 1:N_layers
if strcmp(MainFault.type,’Reverse’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) + MainFault.throw;
elseif strcmp(MainFault.type,’Normal’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) – MainFault.throw;
else
% Vertical → no vertical shift
end
end
%% —————- 6. Plot Depth ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Depth with Single Fault’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
legend(arrayfun(@(k) sprintf(‘Layer %d’,k),1:N_layers,’UniformOutput’,false));
%% —————- 7. Plot Single Fault Plane ————————
z_max = max(z_layers(:));
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’r–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’r–‘,’LineWidth’,2);
end
%% —————- 8. Dip Line from Surface ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Single Fault Dip Line’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
z1 = max(z_layers(:,1));
dip = MainFault.dip;
x0 = MainFault.x;
if abs(dip) > 89
x1 = x0;
else
x1 = x0 + z1 / tand(dip);
end
plot([x0 x1],[0 z1],’r–‘,’LineWidth’,2);
text((x0+x1)/2,0.3,’Main Fault’,’Color’,’r’);
%% —————- 9. Geological Section ————————
figure; hold on;
colors = lines(N_layers);
for i = N_layers:-1:1
if i == 1
top = zeros(size(x));
else
top = z_layers(:,i-1);
end
bot = z_layers(:,i);
fill([x;flipud(x)], [top;flipud(bot)], colors(i,:), …
‘EdgeColor’,’k’,’FaceAlpha’,0.6);
end
% رسم الصدع
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’k–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’k–‘,’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
title(‘Geological Cross Section with Single Fault’);
legend(arrayfun(@(i) sprintf(‘Layer %d’,i),1:N_layers,’UniformOutput’,false));
we use the following paramters:
Enter number of layers: 3
Density of layer 1: 2.20
Density of layer 2: 2.25
Density of layer 3: 2.30
Basement density: 2.67 Dear all
I need help to add an algoritm or modified the exsit one to get the figures annexed in file:the following is my code:
clc; clear; close all;
%% —————- 1. Load Data ————————————
filename = ‘ThreeFaultModel_Modified.xlsx’;
data = xlsread(filename);
x = data(:,1);
g_Bouguer = data(:,2);
x = x(:); g_Bouguer = g_Bouguer(:);
%% —————- 2. User Inputs ———————————
N_layers = input(‘Enter number of layers: ‘);
rho_profiles = zeros(1, N_layers);
for i = 1:N_layers
rho_profiles(i) = input([‘Density of layer ‘ num2str(i) ‘: ‘]);
end
rho_basement = input(‘Basement density: ‘);
rho_contrasts = rho_profiles – rho_basement;
%% —————- 3. Inversion ————————
G = 6.67e-3;
z_inv = bsxfun(@rdivide, g_Bouguer, (2*pi*G*rho_contrasts));
%% —————- 4. Detect ONE Main Fault ————————
VG = gradient(z_inv(:,1), x);
% اختيار أقوى تغير (fault)
[~, idx_fault] = max(abs(VG));
MainFault.x = x(idx_fault);
MainFault.dip = atan2d(VG(idx_fault),1); % تقدير تقريبي
MainFault.throw = max(z_inv(:,1)) * 0.3; % تقدير بسيط
MainFault.type = ‘Normal’;
if MainFault.dip > 0
MainFault.type = ‘Reverse’;
end
if abs(MainFault.dip) > 85
MainFault.type = ‘Vertical’;
end
%% —————- 5. Apply ONE Fault to All Layers —————-
z_layers = z_inv;
for L = 1:N_layers
if strcmp(MainFault.type,’Reverse’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) + MainFault.throw;
elseif strcmp(MainFault.type,’Normal’)
z_layers(idx_fault:end, L:end) = z_layers(idx_fault:end, L:end) – MainFault.throw;
else
% Vertical → no vertical shift
end
end
%% —————- 6. Plot Depth ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Depth with Single Fault’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
legend(arrayfun(@(k) sprintf(‘Layer %d’,k),1:N_layers,’UniformOutput’,false));
%% —————- 7. Plot Single Fault Plane ————————
z_max = max(z_layers(:));
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’r–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’r–‘,’LineWidth’,2);
end
%% —————- 8. Dip Line from Surface ————————
figure; hold on;
for i = 1:N_layers
plot(x, z_layers(:,i),’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
grid on;
title(‘Single Fault Dip Line’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
z1 = max(z_layers(:,1));
dip = MainFault.dip;
x0 = MainFault.x;
if abs(dip) > 89
x1 = x0;
else
x1 = x0 + z1 / tand(dip);
end
plot([x0 x1],[0 z1],’r–‘,’LineWidth’,2);
text((x0+x1)/2,0.3,’Main Fault’,’Color’,’r’);
%% —————- 9. Geological Section ————————
figure; hold on;
colors = lines(N_layers);
for i = N_layers:-1:1
if i == 1
top = zeros(size(x));
else
top = z_layers(:,i-1);
end
bot = z_layers(:,i);
fill([x;flipud(x)], [top;flipud(bot)], colors(i,:), …
‘EdgeColor’,’k’,’FaceAlpha’,0.6);
end
% رسم الصدع
if strcmp(MainFault.type,’Vertical’)
plot([MainFault.x MainFault.x],[0 z_max],’k–‘,’LineWidth’,2);
else
dx = z_max / tand(MainFault.dip);
if MainFault.dip > 0
x2 = MainFault.x – dx;
else
x2 = MainFault.x + dx;
end
plot([MainFault.x x2],[0 z_max],’k–‘,’LineWidth’,2);
end
set(gca,’YDir’,’reverse’);
xlabel(‘Distance (km)’);
ylabel(‘Depth (km)’);
title(‘Geological Cross Section with Single Fault’);
legend(arrayfun(@(i) sprintf(‘Layer %d’,i),1:N_layers,’UniformOutput’,false));
we use the following paramters:
Enter number of layers: 3
Density of layer 1: 2.20
Density of layer 2: 2.25
Density of layer 3: 2.30
Basement density: 2.67 matlab, drawing, plane MATLAB Answers — New Questions
How can I verify that the roll-off factors (0.15, 0.10, and 0.05) are correctly implemented in the dvbs2xWaveformGenerator function?
What is the correct way to validate the roll-off factor (0.15, 0.10, 0.05) used by the dvbs2xWaveformGenerator in MATLAB? Is there a way to confirm it from the generated waveform?What is the correct way to validate the roll-off factor (0.15, 0.10, 0.05) used by the dvbs2xWaveformGenerator in MATLAB? Is there a way to confirm it from the generated waveform? What is the correct way to validate the roll-off factor (0.15, 0.10, 0.05) used by the dvbs2xWaveformGenerator in MATLAB? Is there a way to confirm it from the generated waveform? dvb-s2x, signal-processing, communication-toolbox, roll-off, satellite communications toolbox, wireless communications toolbox MATLAB Answers — New Questions
Creating a Planner Weekly Notification Email for Incomplete Tasks
Incomplete Task Analysis Report is Good, but an Email Detailing Incomplete Tasks Might Be Better
A reader noted the script I wrote in 2023 to analyze incomplete tasks in Planner plans and asked had I a version that emailed incomplete task lists to individual team members. My response was that I hadn’t, but it would be easy to amend the code to split up the results for individual users and email a listing of incomplete tasks to each user. After all, it’s just PowerShell.
Roll forward a couple of weeks and my correspondent had made no progress. Looking at the script, I could see why the code is a little off-putting to someone who isn’t used to working with Graph APIs through PowerShell (the Automating Microsoft 365 with PowerShell eBook helps here). Handling topics like pagination and retrieving access tokens (not to mention token renewal) is enough to furrow anyone’s brow.
Creating a Planner Notification Email
As it happens, I sort of needed the same thing myself. The Office 365 for IT Pros author team uses message center notifications to keep to date with changes in workloads. It’s not the only source of information that we use, but it’s convenient because the Microsoft 365 admin center offers the option to synchronize the notifications with a Planner plan (something that can also be done with PowerShell).
Although our authors are all very knowledgeable people, they’re not very disciplined at closing off tasks after reviewing new notifications to decide if the change affects the content of their chapters. My idea was therefore to write a script that:
- A security group holds members who will be checked for incomplete tasks. I call the group “Weekly Task Updates.” Any other valid group could be used.
- For each member, find the Microsoft 365 groups that they belong to.
- Check the Microsoft 365 groups for plans and find any incomplete tasks assigned and note their details.
- Send email as a reminder about the incomplete tasks to ask the recipient to close any tasks out that are no longer valid. The email contains details of the incomplete tasks, including a hyperlink to each task so that the user can quickly check out the task in the Planner browser app.
- Schedule the script as an Azure Automation runbook to run at 7AM every Saturday (to prompt authors to do some work over the weekend…). Figure 1 is an example of the email.

Planner and the Microsoft Graph PowerShell SDK
To make the code easier to understand, the script uses cmdlets from the Planner module in the Microsoft Graph PowerShell SDK. The script therefore features cmdlets like:
- Get-MgGroupPlannerPlan: Fetch the plans for the Microsoft 365 group.
- Get-MgPlannerPlanTask: Fetch the tasks for a plan.
- Get-MgPlannerPlanBucket: Fetch the buckets for a plan.
Graph Woes for Planner
The Graph implementation for Planner is basic and affects both Graph requests and SDK cmdlets. For example, filtering is unsupported on the percentComplete or completedDateTime properties, so a client-side filter is required to find open tasks after fetching all the tasks in the plan. There’s no support for search or sorting either. The plan that logs message center notifications currently spans 8120 tasks, so the lack of support for optimized queries is a pain when trying to extract incomplete tasks. Here’s how the script finds incomplete tasks:
[array]$Tasks = Get-MgPlannerPlanTask -PlannerPlanId $Plan.Id -All -PageSize 500 -Property Id, Title, CompletedDateTime, StartDateTime, DueDateTime, BucketId, Assignments -ErrorAction Stop
$IncompleteTasks = $Tasks | Where-Object { $null -eq $_.CompletedDateTime }
There’s also no Graph API to find the set of plans in which a user has assigned tasks. Everything flows through Microsoft 365 groups. I didn’t just want to report the open tasks found in the plan synchronized with the Microsoft 365 admin center because it seemed more useful to report open tasks found in any plan. Certainly, this is better for me because I think it’s useful to send people a single message containing a consolidated list of all their incomplete tasks instead of a separate message per plan.
Azure Automation Setup
After testing to make sure that the code ran interactively, I moved it over to Azure Automation to create a runbook. As described in this article, two issues need to be dealt with for scripts that use the Microsoft Graph PowerShell SDK: Graph permissions assigned to the automation account and SDK sub-modules loaded into the runtime environment. Details of the requirements are in the script.
Hopefully, the script is useful. If not, feel free to suggest amendments through the Office 365 for IT Pros GitHub repository.
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!
Disable reset of Jacobian
I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler:I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler: I’m trying to switch from the old “black” Simcape Specialized Power System library to the new “blue” Simcape library. I’m using the phasor solution and the fast calculation method, but the problem lies with the phasor solver itself. The solver resets the Jacobian matrix much more frequently than the Specilaized Power library solver. Any tips on how to reduce the frequency of these resets?
See attached report from Simulink Profiler: reset, jacobian MATLAB Answers — New Questions
UAV code simulation not showing the output properly
I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested.I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested. I am working on project on UAV. MATLAB code is working fine, but generated output does not show any UAVs. I can share some code here if someone is interested. aerial vehicle MATLAB Answers — New Questions
Integrating MMC in IEEE 9 bus system
Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem.Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem. Hello to fellow MATLAB users. I am studying electrical engineering and not so familiar with MATLAB and Simulink. Therefore I need your help.
I want to integrate a MMC system into IEEE 9 bus system to study how fault current behaves when an AC transmission line is replaced with a HVDC link. More specifically I want to integrate simscapeelectrical/ModularMultilevelConverterHVDCTransExample between bus 4 and bus 6 in simscapeelectrical/IEEE9BusSystemExample. However, I am at a dead end right now, no matter what I try I can’t get it right. I’d appreciate if you could guide me on how to tackle this problem. mmc, hvdc, ieee 9 bus, ac transmission MATLAB Answers — New Questions
Please help me to run this simple relation
I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5 I want to draw relation between T ( y-axis) and x ( x-axis) with change parameter B1.
Constant:
B2=0.01;B4=0.1;
vector
Parameter
B1=0.1:0.1:0.5 plot MATLAB Answers — New Questions
Running Copilot Retrieval Searches with the Microsoft Graph PowerShell SDK
Copilot Retrieval API Gives Apps Ability to Ground Queries
If your tenant has Microsoft 365 Copilot license or is willing to use a Pay-as-you-go consumption model to fund Copilot services, you might like to play with the Microsoft Graph Copilot retrieval API. The API is designed to return text extracts from content stored SharePoint Online, OneDrive for Business, and Copilot connectors that apps can use to “ground” user prompts before calling a generative AI engine to process the prompts. A Copilot Search API is also available. The difference between the search and retrieval APIs is that the search API runs a semantic search whereas the retrieval API uses a Retrieval Augmented Generation (RAG) search. The results achieved using the two APIs can be quite different.
Grounding against Microsoft 365 content is a major competitive advantage enjoyed by Microsoft 365 Copilot over third-party generative AI solutions. Solutions like ChatGPT enterprise can upload individual documents for processing, but they cannot look for information within Microsoft 365 to help the AI understand the full context of a user request.
Understanding how APIs work gives an insight into how technology functions. Understanding how apps can call Copilot to retrieve information gives insight into how the Copilot integrations with apps like Word, Excel, and PowerPoint work, because the integrated apps all retrieve information through the Graph to ground their queries.
Access Limited to the Signed-In User
Use of the Copilot Retrieval API is free for users with Copilot for Microsoft 365 licenses. In fact, just like Microsoft 365 Copilot, the API only functions within the context of a signed-in user. In Graph terms, this means that the API uses delegated permissions like Files.Read.All and Sites.Read.All (and for connectors, ExternalItem.Read.All) to search for information that’s available to the signed-in user.
Using the Copilot Retrieval API with the Microsoft Graph PowerShell SDK
For the remainder of this article, I use V2.35.1 of the Microsoft Graph PowerShell SDK to communicate with the Copilot Retrieval API in an interactive session. First, sign in with the required permissions:
Connect-MgGraph -NoWelcome -Scopes Files.Read.All, Sites.Read.All
Both permissions are required to let the API read the SharePoint Online and OneDrive sites that the signed-in user can access, and to read the files stored in those locations.
The next step is to populate a variable with the Graph endpoint for the Copilot Retrieval API:
$Uri = 'https://graph.microsoft.com/v1.0/copilot/retrieval'
Now build a hash table containing the request body for a search request. The API supports searches against a limited set of data sources (SharePoint Online, OneDrive for Business, and Copilot connectors or the “ExternalItem” data source). Although Copilot can ground prompts against messages found in Exchange Online and Teams, neither repository is currently an option for the Copilot Retrieval API:
$BodyRequest = @{}
$BodyRequest.Add("datasource", "sharepoint")
$BodyRequest.Add("queryString", "How to write PowerShell for Microsoft 365")
$bodyRequest.Add("maximumNumberOfResults", "3")
The request body contains a filter to improve the accuracy of the search hits returned by the request. The search is against SharePoint, so the filter expression is in KeyQL syntax for SharePoint searches, just like the filters used with Microsoft Search and eDiscovery. This example restricts Copilot to retrieving Word documents between two dates. Remember that Copilot can retrieve all kinds of Office documents and PDFs as well as objects like SharePoint pages, so restricting output based on file type might not be a good idea.
$BodyRequest.add("filterexpression",’FileExtension:"DOCX" AND LastModifiedTime>=2025-11-01 AND LastModifiedTime<=2026-01-31')Optionally, populate an array containing the names of the metadata properties to retrieve for each search hit and add the array to the request body:
$Metadata = "title", "author", "size", "Created", "LastModifiedTime"
$BodyRequest.add("resourceMetadata", $metadata)
When the request body is complete, issue a POST request to run the retrieval request:
[array]$Data = Invoke-MgGraphRequest -Uri $Uri -Method Post -Body $BodyRequest -OutputType PsObject
Interpreting Copilot Retrieval Hits
After issuing a successful request, the $Data output array should hold an array of RetrievalHits that can be navigated like any other array. This example code outputs the filename, author, created date, relevance score (how relevant the hit is to the query), and the sensitivity label assigned to the file, if one exists. In addition to the metadata, Copilot also retrieves a text extract for files that’s a couple of thousand characters long. The idea is that apps use the information contained in the files found by the API to add context to the query the app sends to the generative AI engine for processing.
The information found by the Copilot Retrieval API can be output with a command like this:
$Hits = $Data.RetrievalHits
ForEach ($Hit in $Hits) {
Write-Host “File:” $Hit.ResourceMetaData.Title
Write-Host “Author:” $Hit.ResourceMetaData.Author
Write-Host “Created:” $Hit.ResourceMetadata.Created
Write-Host “Relevance:” $Hit.extracts.relevanceScore
Write-Host “Label:” $Hit.SensitivityLabel.DisplayName
Write-Host “Extract:” $Hit.extracts.text.substring(0,120)
Write-Host “-------------------------------------------"
}
The output for a hit created by the code above looks something like this:
File: Using Graph API requests or the Graph PowerShell SDK Author: Tony Redmond Created: 30/05/2024 14:57:31 Relevance: 0.7899147536874066 0.8195143018070271 0.8282432736321905 Label: Email LabelsPublic Extract: ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### Which to Choose for PowerShell Development? I’ ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### A Word About Returned Values When you run a Gr ## Choosing Between Graph API Requests or Graph SDK Cmdlets ### Mix and Match The important thing to remember -------------------------------------------
You can download a script that generates slightly nicer output (Figure 1) from the Office 365 for IT Pros GitHub repository.

I spent an interesting few hours playing with the Copilot Retrieval API. I’m not quite sure how I’ll use the knowledge acquired in that time, but you never know when something learned a while ago suddenly becomes important.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive insights updated monthly into what happens within Microsoft 365, why it happens, and what new features and capabilities mean for your tenant.
Finding all eigen value between two given eigen value.
Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M]Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M] Suppose there are two square symmetric matrices [K] and [M]. Since my work is related with structural analysis so they are typically stiffness and mass matrices. I am doing wave propagation study for a narrow band input load. In frequency domain, load amplitude is significant only between frequency [omega1 omega2]. So I am interested to find all eigen value and corresponding eigen vector only in this range.
The eigen value problem statement is
[K]=lambda[M] all eigen value between given range MATLAB Answers — New Questions
2026a Release Date?
Good morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetingsGood morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetings Good morning,
does someone know when full 2026a will be released? Normal release month is March, I did not see or hear something about a planned delayed release. Would be nice to use a more stable version than 2025a for app buiding (pls don’t tell me to use 2025b)…
greetings release MATLAB Answers — New Questions
How should I handle streaming inputs and outputs for my Simulink Compiler model (TCP/UDP, visualization, disp, S-function, C Caller, etc.)?
I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this?I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this? I have a model that I plan on deploying with Simulink Compiler. I would like to stream the inputs and outputs to the model, for example:Stream inputs/outputs with TCP/UDPPublish subscribe with ROS OPC client-server communicationRead from or write to a file or databaseStream to a live output visualization
I tried putting the input and output handling inside the model itself, with specific I/O blocks however I ran into problems with blocks not being supported for Rapid Accelerator mode. What is the recommended method to do this? simulinkcompiler, deployment, simulink, compiler, io MATLAB Answers — New Questions









