Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/News

Category: News

Material property assignment in electromagnetic solve
Matlab News

Material property assignment in electromagnetic solve

PuTI / 2025-07-23

In the following scritp I continue to get errors about the material assignemnt.
clear; close all; clc;
% ===== PHYSICAL PARAMETERS =====
lambda = 785e-9; % Wavelength [m]
omega = 2*pi*3e8/lambda; % Angular frequency [rad/s]
eps0 = 8.8541878128e-12; % Vacuum permittivity [F/m]
% ===== MATERIAL PROPERTIES =====
eps_au = (-24.051 + 1.3i) + 25; % Gold permittivity (shifted to Re(ε)>0)
eps_sio2 = 2.25; % SiO2 relative permittivity
% ===== CREATE MODEL =====
model = createpde(‘electromagnetic’,’harmonic’);
model.VacuumPermittivity = eps0;
% ===== GEOMETRY DEFINITION =====
% SiO2 substrate (500nm x 100nm)
rect_sio2 = [3;4; 0;500e-9;500e-9;0; 0;0;100e-9;100e-9];
% Air gap (500nm x 5nm, starting at y=100nm)
gap_y_start = 100e-9;
gap_height = 5e-9;
rect_air = [3;4; 0;500e-9;500e-9;0; …
gap_y_start+1e-12; gap_y_start+1e-12; … % Slightly offset to avoid overlap
gap_y_start+gap_height-1e-12; gap_y_start+gap_height-1e-12];
% Gold nanoparticle (radius 50nm at x=250nm, y=149nm)
circ = [1;250e-9;149e-9;50e-9; zeros(6,1)];
% Combine geometry with constructive solid geometry
gd = [rect_sio2, rect_air, circ];
ns = char(‘sio2′,’airgap’,’gold’)’;
sf = ‘(sio2 + airgap) + gold’; % Proper CSG formula
dl = decsg(gd,sf,ns);
geometryFromEdges(model, dl);
% ===== VISUALIZE FACE LABELS (CRUCIAL STEP) =====
figure;
pdegplot(model,’FaceLabels’,’on’,’EdgeLabels’,’on’);
title(‘Geometry Face Labels’);
axis equal;
% ===== MATERIAL ASSIGNMENT =====
% Assign properties based on face numbers from plot
% NOTE: Face numbers may differ – adjust based on pdegplot output!
electromagneticProperties(model,’Face’,1,’RelativePermittivity’,eps_sio2,…
‘RelativePermeability’,1,’Conductivity’,0); % SiO2
electromagneticProperties(model,’Face’,2,’RelativePermittivity’,1,…
‘RelativePermeability’,1,’Conductivity’,0); % Air
electromagneticProperties(model,’Face’,3,’RelativePermittivity’,eps_au,…
‘RelativePermeability’,1,’Conductivity’,0); % Gold
% ===== BOUNDARY CONDITIONS =====
k_spp = 2*pi/lambda * sqrt(eps_au/(1 + eps_au));
jsFun = @(location,~) exp(1i * k_spp * location.x);
electromagneticBC(model,’Edge’,1,’SurfaceCurrentDensity’,jsFun); % SPP excitation
electromagneticBC(model,’Edge’,[2,4],’FarField’,’absorbing’,…
‘Thickness’,lambda/4); % Absorbing BCs
% ===== MESH GENERATION =====
generateMesh(model,…
‘Hmax’,lambda/20, …
‘Hmin’,gap_height/2, …
‘Hgrad’,1.3, …
‘GeometricOrder’,’linear’);
figure;
pdemesh(model);
title(‘Mesh’);
axis equal;
% ===== SOLVE & VISUALIZE =====
result = solve(model,’Frequency’,omega);
E = result.ElectricField;
Emag = sqrt(abs(E.Ex).^2 + abs(E.Ey).^2 + abs(E.Ez).^2);
figure;
pdeplot(model,’XYData’,Emag,’ColorMap’,’jet’,’Mesh’,’off’);
title(‘Electric Field Magnitude |E|’);
colorbar;
axis equal;In the following scritp I continue to get errors about the material assignemnt.
clear; close all; clc;
% ===== PHYSICAL PARAMETERS =====
lambda = 785e-9; % Wavelength [m]
omega = 2*pi*3e8/lambda; % Angular frequency [rad/s]
eps0 = 8.8541878128e-12; % Vacuum permittivity [F/m]
% ===== MATERIAL PROPERTIES =====
eps_au = (-24.051 + 1.3i) + 25; % Gold permittivity (shifted to Re(ε)>0)
eps_sio2 = 2.25; % SiO2 relative permittivity
% ===== CREATE MODEL =====
model = createpde(‘electromagnetic’,’harmonic’);
model.VacuumPermittivity = eps0;
% ===== GEOMETRY DEFINITION =====
% SiO2 substrate (500nm x 100nm)
rect_sio2 = [3;4; 0;500e-9;500e-9;0; 0;0;100e-9;100e-9];
% Air gap (500nm x 5nm, starting at y=100nm)
gap_y_start = 100e-9;
gap_height = 5e-9;
rect_air = [3;4; 0;500e-9;500e-9;0; …
gap_y_start+1e-12; gap_y_start+1e-12; … % Slightly offset to avoid overlap
gap_y_start+gap_height-1e-12; gap_y_start+gap_height-1e-12];
% Gold nanoparticle (radius 50nm at x=250nm, y=149nm)
circ = [1;250e-9;149e-9;50e-9; zeros(6,1)];
% Combine geometry with constructive solid geometry
gd = [rect_sio2, rect_air, circ];
ns = char(‘sio2′,’airgap’,’gold’)’;
sf = ‘(sio2 + airgap) + gold’; % Proper CSG formula
dl = decsg(gd,sf,ns);
geometryFromEdges(model, dl);
% ===== VISUALIZE FACE LABELS (CRUCIAL STEP) =====
figure;
pdegplot(model,’FaceLabels’,’on’,’EdgeLabels’,’on’);
title(‘Geometry Face Labels’);
axis equal;
% ===== MATERIAL ASSIGNMENT =====
% Assign properties based on face numbers from plot
% NOTE: Face numbers may differ – adjust based on pdegplot output!
electromagneticProperties(model,’Face’,1,’RelativePermittivity’,eps_sio2,…
‘RelativePermeability’,1,’Conductivity’,0); % SiO2
electromagneticProperties(model,’Face’,2,’RelativePermittivity’,1,…
‘RelativePermeability’,1,’Conductivity’,0); % Air
electromagneticProperties(model,’Face’,3,’RelativePermittivity’,eps_au,…
‘RelativePermeability’,1,’Conductivity’,0); % Gold
% ===== BOUNDARY CONDITIONS =====
k_spp = 2*pi/lambda * sqrt(eps_au/(1 + eps_au));
jsFun = @(location,~) exp(1i * k_spp * location.x);
electromagneticBC(model,’Edge’,1,’SurfaceCurrentDensity’,jsFun); % SPP excitation
electromagneticBC(model,’Edge’,[2,4],’FarField’,’absorbing’,…
‘Thickness’,lambda/4); % Absorbing BCs
% ===== MESH GENERATION =====
generateMesh(model,…
‘Hmax’,lambda/20, …
‘Hmin’,gap_height/2, …
‘Hgrad’,1.3, …
‘GeometricOrder’,’linear’);
figure;
pdemesh(model);
title(‘Mesh’);
axis equal;
% ===== SOLVE & VISUALIZE =====
result = solve(model,’Frequency’,omega);
E = result.ElectricField;
Emag = sqrt(abs(E.Ex).^2 + abs(E.Ey).^2 + abs(E.Ez).^2);
figure;
pdeplot(model,’XYData’,Emag,’ColorMap’,’jet’,’Mesh’,’off’);
title(‘Electric Field Magnitude |E|’);
colorbar;
axis equal; In the following scritp I continue to get errors about the material assignemnt.
clear; close all; clc;
% ===== PHYSICAL PARAMETERS =====
lambda = 785e-9; % Wavelength [m]
omega = 2*pi*3e8/lambda; % Angular frequency [rad/s]
eps0 = 8.8541878128e-12; % Vacuum permittivity [F/m]
% ===== MATERIAL PROPERTIES =====
eps_au = (-24.051 + 1.3i) + 25; % Gold permittivity (shifted to Re(ε)>0)
eps_sio2 = 2.25; % SiO2 relative permittivity
% ===== CREATE MODEL =====
model = createpde(‘electromagnetic’,’harmonic’);
model.VacuumPermittivity = eps0;
% ===== GEOMETRY DEFINITION =====
% SiO2 substrate (500nm x 100nm)
rect_sio2 = [3;4; 0;500e-9;500e-9;0; 0;0;100e-9;100e-9];
% Air gap (500nm x 5nm, starting at y=100nm)
gap_y_start = 100e-9;
gap_height = 5e-9;
rect_air = [3;4; 0;500e-9;500e-9;0; …
gap_y_start+1e-12; gap_y_start+1e-12; … % Slightly offset to avoid overlap
gap_y_start+gap_height-1e-12; gap_y_start+gap_height-1e-12];
% Gold nanoparticle (radius 50nm at x=250nm, y=149nm)
circ = [1;250e-9;149e-9;50e-9; zeros(6,1)];
% Combine geometry with constructive solid geometry
gd = [rect_sio2, rect_air, circ];
ns = char(‘sio2′,’airgap’,’gold’)’;
sf = ‘(sio2 + airgap) + gold’; % Proper CSG formula
dl = decsg(gd,sf,ns);
geometryFromEdges(model, dl);
% ===== VISUALIZE FACE LABELS (CRUCIAL STEP) =====
figure;
pdegplot(model,’FaceLabels’,’on’,’EdgeLabels’,’on’);
title(‘Geometry Face Labels’);
axis equal;
% ===== MATERIAL ASSIGNMENT =====
% Assign properties based on face numbers from plot
% NOTE: Face numbers may differ – adjust based on pdegplot output!
electromagneticProperties(model,’Face’,1,’RelativePermittivity’,eps_sio2,…
‘RelativePermeability’,1,’Conductivity’,0); % SiO2
electromagneticProperties(model,’Face’,2,’RelativePermittivity’,1,…
‘RelativePermeability’,1,’Conductivity’,0); % Air
electromagneticProperties(model,’Face’,3,’RelativePermittivity’,eps_au,…
‘RelativePermeability’,1,’Conductivity’,0); % Gold
% ===== BOUNDARY CONDITIONS =====
k_spp = 2*pi/lambda * sqrt(eps_au/(1 + eps_au));
jsFun = @(location,~) exp(1i * k_spp * location.x);
electromagneticBC(model,’Edge’,1,’SurfaceCurrentDensity’,jsFun); % SPP excitation
electromagneticBC(model,’Edge’,[2,4],’FarField’,’absorbing’,…
‘Thickness’,lambda/4); % Absorbing BCs
% ===== MESH GENERATION =====
generateMesh(model,…
‘Hmax’,lambda/20, …
‘Hmin’,gap_height/2, …
‘Hgrad’,1.3, …
‘GeometricOrder’,’linear’);
figure;
pdemesh(model);
title(‘Mesh’);
axis equal;
% ===== SOLVE & VISUALIZE =====
result = solve(model,’Frequency’,omega);
E = result.ElectricField;
Emag = sqrt(abs(E.Ex).^2 + abs(E.Ey).^2 + abs(E.Ez).^2);
figure;
pdeplot(model,’XYData’,Emag,’ColorMap’,’jet’,’Mesh’,’off’);
title(‘Electric Field Magnitude |E|’);
colorbar;
axis equal; pde, electromagnetic model, properties MATLAB Answers — New Questions

