Category: News
Why will MATLAB not start up properly on macOS?
Why will MATLAB not start up properly on my Mac?Why will MATLAB not start up properly on my Mac? Why will MATLAB not start up properly on my Mac? MATLAB Answers — New Questions
Find position of cell array within another cell array or table or in a structure
I have a number of nodes on a graph and a number of edges that connect them. Attached to each edge is a structure wear the first field is the EndNodes data from the edge table which defines the edges. I want to search the struct array to find the structure that matches the selected edge EndNodes but I can’t figure out the syntax. The closest I’ve come is something like this where EdgeData is the struct array and data is the 2×1 cell containing the desired EndNodes:
selectedEdge=EdgeData(ismember(data,array2table({app.EdgeData.EndNodes}).Var1))
This fails because the inputs of ismember must be character arrays rather than cell arrays containing character arrays. Concatenating them could work but I would then simply be detecting if the two names of the edges are present and not whether they are contained together within one field. I’ve tried ==, ismember, strcmp, isequal and I’ve run out of things to try and ideas of documentation to comb through. It’s possible that arrayfun might be the way forward but I don’t really understand it honestly
PS yes I’m using app designer hence the referencing of EdgeData as a propertyI have a number of nodes on a graph and a number of edges that connect them. Attached to each edge is a structure wear the first field is the EndNodes data from the edge table which defines the edges. I want to search the struct array to find the structure that matches the selected edge EndNodes but I can’t figure out the syntax. The closest I’ve come is something like this where EdgeData is the struct array and data is the 2×1 cell containing the desired EndNodes:
selectedEdge=EdgeData(ismember(data,array2table({app.EdgeData.EndNodes}).Var1))
This fails because the inputs of ismember must be character arrays rather than cell arrays containing character arrays. Concatenating them could work but I would then simply be detecting if the two names of the edges are present and not whether they are contained together within one field. I’ve tried ==, ismember, strcmp, isequal and I’ve run out of things to try and ideas of documentation to comb through. It’s possible that arrayfun might be the way forward but I don’t really understand it honestly
PS yes I’m using app designer hence the referencing of EdgeData as a property I have a number of nodes on a graph and a number of edges that connect them. Attached to each edge is a structure wear the first field is the EndNodes data from the edge table which defines the edges. I want to search the struct array to find the structure that matches the selected edge EndNodes but I can’t figure out the syntax. The closest I’ve come is something like this where EdgeData is the struct array and data is the 2×1 cell containing the desired EndNodes:
selectedEdge=EdgeData(ismember(data,array2table({app.EdgeData.EndNodes}).Var1))
This fails because the inputs of ismember must be character arrays rather than cell arrays containing character arrays. Concatenating them could work but I would then simply be detecting if the two names of the edges are present and not whether they are contained together within one field. I’ve tried ==, ismember, strcmp, isequal and I’ve run out of things to try and ideas of documentation to comb through. It’s possible that arrayfun might be the way forward but I don’t really understand it honestly
PS yes I’m using app designer hence the referencing of EdgeData as a property struct, structures, array, arrays, cell, cell array, cell arrays, ismember, table, data, string MATLAB Answers — New Questions
SharePoint Online Expands Version Expiration for Audio and Video Files
Specific Version Expiration for Large Files to Save Valuable SharePoint Storage Quota
In their 12 December 2025 announcement (MC1194603), Microsoft doesn’t explain why they are introducing specific version expiration for audio and video files, Reading between the lines, this is an initiative allied with the introduction of intelligent versioning in 2024 to save some expensive SharePoint Online storage quota by automatically removing versions of Office files that aren’t needed for restore.
This time, the focus is on removing audio and video files because these files tend to be large and any editing done generates versions (new files) of the same size or larger. Given that Clipchamp is now widely available to Microsoft 365 users and can store its output in SharePoint Online and OneDrive for Business, focusing on audio and video file versions seems like a good idea.
The update is rolling out now and should reach all tenants worldwide by mid-January 2026. Like the introduction of many other SharePoint Online controls in the past, the method to apply and manage the “version expiration policies” is cmdlets from the SharePoint Online management PowerShell module. (Microsoft.Online.SharePoint.PowerShell). Before starting, I updated the module to version 16.0.26712.12000 as instructed in MC1194603.
Automatic or Manual Versioning
Not every tenant has adopted the idea behind intelligent versioning. Essentially, intelligent versioning “trims” file versions that SharePoint Online doesn’t consider necessary for restores. Just in case, SharePoint Online keeps the marked versions around for a period, but when that period elapses, SharePoint Online removes the unnecessary file versions. The only problem is that the desire to remove unwanted versions runs contrary to a separate need for retention. If retention policies place holds on site information, SharePoint cannot remove the unwanted versions.
The value of automatic version expiration is easily understood by reviewing the version history of a file that is frequently edited. Take the example in Figure 1, now at version 512. Each version is 2 MB, so if 500 versions are retained, they occupy 1,000 MB. You can also see that intelligent versioning has marked some versions to be removed in the short term (11 days), others to be kept for longer, and others to never expire at present because these versions are needed for restore. Removing all the unwanted versions saves a lot of storage.

