Category: News
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
A more efficient way to do this calculation
Hi all,
I am creating a function that allows me to obtain certain data of Steel Members.
I have created limits that give an interval over which to select a particular member.
Here is my code:
function [HD_cols] = members(Ic);
HD400_1299 = [755000/100^4; 1655/100^2; 1299];
HD400_1202 = [664000/100^4; 1530/100^2; 1202];
HD400_1086 = [596000/100^4; 1386/100^2; 1086];
HD400_990 = [519000/100^4; 1262/100^2; 990];
HD400_900 = [450000/100^4; 1149/100^2; 900];
HD400_818 = [392000/100^4; 1043/100^2; 818];
HD400_744 = [342000/100^4; 948/100^2; 744];
HD400_677 = [300000/100^4; 863/100^2; 677];
HD400_634 = [274000/100^4; 808/100^2; 634];
HD400_592 = [250000/100^4; 755/100^2; 592];
HD400_551 = [226000/100^4; 701/100^2; 551];
HD400_509 = [204000/100^4; 649/100^2; 509];
HD400_463 = [180000/100^4; 590/100^2; 463];
HD400_421 = [160000/100^4; 537/100^2; 421];
T = table(HD400_1299,HD400_1202,HD400_1086,HD400_990,HD400_900,HD400_818,HD400_744,HD400_677,HD400_634,HD400_592,HD400_551,HD400_509,HD400_463,HD400_421);
for i = 1:length(Tx)-1
Limits(i) = (Tx(1,i)+Tx(1,i+1))/2;
end
if Ic > Limits(1)
Ic = HD400_1299
elseif Ic > Limits(2)
Ic = HD400_1202
elseif Ic > Limits(3)
Ic = HD400_1086
elseif Ic > Limits(4)
Ic = HD400_990
elseif Ic > Limits(5)
Ic = HD400_900
elseif Ic > Limits(6)
Ic = HD400_818
elseif Ic > Limits(7)
Ic = HD400_744
elseif Ic > Limits(8)
Ic = HD400_677
elseif Ic > Limits(9)
Ic = HD400_634
elseif Ic > Limits(10)
Ic = HD400_592
elseif Ic > Limits(11)
Ic = HD400_551
elseif Ic > Limits(12)
Ic = HD400_509
elseif Ic > Limits(13)
Ic = HD400_463
elseif Ic > Limits(14)
Ic = HD400_421
end
end
My request is, can somone show me how I can simplify and make more efficient my if statements? Perhaps I need to use a loop? I want to add more members to more script and typing like I have above is tedious and not very efficient. So, I’m hoping someone can help?
Many thanks,
ScottHi all,
I am creating a function that allows me to obtain certain data of Steel Members.
I have created limits that give an interval over which to select a particular member.
Here is my code:
function [HD_cols] = members(Ic);
HD400_1299 = [755000/100^4; 1655/100^2; 1299];
HD400_1202 = [664000/100^4; 1530/100^2; 1202];
HD400_1086 = [596000/100^4; 1386/100^2; 1086];
HD400_990 = [519000/100^4; 1262/100^2; 990];
HD400_900 = [450000/100^4; 1149/100^2; 900];
HD400_818 = [392000/100^4; 1043/100^2; 818];
HD400_744 = [342000/100^4; 948/100^2; 744];
HD400_677 = [300000/100^4; 863/100^2; 677];
HD400_634 = [274000/100^4; 808/100^2; 634];
HD400_592 = [250000/100^4; 755/100^2; 592];
HD400_551 = [226000/100^4; 701/100^2; 551];
HD400_509 = [204000/100^4; 649/100^2; 509];
HD400_463 = [180000/100^4; 590/100^2; 463];
HD400_421 = [160000/100^4; 537/100^2; 421];
T = table(HD400_1299,HD400_1202,HD400_1086,HD400_990,HD400_900,HD400_818,HD400_744,HD400_677,HD400_634,HD400_592,HD400_551,HD400_509,HD400_463,HD400_421);
for i = 1:length(Tx)-1
Limits(i) = (Tx(1,i)+Tx(1,i+1))/2;
end
if Ic > Limits(1)
Ic = HD400_1299
elseif Ic > Limits(2)
Ic = HD400_1202
elseif Ic > Limits(3)
Ic = HD400_1086
elseif Ic > Limits(4)
Ic = HD400_990
elseif Ic > Limits(5)
Ic = HD400_900
elseif Ic > Limits(6)
Ic = HD400_818
elseif Ic > Limits(7)
Ic = HD400_744
elseif Ic > Limits(8)
Ic = HD400_677
elseif Ic > Limits(9)
Ic = HD400_634
elseif Ic > Limits(10)
Ic = HD400_592
elseif Ic > Limits(11)
Ic = HD400_551
elseif Ic > Limits(12)
Ic = HD400_509
elseif Ic > Limits(13)
Ic = HD400_463
elseif Ic > Limits(14)
Ic = HD400_421
end
end
My request is, can somone show me how I can simplify and make more efficient my if statements? Perhaps I need to use a loop? I want to add more members to more script and typing like I have above is tedious and not very efficient. So, I’m hoping someone can help?
Many thanks,
Scott Hi all,
I am creating a function that allows me to obtain certain data of Steel Members.
I have created limits that give an interval over which to select a particular member.
Here is my code:
function [HD_cols] = members(Ic);
HD400_1299 = [755000/100^4; 1655/100^2; 1299];
HD400_1202 = [664000/100^4; 1530/100^2; 1202];
HD400_1086 = [596000/100^4; 1386/100^2; 1086];
HD400_990 = [519000/100^4; 1262/100^2; 990];
HD400_900 = [450000/100^4; 1149/100^2; 900];
HD400_818 = [392000/100^4; 1043/100^2; 818];
HD400_744 = [342000/100^4; 948/100^2; 744];
HD400_677 = [300000/100^4; 863/100^2; 677];
HD400_634 = [274000/100^4; 808/100^2; 634];
HD400_592 = [250000/100^4; 755/100^2; 592];
HD400_551 = [226000/100^4; 701/100^2; 551];
HD400_509 = [204000/100^4; 649/100^2; 509];
HD400_463 = [180000/100^4; 590/100^2; 463];
HD400_421 = [160000/100^4; 537/100^2; 421];
T = table(HD400_1299,HD400_1202,HD400_1086,HD400_990,HD400_900,HD400_818,HD400_744,HD400_677,HD400_634,HD400_592,HD400_551,HD400_509,HD400_463,HD400_421);
for i = 1:length(Tx)-1
Limits(i) = (Tx(1,i)+Tx(1,i+1))/2;
end
if Ic > Limits(1)
Ic = HD400_1299
elseif Ic > Limits(2)
Ic = HD400_1202
elseif Ic > Limits(3)
Ic = HD400_1086
elseif Ic > Limits(4)
Ic = HD400_990
elseif Ic > Limits(5)
Ic = HD400_900
elseif Ic > Limits(6)
Ic = HD400_818
elseif Ic > Limits(7)
Ic = HD400_744
elseif Ic > Limits(8)
Ic = HD400_677
elseif Ic > Limits(9)
Ic = HD400_634
elseif Ic > Limits(10)
Ic = HD400_592
elseif Ic > Limits(11)
Ic = HD400_551
elseif Ic > Limits(12)
Ic = HD400_509
elseif Ic > Limits(13)
Ic = HD400_463
elseif Ic > Limits(14)
Ic = HD400_421
end
end
My request is, can somone show me how I can simplify and make more efficient my if statements? Perhaps I need to use a loop? I want to add more members to more script and typing like I have above is tedious and not very efficient. So, I’m hoping someone can help?
Many thanks,
Scott for, loop, functions, if statement MATLAB Answers — New Questions
Hi all, I want to be a able to paste data in any column all at once not cell by in MATLAB APP table.
T_Fixed = table(StartDates_Fixed,EndDates_Fixed,PaymentDates_Fixed,Notional,fixedrate);
app.Details_Fixed.Data = T_Fixed;
app.Details_Fixed.ColumnEditable =true(1,5);T_Fixed = table(StartDates_Fixed,EndDates_Fixed,PaymentDates_Fixed,Notional,fixedrate);
app.Details_Fixed.Data = T_Fixed;
app.Details_Fixed.ColumnEditable =true(1,5); T_Fixed = table(StartDates_Fixed,EndDates_Fixed,PaymentDates_Fixed,Notional,fixedrate);
app.Details_Fixed.Data = T_Fixed;
app.Details_Fixed.ColumnEditable =true(1,5); app designer, matlab MATLAB Answers — New Questions
need real data for Electrical viechle
Hello dear
I wiuld like to know if nay resarch center or universities can help me to get real data for Electrical viechle
Best regardsHello dear
I wiuld like to know if nay resarch center or universities can help me to get real data for Electrical viechle
Best regards Hello dear
I wiuld like to know if nay resarch center or universities can help me to get real data for Electrical viechle
Best regards need real data for electrical viechle, electrical viechle MATLAB Answers — New Questions
People Settings Appear in the Microsoft 365 Admin Center
Customize the Microsoft 365 Profile Card Through the Admin Center
A July 3 LinkedIn post by Microsoft’s Wictor Wilén revealed that the Settings section of the Microsoft 365 admin center now has a People Settings section where tenant administrators and people administrators can customize the properties that appear on the Microsoft 365 people card. Figure 1 shows the properties available for inclusion in the profile card.