​

Details pane missing in 2025a
Matlab News

Details pane missing in 2025a

PuTI / 2025-07-23

I have just installed 2025a and the details pane in the main command window is missing. I can’t find the setting to restore it. It’s reall y useful to load single variables from mat files and add other variables so I really miss it! Attached image shows it in 2024bI have just installed 2025a and the details pane in the main command window is missing. I can’t find the setting to restore it. It’s reall y useful to load single variables from mat files and add other variables so I really miss it! Attached image shows it in 2024b I have just installed 2025a and the details pane in the main command window is missing. I can’t find the setting to restore it. It’s reall y useful to load single variables from mat files and add other variables so I really miss it! Attached image shows it in 2024b details pane, r2025a complaints MATLAB Answers — New Questions

​

Issue transposing a matrix inside of a timeseries
Matlab News

Issue transposing a matrix inside of a timeseries

PuTI / 2025-07-23

Hello everyone,

Im trying to transpose a matrix defined inside of a timeseries:
Rk = timeseries(parentDataset.reflectometry.density’, parentDataset.reflectometry.time);

parentDataset.reflectometry.density is a 7×1 matrix that I need to transpose to become 1×7 however its returning a 1x1x7. I tried using squeeze, reshape or permute to no avail.
I also tried transposing the matrix before feeding it inside the timeseries but I’m also meeting the same issue.
What really confuses me is that when parentDataset.reflectometry.density is a 1×7, transposing it actually returns a 7×1 matrix (and returns 2 when checking wiht ndims).

How can i fix this? And what am I misunderstnading?

Thanks for any help!Hello everyone,

Im trying to transpose a matrix defined inside of a timeseries:
Rk = timeseries(parentDataset.reflectometry.density’, parentDataset.reflectometry.time);

parentDataset.reflectometry.density is a 7×1 matrix that I need to transpose to become 1×7 however its returning a 1x1x7. I tried using squeeze, reshape or permute to no avail.
I also tried transposing the matrix before feeding it inside the timeseries but I’m also meeting the same issue.
What really confuses me is that when parentDataset.reflectometry.density is a 1×7, transposing it actually returns a 7×1 matrix (and returns 2 when checking wiht ndims).

How can i fix this? And what am I misunderstnading?

Thanks for any help! Hello everyone,

Im trying to transpose a matrix defined inside of a timeseries:
Rk = timeseries(parentDataset.reflectometry.density’, parentDataset.reflectometry.time);

parentDataset.reflectometry.density is a 7×1 matrix that I need to transpose to become 1×7 however its returning a 1x1x7. I tried using squeeze, reshape or permute to no avail.
I also tried transposing the matrix before feeding it inside the timeseries but I’m also meeting the same issue.
What really confuses me is that when parentDataset.reflectometry.density is a 1×7, transposing it actually returns a 7×1 matrix (and returns 2 when checking wiht ndims).

How can i fix this? And what am I misunderstnading?

Thanks for any help! matlab MATLAB Answers — New Questions

​

Adding external files to Matlab Compiler app in R2025a
Matlab News

Adding external files to Matlab Compiler app in R2025a

PuTI / 2025-07-23