The alternative to intelligent versioning is the traditional method based on keeping file versions under a preset threshold. In other words, instruct SharePoint to keep file versions under a certain limit, like 500, and remove file versions when necessary to stay under the limit.
Automatic Configuration
Configuration for version expiration policies is possible at the tenant, site, and document library (list) level. For example, to configure automatic version expiration, use the Set-SPOTenant cmdlet. This command enables automatic trimming for video, audio, and PST files:
[array]$FileTypes = "Video", "Audio","OutlookPST" Set-SPOTenant -EnableAutoExpirationVersionTrim $true -FileTypesForVersionExpiration $FileTypes
The Set-SPOSite cmdlet controls the equivalent settings for a site. In this example, the switch to ensure that new document libraries comply with the policy is set:
$SiteURL = https://office365itpros.sharepoint.com/sites/BlogsAndProjects
Set-SPOSite -Identity $SiteURL -EnableAutoExpirationVersionTrim $true -FileTypesForVersionExpiration $FileTypes -ApplyToNewDocumentLibraries
Confirm
Are you sure you want to perform this action?
The setting for new document libraries takes effect immediately. Please run Get-SPOSite to check the newly set values
on properties EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersionLimit.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
Get-SPOSite -Identity $SiteURL | Format-Table EnableAutoExpirationVersionTrim, ExpireVersionsAfterDays, MajorVersionLimit
EnableAutoExpirationVersionTrim ExpireVersionsAfterDays MajorVersionLimit
------------------------------- ----------------------- -----------------
True
Finally, the Set-SPOLIstVersionPolicy cmdlet controls the setting for a document library:
Set-SPOListVersionPolicy -Site $SiteURL -List "Microsoft Press" -EnableAutoExpirationVersionTrim $true -FileTypes $FileTypes
Running the Get-SPOListVersionPolicy cmdlet afterwards shows the list of file types being managed in the VersionPolicyFileTypeOverride property.
Get-SPOListVersionPolicy -Site $SiteURL -List "Microsoft Press"
Changes made to policies affect future files, sites, and document libraries. To enforce the new settings on an existing document library, use the New-SPOListFileVersionBatchDeleteJob cmdlet to create a background job to process files:
New-SPOListFileVersionBatchDeleteJob -Site $SiteURL -List "Documents" -TrimUseListPolicy
Documentation Coming Soon
Microsoft says that “Before rollout, we will update this post with new documentation.” Apart from updated cmdlet documentation, no other words of wisdom about the use of file version expiration policies haven’t yet turned up, but I am sure that the documentation is on the way.
In the interim, as with any new feature that might impact compliance processes and procedures, it’s wise to review what file version expiration policies do and if they’ll work for you. Not everyone stores large audio and video files in document libraries and many of those files are never edited, so the question of file versions might not arise for your tenant. But if you’re in the business of working with audio and video files stored in SharePoint Online, as with Clipchamp, this feature could save your tenant some valuable SharePoint storage quota.
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.
exportgraphics does not save exactly what I see in the plot
Hi,
I am new to Matlab. Let me first explain what I want to do, and then my problem. First, I want to plot a line with two shaded intervals around it (basically, the impulse response with two confidence intervals). After reading some posts in this forum, I managed to do it (thanks a lot, Matlab community). Probably that is not the best way (I plot one shaded region over another), but it seems to work. Below I provide an example.
% Create values to plot
IR = [1 2 5; 5 3 8; 2 2 5]’;
INF = IR-0.50;
SUP = IR+0.50;
INF2 = IR-1;
SUP2 = IR+1;
% Define the rows and columns for the subplots (you choose)
row = 2;
col = 2;
% Define a timeline
nsteps = size(IR, 1);
steps = 1:1:nsteps;
x_axis = zeros(1,nsteps);
x = steps;
% Options for plot
opt_plot.marker = ‘o’;
opt_plot.linecol = [13, 54, 84]./255;
opt_plot.swathecol = [138, 178, 212]./255;
opt_plot.linewidth = 2;
opt_plot.alpha = 0.5;
opt_plot.marker_x = ‘–k’;
opt_plot.linewidth_x = 0.5;
FigSize(26, 24)
% var1
ii = 1;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,1);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var1′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var2
ii = 2;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,2);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var2′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var3
ii = 3;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,3);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var3′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
After runing it, I get the following plot in Matlab.
But when I use exportgraphics to export the plot in PDF format (by using the code below), it does not save exactly what I see in the plot.
% Save
exportgraphics(gcf,’example.pdf’, ‘ContentType’, ‘vector’);
clf(‘reset’)
To be more precise, the plot contains the two shaded intervals (as you can see in the image above), but exportgraphics saves a PDF file with only one shaded interval (image below).
Can anyone help me, please? Thanks in advance.Hi,
I am new to Matlab. Let me first explain what I want to do, and then my problem. First, I want to plot a line with two shaded intervals around it (basically, the impulse response with two confidence intervals). After reading some posts in this forum, I managed to do it (thanks a lot, Matlab community). Probably that is not the best way (I plot one shaded region over another), but it seems to work. Below I provide an example.
% Create values to plot
IR = [1 2 5; 5 3 8; 2 2 5]’;
INF = IR-0.50;
SUP = IR+0.50;
INF2 = IR-1;
SUP2 = IR+1;
% Define the rows and columns for the subplots (you choose)
row = 2;
col = 2;
% Define a timeline
nsteps = size(IR, 1);
steps = 1:1:nsteps;
x_axis = zeros(1,nsteps);
x = steps;
% Options for plot
opt_plot.marker = ‘o’;
opt_plot.linecol = [13, 54, 84]./255;
opt_plot.swathecol = [138, 178, 212]./255;
opt_plot.linewidth = 2;
opt_plot.alpha = 0.5;
opt_plot.marker_x = ‘–k’;
opt_plot.linewidth_x = 0.5;
FigSize(26, 24)
% var1
ii = 1;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,1);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var1′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var2
ii = 2;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,2);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var2′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var3
ii = 3;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,3);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var3′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
After runing it, I get the following plot in Matlab.
But when I use exportgraphics to export the plot in PDF format (by using the code below), it does not save exactly what I see in the plot.
% Save
exportgraphics(gcf,’example.pdf’, ‘ContentType’, ‘vector’);
clf(‘reset’)
To be more precise, the plot contains the two shaded intervals (as you can see in the image above), but exportgraphics saves a PDF file with only one shaded interval (image below).
Can anyone help me, please? Thanks in advance. Hi,
I am new to Matlab. Let me first explain what I want to do, and then my problem. First, I want to plot a line with two shaded intervals around it (basically, the impulse response with two confidence intervals). After reading some posts in this forum, I managed to do it (thanks a lot, Matlab community). Probably that is not the best way (I plot one shaded region over another), but it seems to work. Below I provide an example.
% Create values to plot
IR = [1 2 5; 5 3 8; 2 2 5]’;
INF = IR-0.50;
SUP = IR+0.50;
INF2 = IR-1;
SUP2 = IR+1;
% Define the rows and columns for the subplots (you choose)
row = 2;
col = 2;
% Define a timeline
nsteps = size(IR, 1);
steps = 1:1:nsteps;
x_axis = zeros(1,nsteps);
x = steps;
% Options for plot
opt_plot.marker = ‘o’;
opt_plot.linecol = [13, 54, 84]./255;
opt_plot.swathecol = [138, 178, 212]./255;
opt_plot.linewidth = 2;
opt_plot.alpha = 0.5;
opt_plot.marker_x = ‘–k’;
opt_plot.linewidth_x = 0.5;
FigSize(26, 24)
% var1
ii = 1;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,1);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var1′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var2
ii = 2;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,2);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var2′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
% var3
ii = 3;
y = IR(:,ii)’;
ci1_u = SUP(:,ii)’;
ci1_l = INF(:,ii)’;
ci2_u = SUP2(:,ii)’;
ci2_l = INF2(:,ii)’;
subplot(row,col,3);
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on
patch([x fliplr(x)], [ci1_l fliplr(ci1_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
patch([x fliplr(x)], [ci2_l fliplr(ci2_u)], opt_plot.swathecol, ‘FaceAlpha’, opt_plot.alpha, ‘EdgeColor’, ‘none’)
plot(x, y, ‘color’, opt_plot.linecol, ‘Marker’, opt_plot.marker, ‘MarkerFaceColor’, opt_plot.linecol, ‘LineWidth’, opt_plot.linewidth); hold on % the same code line as above
plot(x_axis, opt_plot.marker_x, ‘LineWidth’, opt_plot.linewidth_x); hold on
xlim([1 nsteps]);
title(‘var3′,’FontSize’,11);
set(gca, ‘Layer’, ‘top’);
After runing it, I get the following plot in Matlab.
But when I use exportgraphics to export the plot in PDF format (by using the code below), it does not save exactly what I see in the plot.
% Save
exportgraphics(gcf,’example.pdf’, ‘ContentType’, ‘vector’);
clf(‘reset’)
To be more precise, the plot contains the two shaded intervals (as you can see in the image above), but exportgraphics saves a PDF file with only one shaded interval (image below).
Can anyone help me, please? Thanks in advance. exportgraphics, shaded interval MATLAB Answers — New Questions
Will I be auto-billed for my License renewal or at the end of a Trial License period?
Will I be auto-billed for my License renewal or at the end of a Trial License period? Will I be auto-billed for my License renewal or at the end of a Trial License period? Will I be auto-billed for my License renewal or at the end of a Trial License period? MATLAB Answers — New Questions
How to download the certificate
Buenos días
Acabé el curso de Simulink Onramp en línea; pero no me deja descargar el certificado; al abrir nuevamente me sale 0% de realización. Si le coloco realizar el curso en línea si me sale el 100% realizado. Su gentil ayuda por favor.
Atentamente
Carlos Tomalá
Good morning. I finished the Simulink OnRamp online course, but I can’t download the certificate. When I open it again, it shows 0% completion. If I select "complete the course online," it shows 100% completion. Your kind assistance would be greatly appreciated.
Sincerely, Carlos TomaláBuenos días
Acabé el curso de Simulink Onramp en línea; pero no me deja descargar el certificado; al abrir nuevamente me sale 0% de realización. Si le coloco realizar el curso en línea si me sale el 100% realizado. Su gentil ayuda por favor.
Atentamente
Carlos Tomalá
Good morning. I finished the Simulink OnRamp online course, but I can’t download the certificate. When I open it again, it shows 0% completion. If I select "complete the course online," it shows 100% completion. Your kind assistance would be greatly appreciated.
Sincerely, Carlos Tomalá Buenos días
Acabé el curso de Simulink Onramp en línea; pero no me deja descargar el certificado; al abrir nuevamente me sale 0% de realización. Si le coloco realizar el curso en línea si me sale el 100% realizado. Su gentil ayuda por favor.
Atentamente
Carlos Tomalá
Good morning. I finished the Simulink OnRamp online course, but I can’t download the certificate. When I open it again, it shows 0% completion. If I select "complete the course online," it shows 100% completion. Your kind assistance would be greatly appreciated.
Sincerely, Carlos Tomalá certificado simulink MATLAB Answers — New Questions
Using fprintf for complex numbers
Hi, I have
Z1= sqrt(3) * exp((pi*i)/4)
Z2= 2 * exp((pi*i)/6)
Z3= sqrt(3) * exp((3*pi*i)/4)
Z4= 2 * exp(pi*i)
Z5= 2 * exp(-pi*i)
And I would like something like
Real Complex
Z1 1.2247 + 1.2247i
Z2 1.7321 + 1.0000i
Z3 -1.2247 + 1.2247i
Z4 -2.0000 + 0.0000i
Z5 -2.0000 – 0.0000i
Using fprintf, I would think…
Thanks for your help!Hi, I have
Z1= sqrt(3) * exp((pi*i)/4)
Z2= 2 * exp((pi*i)/6)
Z3= sqrt(3) * exp((3*pi*i)/4)
Z4= 2 * exp(pi*i)
Z5= 2 * exp(-pi*i)
And I would like something like
Real Complex
Z1 1.2247 + 1.2247i
Z2 1.7321 + 1.0000i
Z3 -1.2247 + 1.2247i
Z4 -2.0000 + 0.0000i
Z5 -2.0000 – 0.0000i
Using fprintf, I would think…
Thanks for your help! Hi, I have
Z1= sqrt(3) * exp((pi*i)/4)
Z2= 2 * exp((pi*i)/6)
Z3= sqrt(3) * exp((3*pi*i)/4)
Z4= 2 * exp(pi*i)
Z5= 2 * exp(-pi*i)
And I would like something like
Real Complex
Z1 1.2247 + 1.2247i
Z2 1.7321 + 1.0000i
Z3 -1.2247 + 1.2247i
Z4 -2.0000 + 0.0000i
Z5 -2.0000 – 0.0000i
Using fprintf, I would think…
Thanks for your help! fprintf print complex MATLAB Answers — New Questions
The calibrator app says the patterns are “too similar” even if they are not
I am trying to calibrate some images with a checkerbard calibration and the (single) Camera Calibrator app, but the app claims the patterns are "too similar" even if they are not. I know that they aren’t too smilar because I have a specular setting with another camera that works. Moreover, if you apply some sort of transformation to the images (sometimes flipping them upside down, sometimes mirroring them) the app works fine and calibrate.
The images can be downloaded from this repo. cam1 works fine. cam2 doesn’t work. cam2Rotated works fine.
Does anyone have an idea of what is wrong with these images?
Thanks for your help!I am trying to calibrate some images with a checkerbard calibration and the (single) Camera Calibrator app, but the app claims the patterns are "too similar" even if they are not. I know that they aren’t too smilar because I have a specular setting with another camera that works. Moreover, if you apply some sort of transformation to the images (sometimes flipping them upside down, sometimes mirroring them) the app works fine and calibrate.
The images can be downloaded from this repo. cam1 works fine. cam2 doesn’t work. cam2Rotated works fine.
Does anyone have an idea of what is wrong with these images?
Thanks for your help! I am trying to calibrate some images with a checkerbard calibration and the (single) Camera Calibrator app, but the app claims the patterns are "too similar" even if they are not. I know that they aren’t too smilar because I have a specular setting with another camera that works. Moreover, if you apply some sort of transformation to the images (sometimes flipping them upside down, sometimes mirroring them) the app works fine and calibrate.
The images can be downloaded from this repo. cam1 works fine. cam2 doesn’t work. cam2Rotated works fine.
Does anyone have an idea of what is wrong with these images?
Thanks for your help! calibration, camera MATLAB Answers — New Questions
Old Versions of Exchange ActiveSync Clients Get the Bullet
Microsoft to Customers: Use Exchange ActiveSync 16.1 or Later

The December 15, 2025 announcement (also posted as MC1197103) that Exchange Online will stop servicing Exchange ActiveSync (EAS) connections from email clients running a version older than 16.1 from March 1, 2026 is hardly unexpected. Microsoft has been steadily eliminating old components from Microsoft 365 workloads, and deciding to concentrate on one supported version (16.1, released in 2016) makes sense. You might notice higher protocol revision numbers for Exchange ActiveSync in Microsoft documentation, but server-side protocol updates don’t affect the client version.
Microsoft doesn’t control how or when companies that license the EAS protocol update their email clients. Apple has used version EAS 16.1 since iOS 10, and Microsoft says that Google and Samsung are updating their email clients to use EAS 16.1, but there are many older EAS clients still in use. The clients work today because Microsoft doesn’t currently enforce a minimum protocol requirement. However, once the requirement for 16,1 comes into force on March 1, 2026, the clients running an older version will be unable to download or send email or synchronize calendars.
Checking for Older Versions of Exchange ActiveSync
Because no one likes surprises, it’s wise to run the PowerShell command included in Microsoft’s blog to identify clients using older versions of EAS to connect to Exchange Online. One thing I noticed is that older clients can return a value like
EURPR04A002.prod.outlook.com/Microsoft Exchange Hosted Organizat
for the UserDisplayName property. This is obviously an artifact of some previous attempt to update the property with the display name of the device owner that didn’t quite work. However, if you check the Identity or DistinguishedName properties for the device, you’ll find the owner’s name there. For example, here’s what the identity for a device looks like:
james ryanExchangeActiveSyncDevicesiPhone§J3LGEB1EA55MPCMKJDBHQMELQS
Alternatively, use this version of the command:
Get-MobileDevice | Where-Object {($_.ClientType -eq 'EAS' -or $_.ClientType -match 'ActiveSync') -and ($_.ClientVersion -lt '16.1')} | Sort-Object ID | Select-Object ID, DeviceId, DeviceModelHopefully, any devices you find haven’t been used in quite some time and can safely be removed. Exchange Online does not remove obsolete device partnerships after users have moved on to new phones, so it’s a good idea to clean up obsolete mobile devices from Exchange Online periodically.
The Case for Outlook Mobile
The great thing about EAS is its simplicity and robustness. The downside is that EAS is a tad too simple to handle many scenarios. Microsoft’s interest in EAS faded quickly along with their OWA for Devices strategy for mobile device support for Exchange once they decided to buy the Acompli mobile client in November 2014.
Microsoft quickly rebranded Acompli as Outlook Mobile and adopted key aspects of the new client such the preprocessing of data on the server that made features like the focused inbox possible. The preprocessing originally used Amazon Web Services before Microsoft moved it to Azure in 2016. Preprocessing is core to the ability of the new Outlook for Windows client to deliver features to users whose mailboxes are on antiquated POP3 and IMAP4 servers. The synchronization of data from POP3 and IMAP4 servers for processing on Azure caused a lot of negative commentary some years ago, mostly from people who didn’t realize why functionality depended on the preprocessing. Outlook Mobile doesn’t use EAS, so it’s unaffected by the requirement for 16.1.
Given the availability of highly usable Outlook mobile clients for iOS and Android, apart from some edge cases, I don’t understand why Exchange Online users continue to use EAS clients when they can use Outlook Mobile.
I guess it’s important to facilitate choice and some are very committed to the Apple mail client (for example) and simply don’t want to change, even when they know that Microsoft will never invest in EAS to bring its support for functionality anywhere close to Outlook Mobile. And even if Microsoft dedicated the necessary engineering effort to create a new version of EAS, no commitment exists from EAS licensees to upgrade their email clients to take advantage of new features.
The Last Hurrah for Exchange ActiveSync
If Microsoft doesn’t create a new version of EAS, this might be the last round of email client updates for Exchange ActiveSync. EAS has had a good run, spanning from the days of BlackBerry dominance to the introduction of the iPhone to the massive expansion of smartphone and tablet usage. Over that period, successive versions of the EAS protocol have served users well. That audience has declined and continues to decline. How long it will last is anyone’s guess.
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.
How can you save a 1 by 3 array in each position of a 4D array?
I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array.I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array. I am working on an interpolation project where I have 4 variables, each representing a dimension of a 4D array. There are three seperate values that coincide with each coordinate of the 4 dimensional array. The only way I have been able to make this work so far is that I currently have 3 seperate 4D arrays, each with the same set of variables but with one of the 3 values stored at each coordinate. The issue is that this creates a lot of reduntanat data and significantly increases the file size, while also increasing the computational resource requirement by running the interpolation 3 seperate times. I would like to only have one 4D array, with each coordinate housing a 1×3 with all 3 data points needed. Is this possible? If so, what is the best approach? I have approached this using Cell arrays, but I still run into errors of trying to assign 1×3 in a 1×1 space or with trying to assign doubles in the cell array. array, cell array, matrices, double MATLAB Answers — New Questions
How to fit a set of data where one of the fitting parameters decays exponentially?
There are five parameters in the fitting function, we can first fix one of the parameters according to a general knowledge. reviously, we fitted multiple datasets (e.g., time-resolved spectra at different pump powers) independently. Now, we need to perform a global fit where the cavity linewidth (Γ_cav) must decay exponentially across all datasets. Our model is a two-coupled oscillator modeal, where the resonance energy and linewidth of emitters and cavity, and their coupling strength are obtained parameters. Could you advise on the general strategy for setting initial values in this case?Perhaps, could we implement a loop. In each iteration for a new dataset, the intial guess for the cavity linewidth (Γ_cav) would be perdicated on the exponential decay function using the parameters estimated fromthe already fitted datasets?There are five parameters in the fitting function, we can first fix one of the parameters according to a general knowledge. reviously, we fitted multiple datasets (e.g., time-resolved spectra at different pump powers) independently. Now, we need to perform a global fit where the cavity linewidth (Γ_cav) must decay exponentially across all datasets. Our model is a two-coupled oscillator modeal, where the resonance energy and linewidth of emitters and cavity, and their coupling strength are obtained parameters. Could you advise on the general strategy for setting initial values in this case?Perhaps, could we implement a loop. In each iteration for a new dataset, the intial guess for the cavity linewidth (Γ_cav) would be perdicated on the exponential decay function using the parameters estimated fromthe already fitted datasets? There are five parameters in the fitting function, we can first fix one of the parameters according to a general knowledge. reviously, we fitted multiple datasets (e.g., time-resolved spectra at different pump powers) independently. Now, we need to perform a global fit where the cavity linewidth (Γ_cav) must decay exponentially across all datasets. Our model is a two-coupled oscillator modeal, where the resonance energy and linewidth of emitters and cavity, and their coupling strength are obtained parameters. Could you advise on the general strategy for setting initial values in this case?Perhaps, could we implement a loop. In each iteration for a new dataset, the intial guess for the cavity linewidth (Γ_cav) would be perdicated on the exponential decay function using the parameters estimated fromthe already fitted datasets? transferred MATLAB Answers — New Questions
Is it possible to generate a Matlab script from a Simulink model?
Matlab provides a method for programmatically modifying or generating Simulink models ( https://www.mathworks.com/help/simulink/ug/approach-modeling-programmatically.html ).
I have a large collection of Simulink models that I would like to convert into scripts which, when executed, would then re-generate the orginal (or functionally equivalent) model. In effect, I want a way to seemlessly convert between .slx files and a text-based representation. Does Matlab provide a utility that does this?Matlab provides a method for programmatically modifying or generating Simulink models ( https://www.mathworks.com/help/simulink/ug/approach-modeling-programmatically.html ).
I have a large collection of Simulink models that I would like to convert into scripts which, when executed, would then re-generate the orginal (or functionally equivalent) model. In effect, I want a way to seemlessly convert between .slx files and a text-based representation. Does Matlab provide a utility that does this? Matlab provides a method for programmatically modifying or generating Simulink models ( https://www.mathworks.com/help/simulink/ug/approach-modeling-programmatically.html ).
I have a large collection of Simulink models that I would like to convert into scripts which, when executed, would then re-generate the orginal (or functionally equivalent) model. In effect, I want a way to seemlessly convert between .slx files and a text-based representation. Does Matlab provide a utility that does this? simulink MATLAB Answers — New Questions
Microsoft Baseline Security Mode Rolls Out
Baseline Security Mode Configures Entra ID, Office, SharePoint Online, Exchange Online, and Teams
Message center notification MC1193689 (10 December 2025) announces that Microsoft is rolling out the general availability release of Baseline security mode to commercial tenants, with deployment scheduled for completion by late January 2026. Government tenants will get Baseline security mode in January 2026.
In a nutshell, Baseline security mode is a collection of suggested security configurations for important Microsoft 365 services that can be managed from the Microsoft 365 admin center. Administrators can already configure the settings using PowerShell or in different admin centers, but it’s so much easier when administrators can go to one place to see the suggested settings and make whatever changes they think are appopriate. The suggested settings reflect Microsoft’s experience in securing workloads and closing off holes that might be exploited by attackers. Microsoft calls the settings “minimum security benchmark recommendations.”
Accessing Baseline Security Mode
To access the suggested security configurations, open the Org Settings section of the Microsoft 365 admin center, and then choose the Security & privacy tab. You’ll then see a set of default policies and the option to automatically apply these policies (Figure 1).

Automatic application is a good step for inexperienced tenant administrators because it covers issues that should be closed off in every tenant. More experienced administrators should select the Manage all policies option to allow them to manage individual policy settings (12 authentication, 6 files, and 2 for Teams Rooms devices).
Managing Policy Settings
In many cases, applying a recommended policy is as simple as setting a check box to perform actions such as blocking the HTTP and FTP protocols for file opens, blocking access to Exchange Web Services (EWS), or blocking ActiveX controls for Office documents. Apart from gaining more control over policies, administrators can see details of what might be impacted by changing a setting.
Interestingly, this is how I discovered that the Microsoft Office app (AppId d3590ed6-52b3-4102-aeff-aad2292ab01c) still uses EWS to fetch details about Microsoft 365 groups. I disabled EWS and Outlook (classic) could no longer fetch details of unseen counts or group settings. Oh well, I doubt many people still use Outlook classic to interact with mail-centric groups (aka Outlook groups), so disabling the protocol is no big deal. Seriously, check the version numbers for applications posted here before disabling EWS. Losing access to Outlook groups shouldn’t matter too much, but losing access to free/busy information might make people unhappy.
Updating other policies might involve more than switching a setting value. Several require changes to Entra ID policies that deserve more discussion. Take the suggestion to block new password credentials in Entra ID apps (Figure 2). Making this policy effective involves updating the tenant default app management policy to block the ability of app owners to add new passwords (app secrets) to their apps.

The thing is that my tenant has a customized app management policy created using PowerShell. The custom policy blocks app secrets (also blocked in the default app management policy). Although Baseline security mode detected the presence of the custom policy, it didn’t check if the policy blocks app secrets and so meets the requirement.
Recommendations Implemented Through Conditional Access Policies
Another example is the recommendation to block authentication requests that use legacy authentication protocols. This is a good thing to do, and the block is implemented via a Microsoft-managed conditional access policy (Figure 3).

Notice that many of the settings are grayed out. The only things an administrator can do with a Microsoft-managed conditional access policy are set its state (in this case, to set it from Report-only to either On or Off) and manage the excluded identities list (for instance, to add exclusions for break glass accounts).
The Require phishing resistant authentication for administrators suggestion also uses a Microsoft-managed conditional access policy to require accounts holding any of 19 defined administrative roles to use a phishing-resistant authentication method to connect (for example, matching numbers in the Microsoft Authenticator app or a passkey).
My tenant hadn’t received any Microsoft-managed conditional access policies until now (December 8 to be precise). When Microsoft announced the roll out of these policies, they said that only eligible tenants would receive them. I guess that the advent of Baseline security mode changed the definition of eligibility.
Conditional access policies are certainly a great way to impose security restrictions on a tenant. However, it’s easy to get into a mess with conditional access policies, so care must be taken before introducing a new policy to ensure that it doesn’t interfere with existing policies.
All changes made to bring tenant settings into line with the recommendations of the Base security mode are captured in audit records.
A Good Baseline
I don’t have any Teams Rooms devices, so I didn’t check the two settings available to secure these objects. Apart from the caveats expressed above, the first iteration of the Base security mode is solid and should prove useful to many tenants, and might even prompt some experienced administrators into doing something to improve their tenant’s security.
How can I get 3 outputs from the battery ?
Post Content Post Content battery, simulink, simulation, vehicle, power_electronics_control, battery_system_management MATLAB Answers — New Questions
I saw R2025b update2 on the download page , but can’t receive it in the software notification? Even when I manually check for it.
I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong?I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong? I saw R2025b update2 on the download page
but can’t receive it in the software notification
Is there anything wrong? update2 MATLAB Answers — New Questions
I want to suppress: useCS = logical 1 in command window
This "spam" repeats over and over in the command window. I want to suppress this.
useCS =
logical
1
useCS =
logical
1This "spam" repeats over and over in the command window. I want to suppress this.
useCS =
logical
1
useCS =
logical
1 This "spam" repeats over and over in the command window. I want to suppress this.
useCS =
logical
1
useCS =
logical
1 command window, usecs, missing semicolon MATLAB Answers — New Questions
Simulink Piezoelectric generator with boost converter failed to converge
I’m building a piezoelectric generator with boost converter for my assignment and I’m trying to create a feedback loop by using the capacitor voltage to control the switch for boost converter. The model works fine when the switch is disconnected, or controlled using a pulse generator, but it stops working when I connect the switch to the capacitor voltage. Any idea how to fix this?
The fullwave rectifier and piezoelectric generator is mostly following the design from this example model. https://www.mathworks.com/help/sps/ug/piezo-bender-energy-harvester.htmlI’m building a piezoelectric generator with boost converter for my assignment and I’m trying to create a feedback loop by using the capacitor voltage to control the switch for boost converter. The model works fine when the switch is disconnected, or controlled using a pulse generator, but it stops working when I connect the switch to the capacitor voltage. Any idea how to fix this?
The fullwave rectifier and piezoelectric generator is mostly following the design from this example model. https://www.mathworks.com/help/sps/ug/piezo-bender-energy-harvester.html I’m building a piezoelectric generator with boost converter for my assignment and I’m trying to create a feedback loop by using the capacitor voltage to control the switch for boost converter. The model works fine when the switch is disconnected, or controlled using a pulse generator, but it stops working when I connect the switch to the capacitor voltage. Any idea how to fix this?
The fullwave rectifier and piezoelectric generator is mostly following the design from this example model. https://www.mathworks.com/help/sps/ug/piezo-bender-energy-harvester.html boost converter, piezoelectric generator, powered electronics MATLAB Answers — New Questions
Friends, how to distribute the torque of four motors on VCU, is there any learning material for this?
Friends, how to distribute the torque of four motors on VCU, is there any learning material for this?Friends, how to distribute the torque of four motors on VCU, is there any learning material for this? Friends, how to distribute the torque of four motors on VCU, is there any learning material for this? four motor MATLAB Answers — New Questions
convolution integral with ode45
Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you!Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you! Hi guys, can someone help me solve this equation of motion using ode45 or any other way? I dont know how to approach the convolution integral. Thank you! convolution, ode45, sdof, damped eom MATLAB Answers — New Questions
How to find the real roots and index root?
syms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positivesyms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positive syms x m y M %H R_c R_a p R
%—————————————————
%Initilization
%—————————————————
U=zeros(1,’sym’);
A=zeros(1,’sym’);
B=zeros(1,’sym’);
C=zeros(1,’sym’);
D=zeros(1,’sym’);
E=zeros(1,’sym’);
F=zeros(1,’sym’);
series(x)=sym(zeros(1,1));
%—————————————————
%Parameters
%—————————————————
l=0.5;
%M=0.5;
H=0.5;
R_c=0.5;
R_a=0.25;
p=0.8;
R=0.25
%—————————————————
%Initial condition
%—————————————————
U(1)=y
U(2)=0
for i=1:14
U(i+2)=m;
A(1)=0;
B(1)=0;
C(1)=0;
for j=1:i
A(1)=A(1)+U(j)*(i-j+1)*(i-j+2)*U(i-j+3);
B(1)=B(1)+j*U(j+1)*(i-j+1)*U(i-j+2);
C(1)=C(1)+U(j)*U(i-j+1);
end
variable_m=(1+4*R_c)*i*(i+1)*U(i+2)+l*A(1)+l*B(1)-R_a*C(1)-M*(1-p)*U(i)-H*U(i)-R*U(i);
variable=solve(variable_m,m);
U(i+2)=variable;
end
for k=1:6
series(x)=simplify(series(x)+U(k)*(power(x,k-1)));
end
series
e1=subs(series,x,1);
e2=e1-1
root=solve(e2,y)
var2 = vpa(root)
%%%%%%%%%%%%%%%%%%%%%%%%HOW TO FIND THE REAL ROOT %%%%%%%%%%%%%%%%%%%
series_M=subs(series, y,root(1))
Fin_efficiency=int(series_M,x,0,1)
var = vpa(Fin_efficiency)
M=0:5
row=0;
eta=zeros(length(M))
for i=1:length(M)
row=row+1
eta(row)=var(M(row))
end
plot(M,eta)
%—————————————————————————————–
the following error apper where the error remaining
Array indices must be positive integers or logical values.
Error in indexing (line 936)
R_tilde = builtin(‘subsref’,L_tilde,Idx);
But the indices are positive root and index issue MATLAB Answers — New Questions