No Custom Properties
The thing about the set of properties shown by the Microsoft 365 admin center is that they don’t include any custom properties (the Exchange custom properties referred to by Entra ID as the on-premises extension properties) added to the profile card through the Microsoft Graph. To keep focus, properties ingested from another source, like Copilot connectors for people data, are out of scope for this discussion.
For example, the profile card for my tenant features three custom properties for Employee Id, Employee Type, and Cost Center (see this article about how to customize the Microsoft 365 user profile card with PowerShell). Similar properties are in the list shown in Figure 1, but these are Entra ID properties rather than the custom properties I used.
Two of the properties (EmployeeId and EmployeeType) have been available in Entra ID for several years, but never featured in the set surfaced in the profile card (which is why I used custom attributes)
The CostCenter property is part of the CompanyDetail Graph resource type that’s currently in beta. Looking at the other optional properties listed in Figure 1, we find that the Division property is also part of the CompanyDetail resource, while the Role property is part of the PositionDetail resource, another beta resource.
Because these properties are in beta, you cannot update them for user accounts through the Entra admin center or Microsoft 365 admin center. Instead, you’ll need to use cmdlets like New-MgBetaUserProfilePosition (which updates the Role property), or the Update-MgUser cmdlet to update the CostCenter and Division properties. As shown below, after updating the properties for a user account, the Get-MgUser cmdlet can retrieve the updated values:
$Parameters = @{ employeeOrgData = @{ "costCenter" = "881-22993" "division" = "CEO Office" } } Update-MgUser -UserId Tony.Redmond@office365itpros.com -BodyParameter $Parameters Get-MgUser -Userid Tony.Redmond@office365itpros.com -Property id, displayName, userPrincipalName, employeeOrgData | Select-Object -ExpandProperty employeeOrgData CostCenter Division ---------- -------- 881-22993 CEO Office
Microsoft 365 Profile Card In a State of Transition
The Microsoft 365 profile card is in a state of transition. Some properties come from Entra ID, and some come from SharePoint Online, which can end up in a messy profile card with apparent duplications. Add in some custom properties derived from Exchange custom attributes, and it’s a recipe for confusion.
The good news is that Microsoft is attempting to solve the problem by defining the properties required by Microsoft 365 tenants in Graph resources. If Graph resources include rich descriptions of about people and their roles, then there’ll be no need to use custom properties.
Tenants use custom properties today because it has been the only way to present customized information about people on the profile card. A migration to move values from custom to standard properties will have to occur in the future. For example, my tenant needs to extract values from the custom properties used by the profile card today and transfer the values to the default Graph properties. The transition will be completed by updating the set of properties shown on the user profile card to use the default rather than custom properties. You can download a script from the Office365itpros GitHub repository that demonstrates the general principle.
More Settings for the Microsoft 365 Profile Card to Come
The big expansion of the People Settings section in the Microsoft 365 admin center needs to be filled with more than the single option to customize the people card. I expect that Microsoft will use the page to present all the settings that affect the profile card, including the display of personal pronouns and name pronunciation recordings. It just takes time to roll these changes out, but I wouldn’t be surprised to see the other settings appear in the Microsoft 365 admin center before the end of the year.
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.
Security error using fred/fetch
Hi,
I recently updated the Mac software to Sequoia, and started to receive the following error for a code that has always worked before:
Error using fred/fetch
Unable to retrieve data. Verify valid security request.
Do you know how to fix this? I have updated the Matlab version to the latest, and the error still persists.
Thanks!Hi,
I recently updated the Mac software to Sequoia, and started to receive the following error for a code that has always worked before:
Error using fred/fetch
Unable to retrieve data. Verify valid security request.
Do you know how to fix this? I have updated the Matlab version to the latest, and the error still persists.
Thanks! Hi,
I recently updated the Mac software to Sequoia, and started to receive the following error for a code that has always worked before:
Error using fred/fetch
Unable to retrieve data. Verify valid security request.
Do you know how to fix this? I have updated the Matlab version to the latest, and the error still persists.
Thanks! fred, fetch MATLAB Answers — New Questions
Documentation on creating a box label datastore for bounding box label data with Sublabels?
Hello, I’m having trouble figuring how to train a fasterRCNN network using a labeled dataset I hand-labeled in Matlab with sublabels. I know how to create a boxLabelDatastore for just labeling 1 object but I can’t figure out how to do this when I have sublabels. The error I get when I try to apply my old code for one object with no sublabels is as follows…
"Error using boxLabelDatastore
Invalid data in column 1 of input table 1.
Caused by:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains thebounding boxes must be a cell array."
also this function does not work either…
[imds,blds] = objectDetectorTrainingData(gTruth)
Warning: groundTruth object/s contain attribute or sublabel data. These are not included in the output table.
> In objectDetectorTrainingData>populateTrainingTable (line 330)
In objectDetectorTrainingData (line 165)
I also have not been able to find any examples of going from a gTruth datastore to actually training a network in the examplesHello, I’m having trouble figuring how to train a fasterRCNN network using a labeled dataset I hand-labeled in Matlab with sublabels. I know how to create a boxLabelDatastore for just labeling 1 object but I can’t figure out how to do this when I have sublabels. The error I get when I try to apply my old code for one object with no sublabels is as follows…
"Error using boxLabelDatastore
Invalid data in column 1 of input table 1.
Caused by:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains thebounding boxes must be a cell array."
also this function does not work either…
[imds,blds] = objectDetectorTrainingData(gTruth)
Warning: groundTruth object/s contain attribute or sublabel data. These are not included in the output table.
> In objectDetectorTrainingData>populateTrainingTable (line 330)
In objectDetectorTrainingData (line 165)
I also have not been able to find any examples of going from a gTruth datastore to actually training a network in the examples Hello, I’m having trouble figuring how to train a fasterRCNN network using a labeled dataset I hand-labeled in Matlab with sublabels. I know how to create a boxLabelDatastore for just labeling 1 object but I can’t figure out how to do this when I have sublabels. The error I get when I try to apply my old code for one object with no sublabels is as follows…
"Error using boxLabelDatastore
Invalid data in column 1 of input table 1.
Caused by:
Error using boxLabelDatastore>iAssertValidBBoxFormat
The size of bounding box data must be M-by-4, M-by-5, or M-by-9, where M is the number of boxes in each table element. The column in the training data table that contains thebounding boxes must be a cell array."
also this function does not work either…
[imds,blds] = objectDetectorTrainingData(gTruth)
Warning: groundTruth object/s contain attribute or sublabel data. These are not included in the output table.
> In objectDetectorTrainingData>populateTrainingTable (line 330)
In objectDetectorTrainingData (line 165)
I also have not been able to find any examples of going from a gTruth datastore to actually training a network in the examples sublabels, fasterrcnn, object detection, deep learning MATLAB Answers — New Questions
Do you have a HECVAT & VPAT for the MATLAB software?
Do you have a HECVAT & VPAT for the MATLAB software?Do you have a HECVAT & VPAT for the MATLAB software? Do you have a HECVAT & VPAT for the MATLAB software? hecvat, vpat MATLAB Answers — New Questions
Neural network classification improvments
hi all,
I have trained a neural network using fitcnet, the data is a simple classification of hole numbering. the data is as per the simplified attached picture. but essentially the center of the hole xy point, the angle and distance relative to the center of the whole blade, the whole blade major axis and finally the hole number a value from 1:319.
the problem i have found is two-fold.
i think it may be ‘over-fitted’ it works well on the synthetic data but performs worse on real data
2. it rountinly will identify multilple holes as the same number e.g there would be 4 hole number 3’s now in the real data sometimes a single hole can split into a pair of much smaller holes they stay rougly within bounds of the original hole.
The data into the training was a single row of info for one hole listing the above info including its class effectivly treating each time i then ask it to predict the classification of a new hole being a ‘clean-sheet’ with no knowledge of already predicted holes.
Does anyone have any suggestions for possible improvments?
many thanks timhi all,
I have trained a neural network using fitcnet, the data is a simple classification of hole numbering. the data is as per the simplified attached picture. but essentially the center of the hole xy point, the angle and distance relative to the center of the whole blade, the whole blade major axis and finally the hole number a value from 1:319.
the problem i have found is two-fold.
i think it may be ‘over-fitted’ it works well on the synthetic data but performs worse on real data
2. it rountinly will identify multilple holes as the same number e.g there would be 4 hole number 3’s now in the real data sometimes a single hole can split into a pair of much smaller holes they stay rougly within bounds of the original hole.
The data into the training was a single row of info for one hole listing the above info including its class effectivly treating each time i then ask it to predict the classification of a new hole being a ‘clean-sheet’ with no knowledge of already predicted holes.
Does anyone have any suggestions for possible improvments?
many thanks tim hi all,
I have trained a neural network using fitcnet, the data is a simple classification of hole numbering. the data is as per the simplified attached picture. but essentially the center of the hole xy point, the angle and distance relative to the center of the whole blade, the whole blade major axis and finally the hole number a value from 1:319.
the problem i have found is two-fold.
i think it may be ‘over-fitted’ it works well on the synthetic data but performs worse on real data
2. it rountinly will identify multilple holes as the same number e.g there would be 4 hole number 3’s now in the real data sometimes a single hole can split into a pair of much smaller holes they stay rougly within bounds of the original hole.
The data into the training was a single row of info for one hole listing the above info including its class effectivly treating each time i then ask it to predict the classification of a new hole being a ‘clean-sheet’ with no knowledge of already predicted holes.
Does anyone have any suggestions for possible improvments?
many thanks tim fitcnet, neural network MATLAB Answers — New Questions
Sort Internal Variables in FMU
Hi,
I am exporting a Simulink model with some pre-defined internal variables as a FMU. There are properly exported. However, the order is not respected; they seem to be randomly sorted inside the FMU object.
Is there any way I could solve this issue?
Thank you very much in advance.
Best regards,
Víctor Sánchez SuárezHi,
I am exporting a Simulink model with some pre-defined internal variables as a FMU. There are properly exported. However, the order is not respected; they seem to be randomly sorted inside the FMU object.
Is there any way I could solve this issue?
Thank you very much in advance.
Best regards,
Víctor Sánchez Suárez Hi,
I am exporting a Simulink model with some pre-defined internal variables as a FMU. There are properly exported. However, the order is not respected; they seem to be randomly sorted inside the FMU object.
Is there any way I could solve this issue?
Thank you very much in advance.
Best regards,
Víctor Sánchez Suárez fmu, simulink, internal variables, export MATLAB Answers — New Questions
Microsoft Explains the Differences Between Copilot Memories
Copilot Memory and Copilot Communication Memory or Live Memory
On August 6, I reported about Copilot Memory, a way for users to personalize how Microsoft 365 Copilot responds to prompts. The article mentions message center notification MC1127234 (1 August 2025). In the text I noted some conflicts between the reported dates in the Technical community post about Copilot Memory and MC1127234.
As it turns out, some confusion existed about what Microsoft described in the message center notification because it doesn’t refer to the Copilot Memory feature. Instead, MC1127234 discusses Copilot “communication memory,” or information derived from a user’s personal communication used by Microsoft 365 Copilot to deliver better results to user prompts.
On August 29, 2025, Microsoft reissued MC1127234 (Microsoft 365 roadmap item 499153) to clarify what they meant, saying that the restatement was due to customer feedback, and because the change requires new processing of user data.
Learning to be More Context-Aware from User Communications
The updated text describes an “extended capability” for how Microsoft 365 Copilot gleans information about what’s important to a user from their chats, emails, and meetings. In other words, Copilot learns about what people do from the information contained in the Microsoft Graph and uses that information (referred to as “memories”) to deliver more personalized and “context-aware” responses to user prompts. “Live memories” (the same as communication memory) for individual users are formed by using AI to analyze and summarize the information held in items accessible to individual user, like transcripts from meetings they attend.
Easy as it is to become confused with so many references to different types of memory, the serious point is that communication memory is “a unified view across communication channels.” In other words, where Copilot integration in Microsoft 365 apps used to focus exclusively on information from a specific app, now Copilot draws in information from multiple sources to create a more rounded picture. For instance, the Facilitator agent in Teams operates on messages posted to a chat. With communication memory, the agent can refer to other sources available through the Graph (like previous emails between the chat participants) to deliver better advice.
People-Related Questions First
Microsoft says that Copilot communication memories will initially be used to improve the quality of Copilot responses to people-related questions. I guess this means that if you include someone’s name in a Copilot prompt, it will automatically query the Graph to find out if any information associated with that name is available to help frame its response. The new mode of processing started on September 1, 2025. However, complete worldwide deployment is not expected to be complete until late October 2025.
Making Microsoft 365 Copilot A Bit Smarter
Anything that helps AI to do a better job is welcome. In this case, it seems like Microsoft is expanding the horizon of what Copilot looks for when it assembles information to answer a question from the limit of a single app to a more-encompassing view of what’s available to a user in the Graph. That’s a good idea.