Unfortunately I had to upgrade to R2025a recently and have been hugely disppointed by what seems like a massive regression in the app compiling workflow using Matlab Compiler. In R2024a, which I was using before, I was confident I could have got my app packaged up in 15 minutes, with R2025a I’ve been battling with it for over a day and still finding it troublesome. Has anyone else had experience using this on a complex project?
This huge change is not adequately covered in Release Notes nor in product help, but now you have to have a Matlab project in order to compile using the app. I’ve never used projects before (they seemed to offer nothing for our work style) so already this was a big change. But they have serious restrictions compared to past versions too.
It seems to accept code not being under the project folder no problem, which is a relief as I have a large repository of code that is used and I can’t put it all under a project directory. However, I also use dlls, some icons, etc and in the past I could simply add these to the ‘Files required for your application to run’ section of the compiler. They would end up in the exact same relative location on the user’s machine so my functions that use relative paths to read them worked fine in deployed apps too.
But now, in R2025 the ‘Custom requirements’ section of ‘Files required for Standalone to run’ insists on any file that is added being under the project folder. This means I have to take a copy of dlls, icons, etc and put them there. But these files get unpacked to a completely different location on the target machine, so any code that expects these to exist in a certain relative folder location breaks.
I can use ctfroot to take me to the parent folder where the app is deployed, but not the specific app folder under that, so I have to search around under that folder to find my dlls in some subfolder.
This is a fundamental change from R2024a and I am very disappointed by such a massive regression in the workflow. Matlab has always been excellent at backwards compatibility in almost every area, but this has made what used to be a relatively efficient process into something that is a struggle to make work at all.Unfortunately I had to upgrade to R2025a recently and have been hugely disppointed by what seems like a massive regression in the app compiling workflow using Matlab Compiler. In R2024a, which I was using before, I was confident I could have got my app packaged up in 15 minutes, with R2025a I’ve been battling with it for over a day and still finding it troublesome. Has anyone else had experience using this on a complex project?
This huge change is not adequately covered in Release Notes nor in product help, but now you have to have a Matlab project in order to compile using the app. I’ve never used projects before (they seemed to offer nothing for our work style) so already this was a big change. But they have serious restrictions compared to past versions too.
It seems to accept code not being under the project folder no problem, which is a relief as I have a large repository of code that is used and I can’t put it all under a project directory. However, I also use dlls, some icons, etc and in the past I could simply add these to the ‘Files required for your application to run’ section of the compiler. They would end up in the exact same relative location on the user’s machine so my functions that use relative paths to read them worked fine in deployed apps too.
But now, in R2025 the ‘Custom requirements’ section of ‘Files required for Standalone to run’ insists on any file that is added being under the project folder. This means I have to take a copy of dlls, icons, etc and put them there. But these files get unpacked to a completely different location on the target machine, so any code that expects these to exist in a certain relative folder location breaks.
I can use ctfroot to take me to the parent folder where the app is deployed, but not the specific app folder under that, so I have to search around under that folder to find my dlls in some subfolder.
This is a fundamental change from R2024a and I am very disappointed by such a massive regression in the workflow. Matlab has always been excellent at backwards compatibility in almost every area, but this has made what used to be a relatively efficient process into something that is a struggle to make work at all. Unfortunately I had to upgrade to R2025a recently and have been hugely disppointed by what seems like a massive regression in the app compiling workflow using Matlab Compiler. In R2024a, which I was using before, I was confident I could have got my app packaged up in 15 minutes, with R2025a I’ve been battling with it for over a day and still finding it troublesome. Has anyone else had experience using this on a complex project?
This huge change is not adequately covered in Release Notes nor in product help, but now you have to have a Matlab project in order to compile using the app. I’ve never used projects before (they seemed to offer nothing for our work style) so already this was a big change. But they have serious restrictions compared to past versions too.
It seems to accept code not being under the project folder no problem, which is a relief as I have a large repository of code that is used and I can’t put it all under a project directory. However, I also use dlls, some icons, etc and in the past I could simply add these to the ‘Files required for your application to run’ section of the compiler. They would end up in the exact same relative location on the user’s machine so my functions that use relative paths to read them worked fine in deployed apps too.
But now, in R2025 the ‘Custom requirements’ section of ‘Files required for Standalone to run’ insists on any file that is added being under the project folder. This means I have to take a copy of dlls, icons, etc and put them there. But these files get unpacked to a completely different location on the target machine, so any code that expects these to exist in a certain relative folder location breaks.
I can use ctfroot to take me to the parent folder where the app is deployed, but not the specific app folder under that, so I have to search around under that folder to find my dlls in some subfolder.
This is a fundamental change from R2024a and I am very disappointed by such a massive regression in the workflow. Matlab has always been excellent at backwards compatibility in almost every area, but this has made what used to be a relatively efficient process into something that is a struggle to make work at all. compiler, projects MATLAB Answers — New Questions

​

How to Remove Members from Microsoft 365 Groups with PowerShell
News

How to Remove Members from Microsoft 365 Groups with PowerShell

Tony Redmond / 2025-07-23

Removing Members from Groups Can be Complicated

Recently, I discussed how to use Microsoft Graph PowerShell SDK cmdlets to copy the memberships of Entra ID groups from one user to another. I commented that in some cases you might want to remove the memberships for the source user but left that code to the reader to develop and incorporate into the script.

Within an hour of publication, I received a couple of messages asking how to remove users from group memberships. It’s a fair question because the cmdlets used for the task differ across group types. Specifically:

  • For Microsoft 365 and security groups, use the Remove-MgGroupMemberByRef cmdlet from the Microsoft Graph PowerShell SDK. At least, that’s the facile answer. As explained below, the real answer is more complicated.
  • For distribution lists and mail-enabled security groups, use the Remove-DistributionGroupMember cmdlet from the Exchange Online management module.

Some ask why the membership of mail-enabled security groups is managed using Exchange cmdlets. The answer lies in the mail-enabled nature of these groups. Because they are mail-enabled, their source directory is the Exchange ExODS (Exchange Online Directory Store) rather than Entra ID. Synchronization and dual-write updates keep the two directories in step.

In any case, removing a user account from a distribution list or mail-enabled security group is straightforward:

Remove-DistributionGroupMember -Identity $GroupId -Member $UserId -Confirm:$false -ErrorAction Stop
Write-Host ("User {0} removed from distribution list {1}" -f $TargetDisplayName, $GroupDisplayName) -ForegroundColor Yellow

Why Things are More Complicated with Microsoft 365 Groups

Because of the need to respect how group ownership works, things are a little more complex with Microsoft 365 groups, including the groups used for Teams, and Viva Engage. The rules are:

  • If you remove a member, you must check if the account is a group owner. If so, you remove the group owner first and then remove the member.
  • However, if the account is the only group owner, you can’t remove them because this would leave the group in an ownerless state.

The Microsoft 365 administrative portals don’t permit the removal of the last owner and insist that groups have at least one owner. It’s possible that groups get into an ownerless state if the account of the last owner is deleted. At that point, the groups ownership governance policy can attempt to find a new owner (if the tenant has Entra P1 licenses) or you can write a PowerShell script to look for a new owner.

Code to Remove Members from Microsoft 365 Groups

The logic for removing a group member is therefore:

  • Use the Get-MgGroupOwner cmdlet to fetch the set of group owners and check the set to see if the member being deleted is a group owner.
  • If yes, and the number of owners is one, exit.
  • If yes, and more than one owner exists, run the Remove-MgGroupOwnerByRef cmdlet to remove the owner first and then run the Remove-MgGroupMemberByRef cmdlet to remove the member.

The usual approach for this kind of processing is to create a function, so here’s an example of a function that takes the user identifier, group identifier, and group display name as parameters (the latter is purely for output purposes) to process the removal of a user account from a Microsoft 365 group or security group:

function Remove-UserFromM365Group {
# Remove a user account from a Microsoft 365 group, checking if the user is an owner first. 
# If the user is an owner and they are not the last owner,
# the function removes the user from as both an owner and a member of the group.
    param (
        [Parameter(Mandatory = $true)]
        [string]$UserId,
        [Parameter(Mandatory = $true)]
        [string]$GroupId,
         [Parameter(Mandatory = $true)]
        [string]$GroupName
    )
    
    $Outcome = $null
    [array]$Owners = Get-MgGroupOwner -GroupId $GroupId | Select-Object -ExpandProperty Id
    if ($UserId -in $Owners) {
        if ($Owners.count -eq 1) {
            Write-Host ("The {0} group has only one owner - can't remove the last owner" -f $GroupDisplayName) -Foregroundcolor Red
            $Outcome = "Failed - can't remove the last owner of a group"
            return $Outcome
        }
        Write-Host ("User {0} is an owner of group {1} - removing both owner and member links" -f $TargetDisplayName, $GroupDisplayName) -ForegroundColor Yellow
        try {
            Remove-MgGroupOwnerByRef -DirectoryObjectId $UserId -GroupId $GroupId
        } catch {
            Write-Host ("Failed to remove user {0} as owner from group {1}: {2}" -f $TargetDisplayName, $GroupDisplayName, $_.Exception.Message) -ForegroundColor Red
            $Outcome = "Failed to remove owner"
            return $Outcome
        }
    }
    try {
        Remove-MgGroupMemberByRef -DirectoryObjectId $UserId -GroupId $GroupId
    } catch {
        Write-Host ("Failed to remove user {0} as member from group {1}: {2}" -f $TargetDisplayName, $GroupDisplayName, $_.Exception.Message) -ForegroundColor Red
        $Outcome = "Failed to remove member"
        return $Outcome
    }

    $Outcome = ("User {0} removed from group {1}" -f $SourceDisplayName, $GroupDIsplayName)
    return $Outcome
}

Better PowerShell developers than I could probably tidy the function, but the code works and demonstrates the principles behind removing members from a Microsoft 365 group (or security group), which is what I set out to do. I’ve updated the original script in GitHub, and you can download the complete code from the Office 365 for IT Pros repository.

Figure 1 shows how to run the script, specifying a source account, a target account, and a Boolean parameter controlling whether to remove the transferred memberships from the source account.

Copying (and removing) group memberships.Removing members from groups.
Figure 1: Copying (and removing) group memberships

Removing Members from Groups Requires Knowledge

The question about removing group memberships is a great example of why it’s important to understand the technology and how Microsoft 365 really works before attempting to automate operations. Many blogs give partial answers. Without knowledge, you can’t fill in the gaps to create a complete answer, which is why we have the Office 365 for IT Pros eBook including the companion Automating Microsoft 365 PowerShell eBook.


Need some assistance to write and manage PowerShell scripts for Microsoft 365? 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.

 

Wrong number of Edges/Faces after .stl-Import with fegeometry
Matlab News

Wrong number of Edges/Faces after .stl-Import with fegeometry

PuTI / 2025-07-22

When I create a femodel-Object from an existing .stl-file, some edges/faces get lost and I don’t know how/why/where. My original 3D-model looks like this:

However, when I create the femodel with
geometryFile = ‘Pilz.stl’;
geometryFile = fegeometry(geometryFile);
the edges from two of the four opposite faces tangent to the clyinder part of the mushroom get lost, see below picture:

I need these four faces to apply a FaceLoad later on, but F3 in this case is not just the flat area but also the two rounded faces up to the edge of F1.
I’m guessing it is not a problem with the .stl-file itself, because I’ve varied the width of the flat areas up to the point where the cylinder part is basically a square, but MATLAB still only recognizes 4 faces around the circumference.
How do I get MATLAB or the fegeometry function to recognize the missing Faces like so:?

Thanks in advance!When I create a femodel-Object from an existing .stl-file, some edges/faces get lost and I don’t know how/why/where. My original 3D-model looks like this:

However, when I create the femodel with
geometryFile = ‘Pilz.stl’;
geometryFile = fegeometry(geometryFile);
the edges from two of the four opposite faces tangent to the clyinder part of the mushroom get lost, see below picture:

I need these four faces to apply a FaceLoad later on, but F3 in this case is not just the flat area but also the two rounded faces up to the edge of F1.
I’m guessing it is not a problem with the .stl-file itself, because I’ve varied the width of the flat areas up to the point where the cylinder part is basically a square, but MATLAB still only recognizes 4 faces around the circumference.
How do I get MATLAB or the fegeometry function to recognize the missing Faces like so:?

Thanks in advance! When I create a femodel-Object from an existing .stl-file, some edges/faces get lost and I don’t know how/why/where. My original 3D-model looks like this:

However, when I create the femodel with
geometryFile = ‘Pilz.stl’;
geometryFile = fegeometry(geometryFile);
the edges from two of the four opposite faces tangent to the clyinder part of the mushroom get lost, see below picture:

I need these four faces to apply a FaceLoad later on, but F3 in this case is not just the flat area but also the two rounded faces up to the edge of F1.
I’m guessing it is not a problem with the .stl-file itself, because I’ve varied the width of the flat areas up to the point where the cylinder part is basically a square, but MATLAB still only recognizes 4 faces around the circumference.
How do I get MATLAB or the fegeometry function to recognize the missing Faces like so:?

Thanks in advance! femodel, stl, 3d, edges, mesh MATLAB Answers — New Questions

​

Clustering using Gower’s Distance
Matlab News

Clustering using Gower’s Distance

PuTI / 2025-07-22

Hello all, I have a dataset that includes both categorical and numerical features, and I’m looking to perform clustering on it. I’ve read that Gower’s Distance (code is available) is suitable for handling mixed data types. However, I am getting an "isnan" error. How can I fix the problem? Thanks for the help.
DataSet = readtable("Test.xlsx", ‘ReadVariableNames’, true);
GowerDst = gower(DataSet);
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst);

Error using isnan
Invalid data type. Argument must be numeric, char, or logical.
Error in kmedoids (line 220)
wasnan = any(isnan(X),2);
^^^^^^^^
Error in Gower_Distance (line 9)
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst);Hello all, I have a dataset that includes both categorical and numerical features, and I’m looking to perform clustering on it. I’ve read that Gower’s Distance (code is available) is suitable for handling mixed data types. However, I am getting an "isnan" error. How can I fix the problem? Thanks for the help.
DataSet = readtable("Test.xlsx", ‘ReadVariableNames’, true);
GowerDst = gower(DataSet);
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst);

Error using isnan
Invalid data type. Argument must be numeric, char, or logical.
Error in kmedoids (line 220)
wasnan = any(isnan(X),2);
^^^^^^^^
Error in Gower_Distance (line 9)
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst); Hello all, I have a dataset that includes both categorical and numerical features, and I’m looking to perform clustering on it. I’ve read that Gower’s Distance (code is available) is suitable for handling mixed data types. However, I am getting an "isnan" error. How can I fix the problem? Thanks for the help.
DataSet = readtable("Test.xlsx", ‘ReadVariableNames’, true);
GowerDst = gower(DataSet);
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst);

Error using isnan
Invalid data type. Argument must be numeric, char, or logical.
Error in kmedoids (line 220)
wasnan = any(isnan(X),2);
^^^^^^^^
Error in Gower_Distance (line 9)
[Idx, C] = kmedoids(DataSet, 2, ‘Distance’, GowerDst); gower’s distance, clustering MATLAB Answers — New Questions

​

No results from calculations in the command window
Matlab News

No results from calculations in the command window

PuTI / 2025-07-22

Hi there,
For some reason I am not getting any output results in the command window. I click on run and no results appear in the command window from my script. Nor, is there any results in the workspace – even though there a lots of calculations. I have restarted my computer and still there is no change. The last thing I was doing was trying to create a MATLAB function. Also, in the editor tab the option to create a new scipt is faded out. So I can’t access a new script. I have been using MATLAB online for months and I have never experienced this problem or any problem like it.
I am very confused and I do not know what is going wrong!
I hope someone can help?
Many thanks,
ScottHi there,
For some reason I am not getting any output results in the command window. I click on run and no results appear in the command window from my script. Nor, is there any results in the workspace – even though there a lots of calculations. I have restarted my computer and still there is no change. The last thing I was doing was trying to create a MATLAB function. Also, in the editor tab the option to create a new scipt is faded out. So I can’t access a new script. I have been using MATLAB online for months and I have never experienced this problem or any problem like it.
I am very confused and I do not know what is going wrong!
I hope someone can help?
Many thanks,
Scott Hi there,
For some reason I am not getting any output results in the command window. I click on run and no results appear in the command window from my script. Nor, is there any results in the workspace – even though there a lots of calculations. I have restarted my computer and still there is no change. The last thing I was doing was trying to create a MATLAB function. Also, in the editor tab the option to create a new scipt is faded out. So I can’t access a new script. I have been using MATLAB online for months and I have never experienced this problem or any problem like it.
I am very confused and I do not know what is going wrong!
I hope someone can help?
Many thanks,
Scott error, command window MATLAB Answers — New Questions

​

How to fix: Index Exceeds Matrix Dimensions
Matlab News

How to fix: Index Exceeds Matrix Dimensions

PuTI / 2025-07-22

clear
clc
clf
%***************************************************
% constants
rad=pi/180;
eps0=8.85e-12;
mu0=4*pi*1e-7;
eta0=sqrt(mu0/eps0); % free space
c=1/sqrt(eps0*mu0);
%***************************************************
% variables
d=2.5e-3; % thickness of the sample
f1=1e9; df=9e6; f2=10e9; Nf=floor((f2-f1)/df)+1; % frequency range and
% load raw data
M1r = csvread(‘sample.dat’,4); % Read the data
P1r = csvread(‘sample1.dat’,2); % Read the data
P2r = csvread(‘sample2.dat’,2); % Read the data
Mag1=M1r(:,2);
Mag2=M1r(:,3);
Ph1=-unwrap(P1r(:,2),180);
Ph2=-unwrap(P2r(:,2),180);
%*****************************************
% freqyency loop begin
for it=1:Nf
f=f1+(it-1)*df;
Fr(it)=f;
Fghz(it)=f/1e9;
fghz=f/1e9;
Z0=eta0; W=2*pi*Fr(it); beta0=W/c;
%*******************************************
% combine magnitude and phase of the S11 and S21
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);………………………………………………..error Index exceeds matrix dimensions.
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);
T(it)=Mag2(it)*exp(j*Ph2(it)*rad);
% m loop begin
Max=0; % ———m value set up
itt=0;
for m=-Max:Max
itt=itt+1;
%***************************************************
% using formulas from Robust method
Tp=T(it);
Z21(it)=sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
Z22(it)=-sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
expinkd1(it)=Tp/(1-R(it)*(Z21(it)-1)/(Z21(it)+1));
expinkd2(it)=Tp/(1-R(it)*(Z22(it)-1)/(Z22(it)+1));
if abs(real(Z21(it)))>=0.005 & real(Z21(it))>=0
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))>=0.005 & real(Z21(it))<0
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))<=1
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))>1
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
ni(it)=-1/(beta0*d)*j*real(log(expinkd(it))); % imag of n
nr(it,itt)=1/(beta0*d)*(imag(log(expinkd(it)))+2*m*pi); %real of n
n2(it,itt)=nr(it,itt)+ni(it);
Er2(it,itt)=n2(it,itt)/Z2(it);
Mr2(it,itt)=n2(it,itt)*Z2(it);
end % end of m loop
end % end of frequency loopclear
clc
clf
%***************************************************
% constants
rad=pi/180;
eps0=8.85e-12;
mu0=4*pi*1e-7;
eta0=sqrt(mu0/eps0); % free space
c=1/sqrt(eps0*mu0);
%***************************************************
% variables
d=2.5e-3; % thickness of the sample
f1=1e9; df=9e6; f2=10e9; Nf=floor((f2-f1)/df)+1; % frequency range and
% load raw data
M1r = csvread(‘sample.dat’,4); % Read the data
P1r = csvread(‘sample1.dat’,2); % Read the data
P2r = csvread(‘sample2.dat’,2); % Read the data
Mag1=M1r(:,2);
Mag2=M1r(:,3);
Ph1=-unwrap(P1r(:,2),180);
Ph2=-unwrap(P2r(:,2),180);
%*****************************************
% freqyency loop begin
for it=1:Nf
f=f1+(it-1)*df;
Fr(it)=f;
Fghz(it)=f/1e9;
fghz=f/1e9;
Z0=eta0; W=2*pi*Fr(it); beta0=W/c;
%*******************************************
% combine magnitude and phase of the S11 and S21
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);………………………………………………..error Index exceeds matrix dimensions.
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);
T(it)=Mag2(it)*exp(j*Ph2(it)*rad);
% m loop begin
Max=0; % ———m value set up
itt=0;
for m=-Max:Max
itt=itt+1;
%***************************************************
% using formulas from Robust method
Tp=T(it);
Z21(it)=sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
Z22(it)=-sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
expinkd1(it)=Tp/(1-R(it)*(Z21(it)-1)/(Z21(it)+1));
expinkd2(it)=Tp/(1-R(it)*(Z22(it)-1)/(Z22(it)+1));
if abs(real(Z21(it)))>=0.005 & real(Z21(it))>=0
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))>=0.005 & real(Z21(it))<0
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))<=1
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))>1
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
ni(it)=-1/(beta0*d)*j*real(log(expinkd(it))); % imag of n
nr(it,itt)=1/(beta0*d)*(imag(log(expinkd(it)))+2*m*pi); %real of n
n2(it,itt)=nr(it,itt)+ni(it);
Er2(it,itt)=n2(it,itt)/Z2(it);
Mr2(it,itt)=n2(it,itt)*Z2(it);
end % end of m loop
end % end of frequency loop clear
clc
clf
%***************************************************
% constants
rad=pi/180;
eps0=8.85e-12;
mu0=4*pi*1e-7;
eta0=sqrt(mu0/eps0); % free space
c=1/sqrt(eps0*mu0);
%***************************************************
% variables
d=2.5e-3; % thickness of the sample
f1=1e9; df=9e6; f2=10e9; Nf=floor((f2-f1)/df)+1; % frequency range and
% load raw data
M1r = csvread(‘sample.dat’,4); % Read the data
P1r = csvread(‘sample1.dat’,2); % Read the data
P2r = csvread(‘sample2.dat’,2); % Read the data
Mag1=M1r(:,2);
Mag2=M1r(:,3);
Ph1=-unwrap(P1r(:,2),180);
Ph2=-unwrap(P2r(:,2),180);
%*****************************************
% freqyency loop begin
for it=1:Nf
f=f1+(it-1)*df;
Fr(it)=f;
Fghz(it)=f/1e9;
fghz=f/1e9;
Z0=eta0; W=2*pi*Fr(it); beta0=W/c;
%*******************************************
% combine magnitude and phase of the S11 and S21
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);………………………………………………..error Index exceeds matrix dimensions.
R(it)=Mag1(it)*exp(j*Ph1(it)*rad);
T(it)=Mag2(it)*exp(j*Ph2(it)*rad);
% m loop begin
Max=0; % ———m value set up
itt=0;
for m=-Max:Max
itt=itt+1;
%***************************************************
% using formulas from Robust method
Tp=T(it);
Z21(it)=sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
Z22(it)=-sqrt(((1+R(it))^2-Tp^2)/((1-R(it))^2-Tp^2));
expinkd1(it)=Tp/(1-R(it)*(Z21(it)-1)/(Z21(it)+1));
expinkd2(it)=Tp/(1-R(it)*(Z22(it)-1)/(Z22(it)+1));
if abs(real(Z21(it)))>=0.005 & real(Z21(it))>=0
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))>=0.005 & real(Z21(it))<0
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))<=1
expinkd(it)=expinkd1(it);
Z2(it)=Z21(it);
end
if abs(real(Z21(it)))<0.005 & abs(expinkd1(it))>1
expinkd(it)=expinkd2(it);
Z2(it)=Z22(it);
end
ni(it)=-1/(beta0*d)*j*real(log(expinkd(it))); % imag of n
nr(it,itt)=1/(beta0*d)*(imag(log(expinkd(it)))+2*m*pi); %real of n
n2(it,itt)=nr(it,itt)+ni(it);
Er2(it,itt)=n2(it,itt)/Z2(it);
Mr2(it,itt)=n2(it,itt)*Z2(it);
end % end of m loop
end % end of frequency loop index exceeds matrix dimensions. error in check2 (line 37) r(it)=mag1(it)*exp(j*ph1(it)*rad) MATLAB Answers — New Questions