Of course, the normal caveats over anything to do with AI applies. Copilot communication memory depends on what Copilot can find, and if the information in the Graph is inaccurate, obsolete, or just plain wrong, then the advice informed by memory could be affected. Microsoft notes that citations (source links) are provided for each source mentioned in a response (Figure 1). Quite how often people check out every citation for a Copilot response is quite another matter. Sometimes, any answer will do.
Learn more about how the Microsoft 365 applications really work on an ongoing basis by subscribing to the Office 365 for IT Pros eBook. Our monthly updates keep subscribers informed about what’s important across the Office 365 ecosystem.
How do I migrate my command history data from older releases to MATLAB R2025a?
How do I migrate my command history data from older releases to MATLAB R2025a?How do I migrate my command history data from older releases to MATLAB R2025a? How do I migrate my command history data from older releases to MATLAB R2025a? command_history, command_history_migration, new_desktop MATLAB Answers — New Questions
How to write single Script for all profiles ?
The input in my case is the measurement data from a sensor doing spiral scanning. So I have 3D point data (x, y, z) of the surface for different geometries like hemisphere, plane, sphere, and cylinder. The script should preprocess this data (filtering, centering, vertex search), fit the right model (sphere, plane, cylinder, or freeform), and then output the fitted parameters along with residuals. The outcomes I want are both numerical results (fit parameters and errors) and visualizations in 2D cross-sections and 3D surface plots.The input in my case is the measurement data from a sensor doing spiral scanning. So I have 3D point data (x, y, z) of the surface for different geometries like hemisphere, plane, sphere, and cylinder. The script should preprocess this data (filtering, centering, vertex search), fit the right model (sphere, plane, cylinder, or freeform), and then output the fitted parameters along with residuals. The outcomes I want are both numerical results (fit parameters and errors) and visualizations in 2D cross-sections and 3D surface plots. The input in my case is the measurement data from a sensor doing spiral scanning. So I have 3D point data (x, y, z) of the surface for different geometries like hemisphere, plane, sphere, and cylinder. The script should preprocess this data (filtering, centering, vertex search), fit the right model (sphere, plane, cylinder, or freeform), and then output the fitted parameters along with residuals. The outcomes I want are both numerical results (fit parameters and errors) and visualizations in 2D cross-sections and 3D surface plots. measurement, sensor, spiral, scan, preprocess, fit, residuals, 2d, 3d, surface MATLAB Answers — New Questions