​

Be Careful with Retention Labels Configured with Created Date Expiration
News

Be Careful with Retention Labels Configured with Created Date Expiration

Tony Redmond / 2025-07-22

Older Files With Long Retention Periods Might Disappear Unexpectedly

Microsoft introduced retention policies and retention labels as part of its Office 365 Data Governance Framework in April 2017. These components are part of the Purview Data Lifecycle Management solution now. Capabilities have evolved a lot since 2017 in areas like special auto-label policies for “cloudy” attachments, disposition reviews, and the use of trainable classifiers, but the basics remain the same. Retention policies or retention labels track how old items are and when those items reach a threshold, a retention action happens. Often, the action is to delete the item.

Which brings me to a puzzling experience I had a few weeks ago when spreadsheets that I use to track various topics disappeared. The items that I noticed all came from my OneDrive for Business account, and when I checked there, I found the items in the first stage recycle bin. The question was what action moved the items into the recycle bin.

Old Retention Labels Might Have Simple Settings

The answer was simple. When Microsoft introduced retention labels and policies, I created a batch of labels and started to use them to manage content. At the time, things were simpler, and retention operated on creation date. Today, you can choose for retention to operate on the basis of the last modified date, which is the setting I use in more recently-created retention labels. Monitoring the last modified date is better because it means that files that remain in active use are not removed by retention processing, which is probably what you want.

The retention label applied to the disappeared files had a long retention period (Figure 1) but counted the retention period from the created date. It just so happened that all the files that ended up in the recycle bin were created in early 2015 and had therefore reached the end of the retention period. The next time Purview processed OneDrive, it duly noted the fact and took the retention action to move the files into the recycle bin.

Settings for a retention label.
Figure 1: Settings for a retention label

Mystery Solved

The mystery of why my files suddenly disappeared from view was solved, but there’s a serious lesson to be learned here. It is quite likely that other Microsoft 365 tenants have retention policies or labels that operate on a “when created” rather than “last modified” basis. Checking the created date for files is very effective at clearing out old material but falls down when that material, although old, is still in active use.

The problem is that you can’t simply update a retention label to change its retention settings. You can change the retention period to increase or decrease the number of days for Purview to retain an item, but you cannot change “when created” to “last modified.” Increasing the retention period is a pragmatic way to solve the immediate problem, but it means that some files that should be removed will stay around for longer, and that’s a bad thing in an era when AI tools cheerfully consume even the oldest and most outdated information to generate responses.

A better long-term solution is to replace old retention labels with updated versions that use the last modified date. This article explains how to use the Get-MgDriveItemRetentionLabel cmdlet from the Microsoft Graph PowerShell SDK to read the retention label applied to files and the Update-MgDriveItemRetentionLabel to apply a replacement label (the same cmdlet can apply a default retention label to a folder). Another Practical365.com article looks at some of the business reasons why it might be necessary to replace retention labels on files, including a script to do the job.

Solving the Problem in Code

In my case, I took the script I wrote to report files stored in a OneDrive for Business account and ran it to identify what retention labels are applied to files in OneDrive. I then created a replacement retention label with the same retention period but with modified date as the test for retention. Finally, I copied the reporting script and modified the function that reads retention label data to look for the label (or labels) to replace and called the Update-MgDriveItemRetentionLabel cmdlet to assign the new label. You can download the script from the Office 365 for IT Pros GitHub repository.

Unfortunately, the gods of scripting (or APIs) intervened and the underlying Graph API developed a problem when updating labels. The same issue surfaced in the SharePoint PnP module. I’ve reported the problem and hope that Microsoft solve the issue soon. In the meantime, I updated the retention labels manually for several important files to make sure that Purview wouldn’t remove them. It’s disappointing that the script doesn’t work at present, but it will in the future.


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.

 

Matlab freezes on startup
Matlab News

Matlab freezes on startup

PuTI / 2025-07-21

Hello all ,Matlab freezes on startup. It opens a file named dos.m, and from that point, I can neither run any script, set the path, nor even navigate to a folder. any idea ?Hello all ,Matlab freezes on startup. It opens a file named dos.m, and from that point, I can neither run any script, set the path, nor even navigate to a folder. any idea ? Hello all ,Matlab freezes on startup. It opens a file named dos.m, and from that point, I can neither run any script, set the path, nor even navigate to a folder. any idea ? transferred MATLAB Answers — New Questions

​

Dictionary to std::unordered_map in a mex file
Matlab News

Dictionary to std::unordered_map in a mex file

PuTI / 2025-07-21

I am using some c++ code with mex. I would like to pass in a dictionary of parameters, do some computation and create some vectors, and then return the results as a dictionary. Something like the following:
// test_mex.cpp
#include "mex.h"

void mexFunction(int N_output, mxArray *output[], int N_input, const mxArray *input[]) {
// Check input
if (N_input != 1) {
mexErrMsgIdAndTxt("MyClass:InvalidInput", "One input required.");
}
if (!mxIsClass(input[0], "dictionary")) {
mexErrMsgIdAndTxt("MATLAB:invalidInput", "Input must be a dictionary.");
}

// Convert to a std::unordered_map
std::unordered_map<std::string, double> params = input[0];

// Compute
std::unordered_map<std::string, std::vector<double>> out;
out["C"] = std::vector<double>(params["A"], 1.0);

// Convert back to a dictionary and return
output[0] = out;
}
Called with:
mex test_mex; test_mex(dictionary(["A", "B"], {100, 1020}));I am using some c++ code with mex. I would like to pass in a dictionary of parameters, do some computation and create some vectors, and then return the results as a dictionary. Something like the following:
// test_mex.cpp
#include "mex.h"

void mexFunction(int N_output, mxArray *output[], int N_input, const mxArray *input[]) {
// Check input
if (N_input != 1) {
mexErrMsgIdAndTxt("MyClass:InvalidInput", "One input required.");
}
if (!mxIsClass(input[0], "dictionary")) {
mexErrMsgIdAndTxt("MATLAB:invalidInput", "Input must be a dictionary.");
}

// Convert to a std::unordered_map
std::unordered_map<std::string, double> params = input[0];

// Compute
std::unordered_map<std::string, std::vector<double>> out;
out["C"] = std::vector<double>(params["A"], 1.0);

// Convert back to a dictionary and return
output[0] = out;
}
Called with:
mex test_mex; test_mex(dictionary(["A", "B"], {100, 1020})); I am using some c++ code with mex. I would like to pass in a dictionary of parameters, do some computation and create some vectors, and then return the results as a dictionary. Something like the following:
// test_mex.cpp
#include "mex.h"

void mexFunction(int N_output, mxArray *output[], int N_input, const mxArray *input[]) {
// Check input
if (N_input != 1) {
mexErrMsgIdAndTxt("MyClass:InvalidInput", "One input required.");
}
if (!mxIsClass(input[0], "dictionary")) {
mexErrMsgIdAndTxt("MATLAB:invalidInput", "Input must be a dictionary.");
}

// Convert to a std::unordered_map
std::unordered_map<std::string, double> params = input[0];

// Compute
std::unordered_map<std::string, std::vector<double>> out;
out["C"] = std::vector<double>(params["A"], 1.0);

// Convert back to a dictionary and return
output[0] = out;
}
Called with:
mex test_mex; test_mex(dictionary(["A", "B"], {100, 1020})); mex, dictionary MATLAB Answers — New Questions

​

How to have smithPlot with outer area with white colour?
Matlab News

How to have smithPlot with outer area with white colour?

PuTI / 2025-07-21

Hi
I was using this code for years giving me perfectly fine smith plots with white colour )inner, outer and background).
figure
sm = smithplot(gca);
hold on

% Set the background color of the outer area to white
ax = gca;
set(gcf, ‘Color’, ‘white’);

% Rest of your code
sm.ArcTickLabelVisible = 0;
sm.CircleTickLabelVisible = 0;
sm.Marker = {‘+’};
sm.GridBackgroundColor = ‘w’;
sm.TitleTopFontSizeMultiplier = 1.75;
sm.GridLineWidth = 1;
I recently upgraded to MATLAB R2024a, and same code gives me smith plot with grau outer area, although I command for a white one.
Any recommnedation on this ?
ThanksHi
I was using this code for years giving me perfectly fine smith plots with white colour )inner, outer and background).
figure
sm = smithplot(gca);
hold on

% Set the background color of the outer area to white
ax = gca;
set(gcf, ‘Color’, ‘white’);

% Rest of your code
sm.ArcTickLabelVisible = 0;
sm.CircleTickLabelVisible = 0;
sm.Marker = {‘+’};
sm.GridBackgroundColor = ‘w’;
sm.TitleTopFontSizeMultiplier = 1.75;
sm.GridLineWidth = 1;
I recently upgraded to MATLAB R2024a, and same code gives me smith plot with grau outer area, although I command for a white one.
Any recommnedation on this ?
Thanks Hi
I was using this code for years giving me perfectly fine smith plots with white colour )inner, outer and background).
figure
sm = smithplot(gca);
hold on

% Set the background color of the outer area to white
ax = gca;
set(gcf, ‘Color’, ‘white’);

% Rest of your code
sm.ArcTickLabelVisible = 0;
sm.CircleTickLabelVisible = 0;
sm.Marker = {‘+’};
sm.GridBackgroundColor = ‘w’;
sm.TitleTopFontSizeMultiplier = 1.75;
sm.GridLineWidth = 1;
I recently upgraded to MATLAB R2024a, and same code gives me smith plot with grau outer area, although I command for a white one.
Any recommnedation on this ?
Thanks smithplot, figure, rf MATLAB Answers — New Questions

​

Why is the smoothing effect of【 pcolor() shading interp 】worse on 2025a than the old version 2023b
Matlab News

Why is the smoothing effect of【 pcolor() shading interp 】worse on 2025a than the old version 2023b

PuTI / 2025-07-21

When I updated the latest 2025a, I tried to draw a picture with pcolor() and found that pixel blocks appeared on the picture drawn by the 2025a version, but not in the 2023b version, so I was a little confused why?
The code is as follows,and the data package and operation results are shown in the attachment
clc;clear;close all
load(‘test.mat’)
figure;
figWidth = 14;
figHeight = figWidth * (10 – (-5)) / (160 – 130);
set(gcf, ‘Units’, ‘centimeters’, ‘Position’, [10 10 figWidth figHeight]);
set(gcf, ‘Color’, ‘white’, ‘InvertHardcopy’, ‘off’);
h = pcolor(a, b, d);
shading interp
set(h, ‘EdgeColor’, ‘none’)
caxis([-1.2 1.2])
set(gca, ‘YDir’, ‘reverse’,’TickDir’,’out’, ‘FontSize’, 8, ‘Box’, ‘on’,’FontName’,’Arial’)
colorbar(‘Location’, ‘eastoutside’,’FontName’,’Arial’,’FontWeight’,’normal’);
exportgraphics(gca,’test.pdf’,’BackgroundColor’,’none’,’ContentType’,’vector’,’Resolution’,600)
close allWhen I updated the latest 2025a, I tried to draw a picture with pcolor() and found that pixel blocks appeared on the picture drawn by the 2025a version, but not in the 2023b version, so I was a little confused why?
The code is as follows,and the data package and operation results are shown in the attachment
clc;clear;close all
load(‘test.mat’)
figure;
figWidth = 14;
figHeight = figWidth * (10 – (-5)) / (160 – 130);
set(gcf, ‘Units’, ‘centimeters’, ‘Position’, [10 10 figWidth figHeight]);
set(gcf, ‘Color’, ‘white’, ‘InvertHardcopy’, ‘off’);
h = pcolor(a, b, d);
shading interp
set(h, ‘EdgeColor’, ‘none’)
caxis([-1.2 1.2])
set(gca, ‘YDir’, ‘reverse’,’TickDir’,’out’, ‘FontSize’, 8, ‘Box’, ‘on’,’FontName’,’Arial’)
colorbar(‘Location’, ‘eastoutside’,’FontName’,’Arial’,’FontWeight’,’normal’);
exportgraphics(gca,’test.pdf’,’BackgroundColor’,’none’,’ContentType’,’vector’,’Resolution’,600)
close all When I updated the latest 2025a, I tried to draw a picture with pcolor() and found that pixel blocks appeared on the picture drawn by the 2025a version, but not in the 2023b version, so I was a little confused why?
The code is as follows,and the data package and operation results are shown in the attachment
clc;clear;close all
load(‘test.mat’)
figure;
figWidth = 14;
figHeight = figWidth * (10 – (-5)) / (160 – 130);
set(gcf, ‘Units’, ‘centimeters’, ‘Position’, [10 10 figWidth figHeight]);
set(gcf, ‘Color’, ‘white’, ‘InvertHardcopy’, ‘off’);
h = pcolor(a, b, d);
shading interp
set(h, ‘EdgeColor’, ‘none’)
caxis([-1.2 1.2])
set(gca, ‘YDir’, ‘reverse’,’TickDir’,’out’, ‘FontSize’, 8, ‘Box’, ‘on’,’FontName’,’Arial’)
colorbar(‘Location’, ‘eastoutside’,’FontName’,’Arial’,’FontWeight’,’normal’);
exportgraphics(gca,’test.pdf’,’BackgroundColor’,’none’,’ContentType’,’vector’,’Resolution’,600)
close all pcolor, resolution MATLAB Answers — New Questions

​

How to leave a Microsoft family group – Microsoft Support
Microsoft News

How to leave a Microsoft family group – Microsoft Support

PuTI / 2025-07-21

How to remove members from your family group when you’re on your PC, including adult and child accounts.

​ 

Changes Coming to Smoothen Edges in Microsoft Authenticator App
News

Changes Coming to Smoothen Edges in Microsoft Authenticator App

Tony Redmond / 2025-07-21

Better Use of Number Matching and a Refined First Run Experience

Microsoft Authenticator app

The developers of the Microsoft Authenticator app have certainly been busy recently. Following on their announcement that a September 2025 update will make backup and restore easier, we now have the news released in message center notification MC1117816 (18 July 2025) that an update around the same time to simplify the sign-in experience and improve onboarding for users.

Modified Number Matching

In 2022, Microsoft added number matching to the Microsoft Authenticator app to reduce “MFA fatigue,” a symptom that can happen when users are asked to approve a stream of multifactor authentication challenges and can do so with a simple click. If a user responds with a series of clicks (without too much thinking), it makes it easier for an attacker to slip a bad challenge into the stream. Displaying a number and asking the user to match the number from a set of choices forces the user to pay attention. If they don’t, they probably won’t satisfy the challenge. Number matching became generally available in May 2023.

Good as number matching is at seizing user attention, it can sometimes run into difficulties. The most obvious is when Authenticator responds to a sign-in request for an app running on the app. The notification that a response is necessary can appear over the sign-in screen, meaning that the user can’t see the number they need to enter to satisfy the response.

To solve the problem, Microsoft is replacing the number choice with a simple yes or no. The experience is seamless on Android because all apps will pick up the new mechanism. On iOS, users of the Single Sign On (SSO) plug-in will still need to switch to the Authenticator app to complete the sign-in, but number matching won’t be required.

Users signing in from another device will still use number matching to satisfy the multifactor authentication challenge.

I have not seen the change in action, but I am familiar with the issue that Microsoft is attempting to solve. Indeed, so many notifications can pop-up on a busy device that tracking down authentication requests can be challenging. Anything that’s done to smoothen the user experience will be welcome.

Improving the First-Run Experience (FRX)

Microsoft is also making changes to the initial setup of the Authenticator app to give Entra ID accounts priority over personal accounts. I think this makes sense. The more that can be done to make multifactor authentication seamless for Entra ID users, the better the chances of driving the adoption of multifactor authentication in Microsoft 365 tenants. Attackers still target vulnerable accounts with techniques like password sprays.

According to Microsoft, 99.9% of compromised Entra ID accounts don’t use multifactor authentication. That figure should be sobering enough for any tenant administrator to take immediate action to improve their security stance by insisting that all user accounts are protected with multifactor authentication.

And if the Microsoft Authenticator app is easier for people to use, the resistance to moving from more traditional methods of satisfying challenges, like SMS, will be reduced. Some nagging is likely still needed (here’s a script to help) to convince tenant users to adopt strong multifactor authentication methods, but anything to remove barriers is a good idea.

Microsoft also says that they plan to make the option to scan a QR code more obvious. Again, this is goodness because many sites use QR codes as part of the multifactor authentication enrolment process.

Not Big Changes

Neither of the changes described here are in the category of earthshattering updates. Instead, the changes refine how the Microsoft Authenticator app works to make it easier for the average person to use. That’s a good thing, and I look forward to seeing the changes appear in September 2025.


Support the work of the Office 365 for IT Pros team by subscribing to the Office 365 for IT Pros eBook. Your support pays for the time we need to track, analyze, and document the changing world of Microsoft 365 and Office 365. Only humans contribute to our work!

 

Why Matlab in 2025, instead of Julia etc.?
Matlab News

Why Matlab in 2025, instead of Julia etc.?

PuTI / 2025-07-20

I’m planning to start a personal scientific software project. I used to be familiar with Matlab (quite some time ago), so Matlab would be my first choice. But I keep hearing that Matlab is old stuff and I should use Julia or something like that. I wouldn’t find learning Julia difficult, so familiarity with Matlab is not an important factor. Neither is cost, because I can afford a home license for Matlab, Simulink and a few toolboxes. So I’m thinking. Please give me your input! Why should I use Matlab in 2025 instead of alternatives?I’m planning to start a personal scientific software project. I used to be familiar with Matlab (quite some time ago), so Matlab would be my first choice. But I keep hearing that Matlab is old stuff and I should use Julia or something like that. I wouldn’t find learning Julia difficult, so familiarity with Matlab is not an important factor. Neither is cost, because I can afford a home license for Matlab, Simulink and a few toolboxes. So I’m thinking. Please give me your input! Why should I use Matlab in 2025 instead of alternatives? I’m planning to start a personal scientific software project. I used to be familiar with Matlab (quite some time ago), so Matlab would be my first choice. But I keep hearing that Matlab is old stuff and I should use Julia or something like that. I wouldn’t find learning Julia difficult, so familiarity with Matlab is not an important factor. Neither is cost, because I can afford a home license for Matlab, Simulink and a few toolboxes. So I’m thinking. Please give me your input! Why should I use Matlab in 2025 instead of alternatives? matlab, julia MATLAB Answers — New Questions

​

Function to copy to clickboard in App Designer?
Matlab News

Function to copy to clickboard in App Designer?

PuTI / 2025-07-20

I am making an application that outputs results in Edit Fields (both text and numeric). I would like to add a function that automatically copies the contents of an Edit Field to the clipboard when the Edit Field is selected (clicked). However, I do not see a callback function for Edit Fields like "ClickedFcn" for Drop Down lists.
Is it possible to do this directly or perhaps via some workaround?I am making an application that outputs results in Edit Fields (both text and numeric). I would like to add a function that automatically copies the contents of an Edit Field to the clipboard when the Edit Field is selected (clicked). However, I do not see a callback function for Edit Fields like "ClickedFcn" for Drop Down lists.
Is it possible to do this directly or perhaps via some workaround? I am making an application that outputs results in Edit Fields (both text and numeric). I would like to add a function that automatically copies the contents of an Edit Field to the clipboard when the Edit Field is selected (clicked). However, I do not see a callback function for Edit Fields like "ClickedFcn" for Drop Down lists.
Is it possible to do this directly or perhaps via some workaround? appdesigner, clickedfcn, clipboard, callback MATLAB Answers — New Questions

​

Where to get a zip code for free 30 days trial
Matlab News

Where to get a zip code for free 30 days trial

PuTI / 2025-07-20

Hi I am a student at University of Johannesburg. I created the MATLAB account online. I want to start the 30 day free trial but when I tap to student trial version, I am required to type in a zip code. Please help because I don not know the zip code.Hi I am a student at University of Johannesburg. I created the MATLAB account online. I want to start the 30 day free trial but when I tap to student trial version, I am required to type in a zip code. Please help because I don not know the zip code. Hi I am a student at University of Johannesburg. I created the MATLAB account online. I want to start the 30 day free trial but when I tap to student trial version, I am required to type in a zip code. Please help because I don not know the zip code. power_electronics_control MATLAB Answers — New Questions

​

Random lags while running app
Matlab News

Random lags while running app

PuTI / 2025-07-20

I have an App Designed application that collects data from an Arduino Pico.
The Pico runs individual trials with accurate to submillisecond timing. MATLAB starts each trial as soon as the previous one is complete. Data is saved in tables as I found that writing to disk after each trial took too long. Even so, the time between trials is longer than it should be AND it can be extremely long on occasion. I’ve plotted each trial duration and the timing of the end of one to the start of the next. Any ideas as to why MATLAB occasionally takes long breaks? I’ve tried clearing variables between each trial (doesn’t seem to affect my app tables). Removed calls to get time of day (useing Pico Timer for data) various other attemps with Profiler but no luck since the error is rare. Copilot wasn’t much help either.
I tried updating to version R2025a and that was much worse!

Any help much appreciated. Code for the app is here, it’s big:
https://drive.google.com/file/d/1mwCtRJ-l_2fhk26JYzz2IxidDqkU3IV1/view?usp=sharingI have an App Designed application that collects data from an Arduino Pico.
The Pico runs individual trials with accurate to submillisecond timing. MATLAB starts each trial as soon as the previous one is complete. Data is saved in tables as I found that writing to disk after each trial took too long. Even so, the time between trials is longer than it should be AND it can be extremely long on occasion. I’ve plotted each trial duration and the timing of the end of one to the start of the next. Any ideas as to why MATLAB occasionally takes long breaks? I’ve tried clearing variables between each trial (doesn’t seem to affect my app tables). Removed calls to get time of day (useing Pico Timer for data) various other attemps with Profiler but no luck since the error is rare. Copilot wasn’t much help either.
I tried updating to version R2025a and that was much worse!

Any help much appreciated. Code for the app is here, it’s big:
https://drive.google.com/file/d/1mwCtRJ-l_2fhk26JYzz2IxidDqkU3IV1/view?usp=sharing I have an App Designed application that collects data from an Arduino Pico.
The Pico runs individual trials with accurate to submillisecond timing. MATLAB starts each trial as soon as the previous one is complete. Data is saved in tables as I found that writing to disk after each trial took too long. Even so, the time between trials is longer than it should be AND it can be extremely long on occasion. I’ve plotted each trial duration and the timing of the end of one to the start of the next. Any ideas as to why MATLAB occasionally takes long breaks? I’ve tried clearing variables between each trial (doesn’t seem to affect my app tables). Removed calls to get time of day (useing Pico Timer for data) various other attemps with Profiler but no luck since the error is rare. Copilot wasn’t much help either.
I tried updating to version R2025a and that was much worse!

Any help much appreciated. Code for the app is here, it’s big:
https://drive.google.com/file/d/1mwCtRJ-l_2fhk26JYzz2IxidDqkU3IV1/view?usp=sharing lagging MATLAB Answers — New Questions

​

Previous 1 2 3 4 5 … 59 Next

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term