Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

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

All Categories

  • IBM
  • Visual Paradigm
  • 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
      • Office
      • Windows
  • 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

  • IBM
  • Visual Paradigm
  • 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
      • Office
      • Windows
  • 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

I am trying to incorporate multiple IF statements in my ODE to generate a single output.
Matlab News

I am trying to incorporate multiple IF statements in my ODE to generate a single output.

PuTI / 2025-05-10

There are four cases that I am trying to incorporate as multiple IF statements. Here are the four cases below. The first case is the one I used in my code to generate the output.
dx(1,1) > 0 && dx(3,1) > 0
dx(1,1) > 0 || dx(3,1) > 0
dx(1,1) > 0 && dx(3,1) <= 0
dx(1,1) <= 0 && dx(3,1) > 0
Below is the code that I used to generate the first case:
close all
clear all
clc

tspan = [0 100];
y0 = 0.7; % initial value of state variable x1
r0 = 0.7; % initial value of state variable x2
w0 = 0.8; % initial value of state variable x3
x0 = [y0; r0; w0];
[t, x] = ode45(@odefcn, tspan, x0);

%% Plot results
figure
subplot(3,1,1);
plot(t, x(:,1)); grid on
xlabel(‘Time’), ylabel(‘Output’);

subplot(3,1,2);
plot(t, x(:,2)); grid on
xlabel(‘Time’), ylabel(‘Policy Rate’);

subplot(3,1,3);
plot(t, x(:,3)); grid on
xlabel(‘Time’), ylabel(‘Wage Share’);
y0 = [0.7; 0.7; 0.8];

%% System of three differential equations
function dx = odefcn(t, x)
% definitions
y = x(1);
r = x(2);
w = x(3);

% parameters
alpha = 1.0;
beta = 1.0;
gamma = 0.6;
delta = 0.6;
mu = 0.1;
lambda = 0.6;
theta = 0.4;
omega = 0.4;
sigma = 0.1;
tau = 0.1;

% ODEs
dx(1,1) = alpha * y – beta * r * y;
dx(3,1) = – theta * w + lambda * y * w – mu * w * w;

% Asymmetrical Reaction Function
if dx(1,1) > 0 && dx(3,1) > 0
dx(2,1) = – omega * r + gamma * w * r + sigma * w * r + delta * y * r + tau * y * r;
else
dx(2,1) = – omega * r + gamma * w * r + delta * y * r;
end
endThere are four cases that I am trying to incorporate as multiple IF statements. Here are the four cases below. The first case is the one I used in my code to generate the output.
dx(1,1) > 0 && dx(3,1) > 0
dx(1,1) > 0 || dx(3,1) > 0
dx(1,1) > 0 && dx(3,1) <= 0
dx(1,1) <= 0 && dx(3,1) > 0
Below is the code that I used to generate the first case:
close all
clear all
clc

tspan = [0 100];
y0 = 0.7; % initial value of state variable x1
r0 = 0.7; % initial value of state variable x2
w0 = 0.8; % initial value of state variable x3
x0 = [y0; r0; w0];
[t, x] = ode45(@odefcn, tspan, x0);

%% Plot results
figure
subplot(3,1,1);
plot(t, x(:,1)); grid on
xlabel(‘Time’), ylabel(‘Output’);

subplot(3,1,2);
plot(t, x(:,2)); grid on
xlabel(‘Time’), ylabel(‘Policy Rate’);

subplot(3,1,3);
plot(t, x(:,3)); grid on
xlabel(‘Time’), ylabel(‘Wage Share’);
y0 = [0.7; 0.7; 0.8];

%% System of three differential equations
function dx = odefcn(t, x)
% definitions
y = x(1);
r = x(2);
w = x(3);

% parameters
alpha = 1.0;
beta = 1.0;
gamma = 0.6;
delta = 0.6;
mu = 0.1;
lambda = 0.6;
theta = 0.4;
omega = 0.4;
sigma = 0.1;
tau = 0.1;

% ODEs
dx(1,1) = alpha * y – beta * r * y;
dx(3,1) = – theta * w + lambda * y * w – mu * w * w;

% Asymmetrical Reaction Function
if dx(1,1) > 0 && dx(3,1) > 0
dx(2,1) = – omega * r + gamma * w * r + sigma * w * r + delta * y * r + tau * y * r;
else
dx(2,1) = – omega * r + gamma * w * r + delta * y * r;
end
end There are four cases that I am trying to incorporate as multiple IF statements. Here are the four cases below. The first case is the one I used in my code to generate the output.
dx(1,1) > 0 && dx(3,1) > 0
dx(1,1) > 0 || dx(3,1) > 0
dx(1,1) > 0 && dx(3,1) <= 0
dx(1,1) <= 0 && dx(3,1) > 0
Below is the code that I used to generate the first case:
close all
clear all
clc

tspan = [0 100];
y0 = 0.7; % initial value of state variable x1
r0 = 0.7; % initial value of state variable x2
w0 = 0.8; % initial value of state variable x3
x0 = [y0; r0; w0];
[t, x] = ode45(@odefcn, tspan, x0);

%% Plot results
figure
subplot(3,1,1);
plot(t, x(:,1)); grid on
xlabel(‘Time’), ylabel(‘Output’);

subplot(3,1,2);
plot(t, x(:,2)); grid on
xlabel(‘Time’), ylabel(‘Policy Rate’);

subplot(3,1,3);
plot(t, x(:,3)); grid on
xlabel(‘Time’), ylabel(‘Wage Share’);
y0 = [0.7; 0.7; 0.8];

%% System of three differential equations
function dx = odefcn(t, x)
% definitions
y = x(1);
r = x(2);
w = x(3);

% parameters
alpha = 1.0;
beta = 1.0;
gamma = 0.6;
delta = 0.6;
mu = 0.1;
lambda = 0.6;
theta = 0.4;
omega = 0.4;
sigma = 0.1;
tau = 0.1;

% ODEs
dx(1,1) = alpha * y – beta * r * y;
dx(3,1) = – theta * w + lambda * y * w – mu * w * w;

% Asymmetrical Reaction Function
if dx(1,1) > 0 && dx(3,1) > 0
dx(2,1) = – omega * r + gamma * w * r + sigma * w * r + delta * y * r + tau * y * r;
else
dx(2,1) = – omega * r + gamma * w * r + delta * y * r;
end
end ode, differential equations, if statement MATLAB Answers — New Questions

​

How do I find the corner points of an mask
Matlab News

How do I find the corner points of an mask

PuTI / 2025-05-09

I have various mask and i want to find the exact four courner coordinates, but when some mask objects with an rotation and little odd shape comes i find it difficult to find the corner points.
I have attached the mask and pointed the points i want to findI have various mask and i want to find the exact four courner coordinates, but when some mask objects with an rotation and little odd shape comes i find it difficult to find the corner points.
I have attached the mask and pointed the points i want to find I have various mask and i want to find the exact four courner coordinates, but when some mask objects with an rotation and little odd shape comes i find it difficult to find the corner points.
I have attached the mask and pointed the points i want to find image processing, digital image processing, computer vision MATLAB Answers — New Questions

​

Upper limit on the number of UIAxes children allowed
Matlab News

Upper limit on the number of UIAxes children allowed

PuTI / 2025-05-09

I am plotting orbital data, using plot3 to progressively lengthen the orbital track of a spacecraft.
plot3(earthMoon.UIAxes, x,y,z,"w’);
Each time I do this, another "Children’ is added to the UIAxes instance. Eventually, when the number of children approaches 200 or so, the graphical object management becomes unwieldy and my GUI stops responding to button pushes; even the Matlab STOP and CONTINUE buttons fail to respond.
I found a similar question and answer here:
https://www.mathworks.com/matlabcentral/answers/433845-maximum-number-of-uiaxes-in-app-designer-2017b?s_tid=prof_contriblnk
Is there a better way to manage the Children? I have tried thinning out my track data to reducte the number of points, but that results in jerky updates that don’t align with the orbital state. I have also looked at using splines, but I will still need to limit the number of current track points to something under 200.
I have another app for displaying radar data where I progressively delete the oldest children in the UIApp, so I never have more than about 50. That works well, but for orbital data I would like to display the whole trajectory from launch to current time. It appears I can’t have it both ways.I am plotting orbital data, using plot3 to progressively lengthen the orbital track of a spacecraft.
plot3(earthMoon.UIAxes, x,y,z,"w’);
Each time I do this, another "Children’ is added to the UIAxes instance. Eventually, when the number of children approaches 200 or so, the graphical object management becomes unwieldy and my GUI stops responding to button pushes; even the Matlab STOP and CONTINUE buttons fail to respond.
I found a similar question and answer here:
https://www.mathworks.com/matlabcentral/answers/433845-maximum-number-of-uiaxes-in-app-designer-2017b?s_tid=prof_contriblnk
Is there a better way to manage the Children? I have tried thinning out my track data to reducte the number of points, but that results in jerky updates that don’t align with the orbital state. I have also looked at using splines, but I will still need to limit the number of current track points to something under 200.
I have another app for displaying radar data where I progressively delete the oldest children in the UIApp, so I never have more than about 50. That works well, but for orbital data I would like to display the whole trajectory from launch to current time. It appears I can’t have it both ways. I am plotting orbital data, using plot3 to progressively lengthen the orbital track of a spacecraft.
plot3(earthMoon.UIAxes, x,y,z,"w’);
Each time I do this, another "Children’ is added to the UIAxes instance. Eventually, when the number of children approaches 200 or so, the graphical object management becomes unwieldy and my GUI stops responding to button pushes; even the Matlab STOP and CONTINUE buttons fail to respond.
I found a similar question and answer here:
https://www.mathworks.com/matlabcentral/answers/433845-maximum-number-of-uiaxes-in-app-designer-2017b?s_tid=prof_contriblnk
Is there a better way to manage the Children? I have tried thinning out my track data to reducte the number of points, but that results in jerky updates that don’t align with the orbital state. I have also looked at using splines, but I will still need to limit the number of current track points to something under 200.
I have another app for displaying radar data where I progressively delete the oldest children in the UIApp, so I never have more than about 50. That works well, but for orbital data I would like to display the whole trajectory from launch to current time. It appears I can’t have it both ways. plot3, uiaxes, uifigure MATLAB Answers — New Questions

​

Running Simulink Online on Selfhosted Docker MATLAB Online Instance
Matlab News

Running Simulink Online on Selfhosted Docker MATLAB Online Instance

PuTI / 2025-05-09

Hello, I’m currently running MATLAB on my server along with JupyterLab using jupyter-matlab-proxy based on Docker.
This extension allows us to integrate MATLAB with JupyterLab and also allows us to use selfhosted instance of MATLAB Online if needed.

All features of MATLAB Online wors very well just as locally installed MATLAB desktop application.
However, as I try to run Simulink Online and create a Blank Model on it, it gives me a following error:
———-
Unable to run the ‘fevalJSON’ function because it calls the ‘open_system’ function, which is not supported for MATLAB Online. To use this function, use an installed version of MATLAB on your computer.
———-

As far as I know, MATLAB already provides Simulink Online service on their official server instance.
I do installed Simulink and many other toolboxes required for running Simulink on my container image.
Is is not supported on user-created docker image (Which installs MATLAB by MATLAB Package Manager, MPM) or am I doing something wrong?
I’d really appreciate if I can run a selfhosted Simulink Server.

Thank you.Hello, I’m currently running MATLAB on my server along with JupyterLab using jupyter-matlab-proxy based on Docker.
This extension allows us to integrate MATLAB with JupyterLab and also allows us to use selfhosted instance of MATLAB Online if needed.

All features of MATLAB Online wors very well just as locally installed MATLAB desktop application.
However, as I try to run Simulink Online and create a Blank Model on it, it gives me a following error:
———-
Unable to run the ‘fevalJSON’ function because it calls the ‘open_system’ function, which is not supported for MATLAB Online. To use this function, use an installed version of MATLAB on your computer.
———-

As far as I know, MATLAB already provides Simulink Online service on their official server instance.
I do installed Simulink and many other toolboxes required for running Simulink on my container image.
Is is not supported on user-created docker image (Which installs MATLAB by MATLAB Package Manager, MPM) or am I doing something wrong?
I’d really appreciate if I can run a selfhosted Simulink Server.

Thank you. Hello, I’m currently running MATLAB on my server along with JupyterLab using jupyter-matlab-proxy based on Docker.
This extension allows us to integrate MATLAB with JupyterLab and also allows us to use selfhosted instance of MATLAB Online if needed.

All features of MATLAB Online wors very well just as locally installed MATLAB desktop application.
However, as I try to run Simulink Online and create a Blank Model on it, it gives me a following error:
———-
Unable to run the ‘fevalJSON’ function because it calls the ‘open_system’ function, which is not supported for MATLAB Online. To use this function, use an installed version of MATLAB on your computer.
———-

As far as I know, MATLAB already provides Simulink Online service on their official server instance.
I do installed Simulink and many other toolboxes required for running Simulink on my container image.
Is is not supported on user-created docker image (Which installs MATLAB by MATLAB Package Manager, MPM) or am I doing something wrong?
I’d really appreciate if I can run a selfhosted Simulink Server.

Thank you. docker, server, matlab online, simulink online, simulink, jupyter-matlab-proxy, r2022b, mpm MATLAB Answers — New Questions

​

How do I add semi-colons to lines of MATLAB code automatically in MATLAB?
Matlab News

How do I add semi-colons to lines of MATLAB code automatically in MATLAB?

PuTI / 2025-05-09

I want to add semi-colons to multiple lines of MATLAB code automatically.I want to add semi-colons to multiple lines of MATLAB code automatically. I want to add semi-colons to multiple lines of MATLAB code automatically. semicolon, multilinesemicolon MATLAB Answers — New Questions

​

help me get the points of the mask
Matlab News

help me get the points of the mask

PuTI / 2025-05-09

I have shapes like this and i want the four points like what i have marked and the enclosing are i drew with linesI have shapes like this and i want the four points like what i have marked and the enclosing are i drew with lines I have shapes like this and i want the four points like what i have marked and the enclosing are i drew with lines computer vision, image analysis, image processing, minimum perimeter polygon MATLAB Answers — New Questions

​

How to specify intervals of increasing, decreasing of a function in MATLAB
Matlab News

How to specify intervals of increasing, decreasing of a function in MATLAB

PuTI / 2025-05-09

Hello, I want to specify intervals of increasing & decreasing of a function for a specific range; say -20-20. This is my code here:
clc, close, clear
syms x y real

dy=1-(4/x^2); x=~0; % This is the derivative of the function
% dy=(sin(x)-1)*(2*cos(x)+1); % (0<=x<=2*pi) % Code doesn’t work for this.

fplot(dy); hold on; axis([-5, 5, -5, 5]);
j=xline(0); set(j,’color’,’black’,’Linewidth’, 1.5)
k=yline(0); set(k,’color’,’black’,’Linewidth’, 1.5)
cp=solve(dy); % Finding critical points
y_cp=subs(dy,cp);
[~,idx] = unique(cp);
cp = cp(idx);
y_cp = y_cp(idx);
[num, den]=numden(dy); % Not a conventional way to find other critical points
cp2=solve(den==0);
disp(‘The critical points are:’)
for k =1:length(cp)
fprintf("(%.2f,%.2f)n",cp(k), y_cp(k))
plot(cp,y_cp,’*’, ‘color’, ‘black’);
end
for k =1:length(cp2)
fprintf("x = %.2f is a critical point, y is undefinedn",cp2(k))
end
% y is increasing if dy > 0, decreasing if dy < 0, if dy=0 it’s a critical point. Code below doesn’t work.
for i = -20:20
dy_sub_i=subs(dy,i);
end
if dy_sub_i>0
fprintf(‘f is increasing in %s-%s’, i(0), i);
elseif dy_sub_i<0
fprintf(‘f is decreasing in ‘);
endHello, I want to specify intervals of increasing & decreasing of a function for a specific range; say -20-20. This is my code here:
clc, close, clear
syms x y real

dy=1-(4/x^2); x=~0; % This is the derivative of the function
% dy=(sin(x)-1)*(2*cos(x)+1); % (0<=x<=2*pi) % Code doesn’t work for this.

fplot(dy); hold on; axis([-5, 5, -5, 5]);
j=xline(0); set(j,’color’,’black’,’Linewidth’, 1.5)
k=yline(0); set(k,’color’,’black’,’Linewidth’, 1.5)
cp=solve(dy); % Finding critical points
y_cp=subs(dy,cp);
[~,idx] = unique(cp);
cp = cp(idx);
y_cp = y_cp(idx);
[num, den]=numden(dy); % Not a conventional way to find other critical points
cp2=solve(den==0);
disp(‘The critical points are:’)
for k =1:length(cp)
fprintf("(%.2f,%.2f)n",cp(k), y_cp(k))
plot(cp,y_cp,’*’, ‘color’, ‘black’);
end
for k =1:length(cp2)
fprintf("x = %.2f is a critical point, y is undefinedn",cp2(k))
end
% y is increasing if dy > 0, decreasing if dy < 0, if dy=0 it’s a critical point. Code below doesn’t work.
for i = -20:20
dy_sub_i=subs(dy,i);
end
if dy_sub_i>0
fprintf(‘f is increasing in %s-%s’, i(0), i);
elseif dy_sub_i<0
fprintf(‘f is decreasing in ‘);
end Hello, I want to specify intervals of increasing & decreasing of a function for a specific range; say -20-20. This is my code here:
clc, close, clear
syms x y real

dy=1-(4/x^2); x=~0; % This is the derivative of the function
% dy=(sin(x)-1)*(2*cos(x)+1); % (0<=x<=2*pi) % Code doesn’t work for this.

fplot(dy); hold on; axis([-5, 5, -5, 5]);
j=xline(0); set(j,’color’,’black’,’Linewidth’, 1.5)
k=yline(0); set(k,’color’,’black’,’Linewidth’, 1.5)
cp=solve(dy); % Finding critical points
y_cp=subs(dy,cp);
[~,idx] = unique(cp);
cp = cp(idx);
y_cp = y_cp(idx);
[num, den]=numden(dy); % Not a conventional way to find other critical points
cp2=solve(den==0);
disp(‘The critical points are:’)
for k =1:length(cp)
fprintf("(%.2f,%.2f)n",cp(k), y_cp(k))
plot(cp,y_cp,’*’, ‘color’, ‘black’);
end
for k =1:length(cp2)
fprintf("x = %.2f is a critical point, y is undefinedn",cp2(k))
end
% y is increasing if dy > 0, decreasing if dy < 0, if dy=0 it’s a critical point. Code below doesn’t work.
for i = -20:20
dy_sub_i=subs(dy,i);
end
if dy_sub_i>0
fprintf(‘f is increasing in %s-%s’, i(0), i);
elseif dy_sub_i<0
fprintf(‘f is decreasing in ‘);
end for loop, fplot, fprintf MATLAB Answers — New Questions

​

How to Enhance Copilot Usage Data
News

How to Enhance Copilot Usage Data

Tony Redmond / 2025-05-09

Combine Copilot Usage Data with User Account Details to Gain Better Insight for Deployments

Discussing the usage data that’s available for Microsoft 365 Copilot (in the Microsoft 365 admin center and via a Graph API), a colleague remarked that it would be much easier to leverage the usage data if it contained the department and job title for each user. The usage data available for any workload is sparse and needs to be enhanced to be more useful.

Knowing what data sources exist within Microsoft 365 and how to combine sources with PowerShell or whatever other method you choose is becoming a valuable skill for tenant administrators. I’ve been down this path before to discuss combining usage data with audit data to figure out user accounts who aren’t using expensive Copilot licenses. Another example is combining Entra ID account information with MFA registration methods to generate a comprehensive view of user authentication settings.

Scripting a Solution

In this instance, the solution is very straightforward. Use a Graph API call (complete with pagination) to download the latest Copilot usage data, Find the set of user accounts with a Microsoft 365 Copilot license and loop through the set to match the user account with usage data. Report what’s found (Figure 1).

Copilot usage datacombined with user account details.
Figure 1: Copilot usage data combined with user account details

Obfuscated Data and Graph Reports

The thing that most people trip over is matching usage data with user accounts. This is impossible if your tenant obfuscates (anonymizes) usage data. This facility has been available since late 2020 and if the obfuscation setting is on in the Microsoft 365 admin center, all usage data, including the data used by the admin center and Graph API requests is “de-identified” by replacing information like user principal names and display names with a system-generated string.

It’s therefore important to check the settings and reverse it if necessary for the duration of the script to make sure that you can download “real” user information. If you don’t, there’s no way of matching a value like FE7CC8C15246EDCCA289C9A4022762F7 with a user principal name like Lotte.Vetler@office365itpros.com.

Fortunately, I had a lot of code to repurpose, so the script wasn’t difficult to write. You can download the complete script from the Office 365 for IT Pros GitHub repository.

Finding Areas for Focus

Getting back to the original question, I assume the idea of including job titles and departments with Copilot usage data is to figure out where to deploy assistance to help people understand how to use Copilot in different apps. You could do something like this to find the departments with Copilot users who have no activity in the report period (90 days).

    Group-Object -Property Department | ForEach-Object {
        [PSCustomObject]@{
            Department = $_.Name
            UserCount  = $_.Group.Count
        }
    }

$GroupedReport | Sort-Object -Property Department | Format-Table -AutoSize

Department               UserCount
----------               ---------
Analysis and Strategy            3
Business Development             1
Core Operations                 57
Editorial                        1
Group HQ                         1
Information Technology           3
Marketing                       22
Planning & Action                1
Project Management               1
Research and Development         1

With this kind of output, the team driving Copilot adoption and use for the organization would be wise to spend some time with the Core Operations and Marketing departments to ask why so many of their users don’t appear to be using Copilot.

As noted above, understanding how to use PowerShell to mix and match data sources to answer questions is a valuable skill. There’s lots of data available in a Microsoft 365 tenant. That data is there to be used!


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.

 

Interference between channels in the Analogue Input block of Simulink Desktop Real-Time
Matlab News

Interference between channels in the Analogue Input block of Simulink Desktop Real-Time

PuTI / 2025-05-08

I’m experiencing a problem with channel interference when using the Analog Input block of Simulink Desktop Real-Time (SDRT). Although it initially appears to be a case of ‘crosstalk’, the problem also occurs when measuring DC signals from very low impedance sources compared to the input impedance of the data acquisition boards used (National Instruments).
Test description
– I set up several simple voltage dividers (two 10 kΩ resistors in series) powered by an external 5 V supply.
– The voltage at the center of the dividers was measured using a single Analog Input block configured to access multiple channels in vector form [1:n].
– When I short-circuited the resistor connected to GND on the channel (1), its voltage dropped to zero as expected, but I observed a change of around 30 mV in the voltage measured on the channel (2).
– This behavior occurs consistently between any channel (n) and the subsequent channel (n+1).
Additional Tests
– I repeated the test using independent Analog Input blocks for each channel, and, in this case, the problem did not occur for any of the channels, demonstrating that the behavior is related to the vector configuration of the block.
– However, according to the SDRT user guide and the recommendation of MathWorks experts in the past, using a single Analog Input block for multiple signals, using vector notation for channel selection. This approach is necessary to maintain real-time operation, as using independent blocks introduces significant delays, even at low sampling frequencies.
Additional Information
– The same tests were carried out on two different computes (one slower and one faster and robut), with different cards of acquisition (PCI-6221 and PCIe-6323) and in two versions of MATLAB (2021b and 2024a).
– I also randomly changed the order of the input channels to rule out possible problems related to the sequence of the channels.
– The behavior persisted in all the configurations tested.
Requesting Assistance
Are there any known limitations or solutions to this behavior when using the Analog Input block in vector configuration? Considering that SDRT recommends this approach for multiple channels, would a technical review or guidance be possible to solve or mitigate the problem?
.I’m experiencing a problem with channel interference when using the Analog Input block of Simulink Desktop Real-Time (SDRT). Although it initially appears to be a case of ‘crosstalk’, the problem also occurs when measuring DC signals from very low impedance sources compared to the input impedance of the data acquisition boards used (National Instruments).
Test description
– I set up several simple voltage dividers (two 10 kΩ resistors in series) powered by an external 5 V supply.
– The voltage at the center of the dividers was measured using a single Analog Input block configured to access multiple channels in vector form [1:n].
– When I short-circuited the resistor connected to GND on the channel (1), its voltage dropped to zero as expected, but I observed a change of around 30 mV in the voltage measured on the channel (2).
– This behavior occurs consistently between any channel (n) and the subsequent channel (n+1).
Additional Tests
– I repeated the test using independent Analog Input blocks for each channel, and, in this case, the problem did not occur for any of the channels, demonstrating that the behavior is related to the vector configuration of the block.
– However, according to the SDRT user guide and the recommendation of MathWorks experts in the past, using a single Analog Input block for multiple signals, using vector notation for channel selection. This approach is necessary to maintain real-time operation, as using independent blocks introduces significant delays, even at low sampling frequencies.
Additional Information
– The same tests were carried out on two different computes (one slower and one faster and robut), with different cards of acquisition (PCI-6221 and PCIe-6323) and in two versions of MATLAB (2021b and 2024a).
– I also randomly changed the order of the input channels to rule out possible problems related to the sequence of the channels.
– The behavior persisted in all the configurations tested.
Requesting Assistance
Are there any known limitations or solutions to this behavior when using the Analog Input block in vector configuration? Considering that SDRT recommends this approach for multiple channels, would a technical review or guidance be possible to solve or mitigate the problem?
. I’m experiencing a problem with channel interference when using the Analog Input block of Simulink Desktop Real-Time (SDRT). Although it initially appears to be a case of ‘crosstalk’, the problem also occurs when measuring DC signals from very low impedance sources compared to the input impedance of the data acquisition boards used (National Instruments).
Test description
– I set up several simple voltage dividers (two 10 kΩ resistors in series) powered by an external 5 V supply.
– The voltage at the center of the dividers was measured using a single Analog Input block configured to access multiple channels in vector form [1:n].
– When I short-circuited the resistor connected to GND on the channel (1), its voltage dropped to zero as expected, but I observed a change of around 30 mV in the voltage measured on the channel (2).
– This behavior occurs consistently between any channel (n) and the subsequent channel (n+1).
Additional Tests
– I repeated the test using independent Analog Input blocks for each channel, and, in this case, the problem did not occur for any of the channels, demonstrating that the behavior is related to the vector configuration of the block.
– However, according to the SDRT user guide and the recommendation of MathWorks experts in the past, using a single Analog Input block for multiple signals, using vector notation for channel selection. This approach is necessary to maintain real-time operation, as using independent blocks introduces significant delays, even at low sampling frequencies.
Additional Information
– The same tests were carried out on two different computes (one slower and one faster and robut), with different cards of acquisition (PCI-6221 and PCIe-6323) and in two versions of MATLAB (2021b and 2024a).
– I also randomly changed the order of the input channels to rule out possible problems related to the sequence of the channels.
– The behavior persisted in all the configurations tested.
Requesting Assistance
Are there any known limitations or solutions to this behavior when using the Analog Input block in vector configuration? Considering that SDRT recommends this approach for multiple channels, would a technical review or guidance be possible to solve or mitigate the problem?
. #input interference, #simulink, #sdrt MATLAB Answers — New Questions

​

How can I pass an image to a figure ?
Matlab News

How can I pass an image to a figure ?

PuTI / 2025-05-08

Hello. How can I pass an image to a figure in a MATLAB script?
% Generate a wood grain pattern (example)
grain = rand(300, 400);
grain_thresholded = grain > 0.5; % Creates a binary pattern
% Apply color values to simulate wood grain
image(:,:,1) = grain_thresholded * 0.8 + (1 – grain_thresholded) * 0.4; % Red
image(:,:,2) = grain_thresholded * 0.6 + (1 – grain_thresholded) * 0.2; % Green
image(:,:,3) = grain_thresholded * 0.3 + (1 – grain_thresholded) * 0.1; % Blue
% Display the image
figure;
imshow(image);
The existing figure code is below. I want to replace the brown/tan RGB figure color with the above image color and pattern. Thanks for any help !
% Plot beam cross section
% A = base*h; % beam area, in^2
figure()
pgon = polyshape([0 0 23.5 23.5],[12 0 0 12]);
H = plot(pgon,’FaceColor’,[0.666, 0.392, 0.196],’FaceAlpha’,0.5); % use 0.666, 0.392, 0.196
% RGB: (202 164 114) = 0.79 0.643 0.447 wood color
H.LineStyle = ‘–‘;
H.EdgeColor = ‘black’;
hold on
axis equal
grid on
x6 =[0 23.5];
y6 =[6 6];
line(x6,y6,’Color’,’red’,’LineStyle’,’-.’) % adds a line at ‘c = 6’
title(‘Cross Section of Designed Beam’)
xlabel(‘base (in)’); ylabel(‘height (depth) (in)’)Hello. How can I pass an image to a figure in a MATLAB script?
% Generate a wood grain pattern (example)
grain = rand(300, 400);
grain_thresholded = grain > 0.5; % Creates a binary pattern
% Apply color values to simulate wood grain
image(:,:,1) = grain_thresholded * 0.8 + (1 – grain_thresholded) * 0.4; % Red
image(:,:,2) = grain_thresholded * 0.6 + (1 – grain_thresholded) * 0.2; % Green
image(:,:,3) = grain_thresholded * 0.3 + (1 – grain_thresholded) * 0.1; % Blue
% Display the image
figure;
imshow(image);
The existing figure code is below. I want to replace the brown/tan RGB figure color with the above image color and pattern. Thanks for any help !
% Plot beam cross section
% A = base*h; % beam area, in^2
figure()
pgon = polyshape([0 0 23.5 23.5],[12 0 0 12]);
H = plot(pgon,’FaceColor’,[0.666, 0.392, 0.196],’FaceAlpha’,0.5); % use 0.666, 0.392, 0.196
% RGB: (202 164 114) = 0.79 0.643 0.447 wood color
H.LineStyle = ‘–‘;
H.EdgeColor = ‘black’;
hold on
axis equal
grid on
x6 =[0 23.5];
y6 =[6 6];
line(x6,y6,’Color’,’red’,’LineStyle’,’-.’) % adds a line at ‘c = 6’
title(‘Cross Section of Designed Beam’)
xlabel(‘base (in)’); ylabel(‘height (depth) (in)’) Hello. How can I pass an image to a figure in a MATLAB script?
% Generate a wood grain pattern (example)
grain = rand(300, 400);
grain_thresholded = grain > 0.5; % Creates a binary pattern
% Apply color values to simulate wood grain
image(:,:,1) = grain_thresholded * 0.8 + (1 – grain_thresholded) * 0.4; % Red
image(:,:,2) = grain_thresholded * 0.6 + (1 – grain_thresholded) * 0.2; % Green
image(:,:,3) = grain_thresholded * 0.3 + (1 – grain_thresholded) * 0.1; % Blue
% Display the image
figure;
imshow(image);
The existing figure code is below. I want to replace the brown/tan RGB figure color with the above image color and pattern. Thanks for any help !
% Plot beam cross section
% A = base*h; % beam area, in^2
figure()
pgon = polyshape([0 0 23.5 23.5],[12 0 0 12]);
H = plot(pgon,’FaceColor’,[0.666, 0.392, 0.196],’FaceAlpha’,0.5); % use 0.666, 0.392, 0.196
% RGB: (202 164 114) = 0.79 0.643 0.447 wood color
H.LineStyle = ‘–‘;
H.EdgeColor = ‘black’;
hold on
axis equal
grid on
x6 =[0 23.5];
y6 =[6 6];
line(x6,y6,’Color’,’red’,’LineStyle’,’-.’) % adds a line at ‘c = 6’
title(‘Cross Section of Designed Beam’)
xlabel(‘base (in)’); ylabel(‘height (depth) (in)’) image, imshow, figure, rgb, polyshape, pgon MATLAB Answers — New Questions

​

Resetting a Simscape Slider-Crank Angular Position Signal to a 0 Value with a Trigger Signal.
Matlab News

Resetting a Simscape Slider-Crank Angular Position Signal to a 0 Value with a Trigger Signal.

PuTI / 2025-05-08

Hi All,
Forgive me if this topic of signal resetting in Simscape has been ask and solved countless times before. However, I am struggling to what seems a basic bit of logic in my Simscape model, and the solutons in the MATHWORKS examples I can find, seem to not reset the angular position signal by way of my trigger signal (I also have a rising edge signal).
Simply need to reset the angular position output from the Ideal Rotational Motion Sensor (converted to degrees) when my piston reaches its TDC position.
Using triggered subsystems to pass the signal through, or an integrator with a reset and manual swiches, are not permit the signal value to increase at each time-step once reset to 0.
Any pointer would be great on what should be a 5 minute task.
Thanks again.

Patrick

TDC Switch

Rising Edge SignalHi All,
Forgive me if this topic of signal resetting in Simscape has been ask and solved countless times before. However, I am struggling to what seems a basic bit of logic in my Simscape model, and the solutons in the MATHWORKS examples I can find, seem to not reset the angular position signal by way of my trigger signal (I also have a rising edge signal).
Simply need to reset the angular position output from the Ideal Rotational Motion Sensor (converted to degrees) when my piston reaches its TDC position.
Using triggered subsystems to pass the signal through, or an integrator with a reset and manual swiches, are not permit the signal value to increase at each time-step once reset to 0.
Any pointer would be great on what should be a 5 minute task.
Thanks again.

Patrick

TDC Switch

Rising Edge Signal Hi All,
Forgive me if this topic of signal resetting in Simscape has been ask and solved countless times before. However, I am struggling to what seems a basic bit of logic in my Simscape model, and the solutons in the MATHWORKS examples I can find, seem to not reset the angular position signal by way of my trigger signal (I also have a rising edge signal).
Simply need to reset the angular position output from the Ideal Rotational Motion Sensor (converted to degrees) when my piston reaches its TDC position.
Using triggered subsystems to pass the signal through, or an integrator with a reset and manual swiches, are not permit the signal value to increase at each time-step once reset to 0.
Any pointer would be great on what should be a 5 minute task.
Thanks again.

Patrick

TDC Switch

Rising Edge Signal simulink, simscape, stateflow MATLAB Answers — New Questions

​

Why does my daily median calculation and write to channel fail unpredictably?
Matlab News

Why does my daily median calculation and write to channel fail unpredictably?

PuTI / 2025-05-08

I am trying to calculate the daily median across a range of channels and write the result to a new field for each channel. The code seems to run sometimes, but runs into rate limitation other times. I’m not sure why since I am only writing once and to different channels?
Error using Median calcs (line 39)
Requests are too frequent. For further information, see Limitations in the documentation.
My code is:
% Sensor/channel configuration
sensors = [
struct(‘name’, ‘McKinley’,’channelID’, 28xxxx, ‘writeKey’, ‘G3WPJ586M55Gxxxx’)
struct(‘name’, ‘DPI’, ‘channelID’, 80xxxx, ‘writeKey’, ‘S0E0LB45GQLMxxxx’)
struct(‘name’, ‘Bryony’,’channelID’, 29xxxx, ‘writeKey’, ‘2BPCI0IOAINPxxxx’)
];

% Define date range (last 24 hours to midnight)
endTime = dateshift(datetime(‘now’), ‘start’, ‘day’);
startTime = endTime – hours(24);

% Preallocate a results array
results = [];

% Step 1: Read and calculate all medians
for i = 1:length(sensors)
s = sensors(i);

% Read Field 1 for the past 24 hours
[weight, ~] = thingSpeakRead(s.channelID, ‘DateRange’, [startTime, endTime], ‘Fields’, 1);

% Compute median, ignoring NaNs
medianWeight = round(median(weight, ‘omitnan’),2);

% Store in results
results(i).name = s.name;
results(i).channelID = s.channelID;
results(i).writeKey = s.writeKey;
results(i).value = medianWeight;
end

% Step 2: Display results
for i = 1:length(results)
r = results(i);
fprintf(‘%s (Channel %d) → 24hr Median: %.2fn’, r.name, r.channelID, r.value);
end

% Step 3: Write results
thingSpeakWrite(results(1).channelID, ‘Fields’, 6, ‘Values’, {results(1).value}, ‘WriteKey’, results(1).writeKey);
thingSpeakWrite(results(2).channelID, ‘Fields’, 6, ‘Values’, {results(2).value}, ‘WriteKey’, results(2).writeKey);
thingSpeakWrite(results(3).channelID, ‘Fields’, 6, ‘Values’, {results(3).value}, ‘WriteKey’, results(3).writeKey);I am trying to calculate the daily median across a range of channels and write the result to a new field for each channel. The code seems to run sometimes, but runs into rate limitation other times. I’m not sure why since I am only writing once and to different channels?
Error using Median calcs (line 39)
Requests are too frequent. For further information, see Limitations in the documentation.
My code is:
% Sensor/channel configuration
sensors = [
struct(‘name’, ‘McKinley’,’channelID’, 28xxxx, ‘writeKey’, ‘G3WPJ586M55Gxxxx’)
struct(‘name’, ‘DPI’, ‘channelID’, 80xxxx, ‘writeKey’, ‘S0E0LB45GQLMxxxx’)
struct(‘name’, ‘Bryony’,’channelID’, 29xxxx, ‘writeKey’, ‘2BPCI0IOAINPxxxx’)
];

% Define date range (last 24 hours to midnight)
endTime = dateshift(datetime(‘now’), ‘start’, ‘day’);
startTime = endTime – hours(24);

% Preallocate a results array
results = [];

% Step 1: Read and calculate all medians
for i = 1:length(sensors)
s = sensors(i);

% Read Field 1 for the past 24 hours
[weight, ~] = thingSpeakRead(s.channelID, ‘DateRange’, [startTime, endTime], ‘Fields’, 1);

% Compute median, ignoring NaNs
medianWeight = round(median(weight, ‘omitnan’),2);

% Store in results
results(i).name = s.name;
results(i).channelID = s.channelID;
results(i).writeKey = s.writeKey;
results(i).value = medianWeight;
end

% Step 2: Display results
for i = 1:length(results)
r = results(i);
fprintf(‘%s (Channel %d) → 24hr Median: %.2fn’, r.name, r.channelID, r.value);
end

% Step 3: Write results
thingSpeakWrite(results(1).channelID, ‘Fields’, 6, ‘Values’, {results(1).value}, ‘WriteKey’, results(1).writeKey);
thingSpeakWrite(results(2).channelID, ‘Fields’, 6, ‘Values’, {results(2).value}, ‘WriteKey’, results(2).writeKey);
thingSpeakWrite(results(3).channelID, ‘Fields’, 6, ‘Values’, {results(3).value}, ‘WriteKey’, results(3).writeKey); I am trying to calculate the daily median across a range of channels and write the result to a new field for each channel. The code seems to run sometimes, but runs into rate limitation other times. I’m not sure why since I am only writing once and to different channels?
Error using Median calcs (line 39)
Requests are too frequent. For further information, see Limitations in the documentation.
My code is:
% Sensor/channel configuration
sensors = [
struct(‘name’, ‘McKinley’,’channelID’, 28xxxx, ‘writeKey’, ‘G3WPJ586M55Gxxxx’)
struct(‘name’, ‘DPI’, ‘channelID’, 80xxxx, ‘writeKey’, ‘S0E0LB45GQLMxxxx’)
struct(‘name’, ‘Bryony’,’channelID’, 29xxxx, ‘writeKey’, ‘2BPCI0IOAINPxxxx’)
];

% Define date range (last 24 hours to midnight)
endTime = dateshift(datetime(‘now’), ‘start’, ‘day’);
startTime = endTime – hours(24);

% Preallocate a results array
results = [];

% Step 1: Read and calculate all medians
for i = 1:length(sensors)
s = sensors(i);

% Read Field 1 for the past 24 hours
[weight, ~] = thingSpeakRead(s.channelID, ‘DateRange’, [startTime, endTime], ‘Fields’, 1);

% Compute median, ignoring NaNs
medianWeight = round(median(weight, ‘omitnan’),2);

% Store in results
results(i).name = s.name;
results(i).channelID = s.channelID;
results(i).writeKey = s.writeKey;
results(i).value = medianWeight;
end

% Step 2: Display results
for i = 1:length(results)
r = results(i);
fprintf(‘%s (Channel %d) → 24hr Median: %.2fn’, r.name, r.channelID, r.value);
end

% Step 3: Write results
thingSpeakWrite(results(1).channelID, ‘Fields’, 6, ‘Values’, {results(1).value}, ‘WriteKey’, results(1).writeKey);
thingSpeakWrite(results(2).channelID, ‘Fields’, 6, ‘Values’, {results(2).value}, ‘WriteKey’, results(2).writeKey);
thingSpeakWrite(results(3).channelID, ‘Fields’, 6, ‘Values’, {results(3).value}, ‘WriteKey’, results(3).writeKey); write limitation, thingspeak MATLAB Answers — New Questions

​

Simultaneously send data over SCIA-UART port and logging data on SD-card using an TI F28P65
Matlab News

Simultaneously send data over SCIA-UART port and logging data on SD-card using an TI F28P65

PuTI / 2025-05-08

Good evening,
I am writing code in Simulink for the TI f28p65 Launchpad of Texas instruments. Over all I use the c2000 library.
Following the tutorial https://de.mathworks.com/help/ti-c2000/ug/mat-file-sd-card-logging.html I am using a Scope block to log the data via the SPI-interface. Additionally I use SCIA-UART transmit to output the data in form of a string.
Sending the data via UART works fine in case I dont enable the sd card logging.
I have checked the correct setting of the pins as well as the funcitonality of the cables.

A similar issue occured already for the microcontroller, only it was programmed in c, such that no help was given for simulink. (https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1080828/tms320f280025-uart-and-spi)

I am looking forward to hearing from you!

Cheers,
IsabellaGood evening,
I am writing code in Simulink for the TI f28p65 Launchpad of Texas instruments. Over all I use the c2000 library.
Following the tutorial https://de.mathworks.com/help/ti-c2000/ug/mat-file-sd-card-logging.html I am using a Scope block to log the data via the SPI-interface. Additionally I use SCIA-UART transmit to output the data in form of a string.
Sending the data via UART works fine in case I dont enable the sd card logging.
I have checked the correct setting of the pins as well as the funcitonality of the cables.

A similar issue occured already for the microcontroller, only it was programmed in c, such that no help was given for simulink. (https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1080828/tms320f280025-uart-and-spi)

I am looking forward to hearing from you!

Cheers,
Isabella Good evening,
I am writing code in Simulink for the TI f28p65 Launchpad of Texas instruments. Over all I use the c2000 library.
Following the tutorial https://de.mathworks.com/help/ti-c2000/ug/mat-file-sd-card-logging.html I am using a Scope block to log the data via the SPI-interface. Additionally I use SCIA-UART transmit to output the data in form of a string.
Sending the data via UART works fine in case I dont enable the sd card logging.
I have checked the correct setting of the pins as well as the funcitonality of the cables.

A similar issue occured already for the microcontroller, only it was programmed in c, such that no help was given for simulink. (https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1080828/tms320f280025-uart-and-spi)

I am looking forward to hearing from you!

Cheers,
Isabella c2000, simulink, sdcardlogging, sci MATLAB Answers — New Questions

​

The Downside of Losing the Exchange Mailbox Audit Search Cmdlets
News

The Downside of Losing the Exchange Mailbox Audit Search Cmdlets

Tony Redmond / 2025-05-08

Finding Exchange Mailbox Audit Data Isn’t So Easy Anymore

From an engineering perspective, Microsoft’s decision to decommission the Search-MailboxAuditLog and New-MailboxAuditLogSearch cmdlets makes a ton of sense. Microsoft 365 apps consume shared services, and the unified audit service ingests the data used by these Exchange Online cmdlets. Why incur the engineering and support expense to keep the old on-premises cmdlets going?

Microsoft posted the news on January 14, 2025, and stopped writing audit log data to mailboxes on March 1, 2025. The cmdlets will disappear at the end of 2025. You might have missed this information because Microsoft posted to the security blog instead of the Exchange EHLO blog, where all the other Exchange-related news appears. Perhaps this is because audit data is related to Microsoft Purview and the topic therefore is in the security space. However, losing cmdlets that might be used in Exchange-related administrative processes is a big deal deserving better awareness.

In 2016, Exchange mailbox audit data was one of the first sources of audit events for the unified audit log. Ever since, mailbox audit data has flowed into the unified audit log and can be found by audit log searches, so what’s the problem?

Searching the Unified Audit Log for Exchange Mailbox Audit Data

Searches of the unified audit log can be performed synchronously using the Search-UnifiedAuditLog cmdlet or asynchronously through the Audit section of the Purview compliance portal or by submitting a job through the Graph AuditLogQuery API. Audit log searches can find mailbox data among the many other forms of workload data ingested on an ongoing basis, and searches can go back 180 days (audit standard) or 365 days (audit premium). It all sounds good.

Creating an audit log search for Exchange mailbox audit events in the Purview compliance portal.
Figure 1: Creating an audit log search for Exchange mailbox audit events in the Purview compliance portal

But people build processes around PowerShell cmdlets, and when a cmdlet disappears, those processes must be redeveloped. In this instance, any script that uses the deprecated cmdlets must be altered, probably to use the Search-UnifiedAuditLog cmdlet. And let’s face it, even its biggest fans (and I’m probably in that category) wouldn’t consider Search-UnifiedAuditLog to be an easy cmdlet to use, and Microsoft has tinkered with the way the cmdlet functions over the years. Thankfully, they’ve retreated from the idea of making high completeness (very slow) searches the norm.

The parameters for audit log searches can be complex to construct, duplicate audit records can be retrieved, and there’s always the need to unpack the JSON structure contained in the AuditData property to find out what actually happened for the auditable event.

Those accustomed to interacting with the AuditData property know that every workload decides what information to include in audit events and how that data is formatted. Extracting properties from AuditData usually isn’t hard, but it’s tiresome to see how many variations Microsoft engineers can come up with when inserting data into audit events.

Apart from the issue of interpreting audit events, there’s also the simple fact that it’s easier to extract audit data for the actions of a single user from their mailbox. Finding the relevant information about mailbox events from the unified audit log is more complicated.

Find Exchange Mailbox Audit Data for a Single Mailbox

The easiest way to find audit records for a specific mailbox with the Search-UnifiedAuditLog cmdlet is to pass the user principal name for the mailbox owner (or, to search multiple mailboxes, a set of user principal names) in the UserIds parameter. Here’s an example that finds the audit records for a mailbox and reduces the set to those belonging to Exchange actions:

$RecordType = "ExchangeAdmin","ExchangeItem","ExchangeItemAggregated","ExchangeItemGroup","ExchangeSearch"
[array]$Records = Search-UnifiedAuditLog -Userids ‘kim.akers@office365itpros.com' -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date) -Formatted -ResultSize 5000 -SessionCommand ReturnLargeSet
$Records = $Records | Where-Object {$_.RecordType -in $RecordType} | Sort-Object Identity -Unique

Searching based on user principal names finds audit records for actions performed by that user. If you want to find audit records for actions performed by a mailbox delegate, use a free text search for the object identifier of the mailbox owner’s account. The free text search finds references to the mailbox owner in the AuditData property and includes those records in the set returned. Here’s an example of using an account identifier in a free text search. It’s important that the identifier is cast as a string as otherwise the search will fail because it will attempt to use a GUID where the cmdlet expects a string:

[array]$Records = Search-UnifiedAuditLog -Freetext ((Get-ExoMailbox -Identity Tony.Redmond).ExternalDirectoryObjectId -as [string]) -StartDate (Get-Date).AddDays(-90) -EndDate (Get-Date) -Formatted -ResultSize 5000 -SessionCommand ReturnLargeSet
$Records = $Records | Where-Object {$_.RecordType -in $RecordType} | Sort-Object Identity -Unique

The Bottom Line

You might not have been aware of the change to the old cmdlets. They still work (for now), but mailbox audit data generated since March 1, 2025, cannot be retrieved using the cmdlets. In any case, it’s a good idea to check scripts to find any instances where the old cmdlets are used. The bad news is that those scripts must be redeveloped. Good luck!

 

Infineon Buck Simscape Example – View_system(‘BuckSystem’) unrecognized function or variable ‘view system” error
Matlab News

Infineon Buck Simscape Example – View_system(‘BuckSystem’) unrecognized function or variable ‘view system” error

PuTI / 2025-05-07

I’ve tried running the "Infineon Buck Simscape Example" both online and locally and get the following error
View_system(‘BuckSystem’) unrecognized function or variable ‘view system"
I’m running R2023bI’ve tried running the "Infineon Buck Simscape Example" both online and locally and get the following error
View_system(‘BuckSystem’) unrecognized function or variable ‘view system"
I’m running R2023b I’ve tried running the "Infineon Buck Simscape Example" both online and locally and get the following error
View_system(‘BuckSystem’) unrecognized function or variable ‘view system"
I’m running R2023b infineon buck, view_system MATLAB Answers — New Questions

​

How do I use a Bus in conjunction with a matlab function block in Simulink?
Matlab News

How do I use a Bus in conjunction with a matlab function block in Simulink?

PuTI / 2025-05-07

I have a simulink file where i have a "Matlab Function Block" that needs to get a bus of parameters in input. My problem is that even after changing the variable type of the input to "Bus" and also changing the object name to the one i have given to the bus of parameters in question i still get the following error:
Expression ‘Bus1’ for type of data "Parameters" did not evaluate to a valid type.
Caused by: invalid setting in ‘MATLAB Function’ for parameter ‘Datatype’
Unrecognised function or variable ‘Bus1’. Variable ‘Bus1’ does not exist

Any idea of how i can solve he problem without using a selector before the function?
Thanks in advanceI have a simulink file where i have a "Matlab Function Block" that needs to get a bus of parameters in input. My problem is that even after changing the variable type of the input to "Bus" and also changing the object name to the one i have given to the bus of parameters in question i still get the following error:
Expression ‘Bus1’ for type of data "Parameters" did not evaluate to a valid type.
Caused by: invalid setting in ‘MATLAB Function’ for parameter ‘Datatype’
Unrecognised function or variable ‘Bus1’. Variable ‘Bus1’ does not exist

Any idea of how i can solve he problem without using a selector before the function?
Thanks in advance I have a simulink file where i have a "Matlab Function Block" that needs to get a bus of parameters in input. My problem is that even after changing the variable type of the input to "Bus" and also changing the object name to the one i have given to the bus of parameters in question i still get the following error:
Expression ‘Bus1’ for type of data "Parameters" did not evaluate to a valid type.
Caused by: invalid setting in ‘MATLAB Function’ for parameter ‘Datatype’
Unrecognised function or variable ‘Bus1’. Variable ‘Bus1’ does not exist

Any idea of how i can solve he problem without using a selector before the function?
Thanks in advance bus, matlab function MATLAB Answers — New Questions

​

I am trying to control a DC to DC boost converter using FSC MPC to generate a 20 kW PV power but the MPC controller is very poorly than PI controller.
Matlab News

I am trying to control a DC to DC boost converter using FSC MPC to generate a 20 kW PV power but the MPC controller is very poorly than PI controller.

PuTI / 2025-05-07

I am trying to control a DC to DC boost converter using FSC MPC to generate a 20 kW PV power but the MPC controller generated a maximum of 1135 W PV power and a maximum of 7184 W DC load power instead of 20 kW power. The PV voltage has a maximum of 59 V against 847 V boosted voltage with 21 A maximum PV current against a maximum of 27 A inductor current. Below is the MPC script used in the Matlab function block:
function S = MPC_Boost(iL, V_PV, Vout, iL_ref, wf_min, wf_max, Dref)
% MPC controller for boost converter with iL_ref from MPPT logic

%% System Parameters
Ts = 10e-6;
RL = 0.02;
L = 0.0199;
C = 3.1222e-04;
R_load = 18;

%% Limits
iL_max = 20;
iL_min = 0.2;
Vout_max = 420;
Vout_min = 360;
P_PV_max = 20000;
Vout_ref = 400;

%% Persistent memory
persistent S_old wf;
if isempty(S_old)
S_old = Dref;
wf = wf_min;
end

%% Sanitize Inputs
iL = abs(iL);
Vout = abs(Vout);
V_PV = max(V_PV, 50);

%% Duty Cycle Candidates
states = [Dref – 0.05; Dref; Dref + 0.05];
states = min(max(states, 0.3), 0.9); % Clamp

%% Cost Evaluation
g = zeros(length(states),1);
g_min = inf;
n_best = 1;

X_k = [iL; Vout];

for n = 1:length(states)
D = states(n);

% Discrete model
A_d = [1 – (RL * Ts / L), -(1 – D) * (Ts / L);
(1 – D) * (Ts / C), 1 – (Ts / (R_load * C))];
B_d = [Ts / L; 0];

% Predict state
X_k1 = A_d * X_k + B_d * V_PV;
iboost_k1 = X_k1(1);
Vout_k1 = X_k1(2);
P_PV_pred = V_PV * iboost_k1;

% Constraint check
if iboost_k1 < iL_min || iboost_k1 > iL_max || …
Vout_k1 < Vout_min || Vout_k1 > Vout_max || …
P_PV_pred <= 0 || P_PV_pred > P_PV_max || …
isnan(iboost_k1) || isnan(Vout_k1)
g(n) = inf;
continue;
end

% Cost terms
g_iboost = (iL_ref – iboost_k1)^2;
g_vout = (Vout_ref – Vout_k1)^2;
g_sw = (D ~= S_old) * wf;
g_dref = (D – Dref)^2;
g_pv = (P_PV_pred < 100) * 1000;

% Total cost
g(n) = g_iboost + 0.1 * g_vout + g_sw + g_dref + g_pv;

if g(n) < g_min
g_min = g(n);
n_best = n;
end
end

%% Apply Selected Duty Cycle
S = states(n_best);
S = min(max(S, 0.3), 0.9); % Clamp again

% Adaptive penalty update
if S ~= S_old
wf = min(wf * 1.10, wf_max);
else
wf = max(wf * 0.90, wf_min);
end

S_old = S;
endI am trying to control a DC to DC boost converter using FSC MPC to generate a 20 kW PV power but the MPC controller generated a maximum of 1135 W PV power and a maximum of 7184 W DC load power instead of 20 kW power. The PV voltage has a maximum of 59 V against 847 V boosted voltage with 21 A maximum PV current against a maximum of 27 A inductor current. Below is the MPC script used in the Matlab function block:
function S = MPC_Boost(iL, V_PV, Vout, iL_ref, wf_min, wf_max, Dref)
% MPC controller for boost converter with iL_ref from MPPT logic

%% System Parameters
Ts = 10e-6;
RL = 0.02;
L = 0.0199;
C = 3.1222e-04;
R_load = 18;

%% Limits
iL_max = 20;
iL_min = 0.2;
Vout_max = 420;
Vout_min = 360;
P_PV_max = 20000;
Vout_ref = 400;

%% Persistent memory
persistent S_old wf;
if isempty(S_old)
S_old = Dref;
wf = wf_min;
end

%% Sanitize Inputs
iL = abs(iL);
Vout = abs(Vout);
V_PV = max(V_PV, 50);

%% Duty Cycle Candidates
states = [Dref – 0.05; Dref; Dref + 0.05];
states = min(max(states, 0.3), 0.9); % Clamp

%% Cost Evaluation
g = zeros(length(states),1);
g_min = inf;
n_best = 1;

X_k = [iL; Vout];

for n = 1:length(states)
D = states(n);

% Discrete model
A_d = [1 – (RL * Ts / L), -(1 – D) * (Ts / L);
(1 – D) * (Ts / C), 1 – (Ts / (R_load * C))];
B_d = [Ts / L; 0];

% Predict state
X_k1 = A_d * X_k + B_d * V_PV;
iboost_k1 = X_k1(1);
Vout_k1 = X_k1(2);
P_PV_pred = V_PV * iboost_k1;

% Constraint check
if iboost_k1 < iL_min || iboost_k1 > iL_max || …
Vout_k1 < Vout_min || Vout_k1 > Vout_max || …
P_PV_pred <= 0 || P_PV_pred > P_PV_max || …
isnan(iboost_k1) || isnan(Vout_k1)
g(n) = inf;
continue;
end

% Cost terms
g_iboost = (iL_ref – iboost_k1)^2;
g_vout = (Vout_ref – Vout_k1)^2;
g_sw = (D ~= S_old) * wf;
g_dref = (D – Dref)^2;
g_pv = (P_PV_pred < 100) * 1000;

% Total cost
g(n) = g_iboost + 0.1 * g_vout + g_sw + g_dref + g_pv;

if g(n) < g_min
g_min = g(n);
n_best = n;
end
end

%% Apply Selected Duty Cycle
S = states(n_best);
S = min(max(S, 0.3), 0.9); % Clamp again

% Adaptive penalty update
if S ~= S_old
wf = min(wf * 1.10, wf_max);
else
wf = max(wf * 0.90, wf_min);
end

S_old = S;
end I am trying to control a DC to DC boost converter using FSC MPC to generate a 20 kW PV power but the MPC controller generated a maximum of 1135 W PV power and a maximum of 7184 W DC load power instead of 20 kW power. The PV voltage has a maximum of 59 V against 847 V boosted voltage with 21 A maximum PV current against a maximum of 27 A inductor current. Below is the MPC script used in the Matlab function block:
function S = MPC_Boost(iL, V_PV, Vout, iL_ref, wf_min, wf_max, Dref)
% MPC controller for boost converter with iL_ref from MPPT logic

%% System Parameters
Ts = 10e-6;
RL = 0.02;
L = 0.0199;
C = 3.1222e-04;
R_load = 18;

%% Limits
iL_max = 20;
iL_min = 0.2;
Vout_max = 420;
Vout_min = 360;
P_PV_max = 20000;
Vout_ref = 400;

%% Persistent memory
persistent S_old wf;
if isempty(S_old)
S_old = Dref;
wf = wf_min;
end

%% Sanitize Inputs
iL = abs(iL);
Vout = abs(Vout);
V_PV = max(V_PV, 50);

%% Duty Cycle Candidates
states = [Dref – 0.05; Dref; Dref + 0.05];
states = min(max(states, 0.3), 0.9); % Clamp

%% Cost Evaluation
g = zeros(length(states),1);
g_min = inf;
n_best = 1;

X_k = [iL; Vout];

for n = 1:length(states)
D = states(n);

% Discrete model
A_d = [1 – (RL * Ts / L), -(1 – D) * (Ts / L);
(1 – D) * (Ts / C), 1 – (Ts / (R_load * C))];
B_d = [Ts / L; 0];

% Predict state
X_k1 = A_d * X_k + B_d * V_PV;
iboost_k1 = X_k1(1);
Vout_k1 = X_k1(2);
P_PV_pred = V_PV * iboost_k1;

% Constraint check
if iboost_k1 < iL_min || iboost_k1 > iL_max || …
Vout_k1 < Vout_min || Vout_k1 > Vout_max || …
P_PV_pred <= 0 || P_PV_pred > P_PV_max || …
isnan(iboost_k1) || isnan(Vout_k1)
g(n) = inf;
continue;
end

% Cost terms
g_iboost = (iL_ref – iboost_k1)^2;
g_vout = (Vout_ref – Vout_k1)^2;
g_sw = (D ~= S_old) * wf;
g_dref = (D – Dref)^2;
g_pv = (P_PV_pred < 100) * 1000;

% Total cost
g(n) = g_iboost + 0.1 * g_vout + g_sw + g_dref + g_pv;

if g(n) < g_min
g_min = g(n);
n_best = n;
end
end

%% Apply Selected Duty Cycle
S = states(n_best);
S = min(max(S, 0.3), 0.9); % Clamp again

% Adaptive penalty update
if S ~= S_old
wf = min(wf * 1.10, wf_max);
else
wf = max(wf * 0.90, wf_min);
end

S_old = S;
end mpc control of solar pv MATLAB Answers — New Questions

​

Thread implemented in MATLAB in a timer
Matlab News

Thread implemented in MATLAB in a timer

PuTI / 2025-05-07

Hello,
I have two processes (one for a camera that runs through a camera function and one for a robot that runs through a robot function), and I’d like to set up a thread to run them in parallel.
I’d like the robot process to run in the background if possible. I searched the internet and found parfeval but I don’t really understand how it works.
I don’t really understand how it works. Can you advise me on how to do this?Hello,
I have two processes (one for a camera that runs through a camera function and one for a robot that runs through a robot function), and I’d like to set up a thread to run them in parallel.
I’d like the robot process to run in the background if possible. I searched the internet and found parfeval but I don’t really understand how it works.
I don’t really understand how it works. Can you advise me on how to do this? Hello,
I have two processes (one for a camera that runs through a camera function and one for a robot that runs through a robot function), and I’d like to set up a thread to run them in parallel.
I’d like the robot process to run in the background if possible. I searched the internet and found parfeval but I don’t really understand how it works.
I don’t really understand how it works. Can you advise me on how to do this? thread, matlab MATLAB Answers — New Questions

​

How to Permanently Remove Mailbox Items with the Graph API
News

How to Permanently Remove Mailbox Items with the Graph API

Tony Redmond / 2025-05-07

Permanent Deletion for Message and Other Types of Items from User Mailboxes

On April 1, 2025, Microsoft announced the availability of APIs to permanently delete mailbox items. This news might well have passed you by because the post appeared in the developer blog rather than anything a Microsoft 365 tenant administrator might see.

The APIs are intended to fill in some gaps in Graph API coverage for mailbox items compared to Exchange Web Services (EWS). It’s part of the campaign to remove EWS from Exchange Online by October 2026. An example of where permanent removal of mailbox items is needed is when migrating mailboxes from one tenant to another. After a successful move, the migration utility might clean up by removing items from the source mailbox.

In any case, APIs are now available to permanently delete mail message, mail folder, event, calendar, contact, and contact folder objects.

What Permanent Removal Means

In this context, permanent removal means that no client interface exists to allow the user to recover the message. For example, users can’t use Outlook’s Recover Deleted Items facility to retrieve the deleted items and administrators can’t use the Get-RecoverableItems cmdlet to do likewise (or appear in a report of recoverable items).

The reason why this is so is that when Outlook deletes items in the Deleted Items folder, the items move to the Deletions folder within Recoverable Items. When the API deletes an item, the item moves to the Purges folder. If the item is not subject to a hold, the Managed Folder Assistant will remove it the next item the mailbox is processed. If it is subject to a hold, the item remains in the Purges folder until the hold lapses.

Permanent Removal with the Microsoft Graph API

Two pieces of information are needed to permanently remove a message item using the Graph API: the object identifier for the account that owns the mailbox and the message identifier. Let’s assume that you have a variable containing details of a message:

$Message | Format-List Subject, CreatedDateTime, Id

Subject         : Thank You for Subscribing
CreatedDateTime : 06/05/2022 06:47:28
Id              : AAMkADAzNzBmMzU0LTI3NTItNDQzNy04NzhkLWNmMGU1MzEwYThkNABGAAAAAAB_7ILpFNx8TrktaK8VYWerBwDcIrNcmtpBSZUJ1fXZjZ5iAB_wAYDdAAA3tTkMTDKYRI6zB9VW59QNAAQnaACXAAA=

To delete the item, construct a URI pointing to the message and post the request to the messages endpoint. This example shows where the variables for the user identifier and message identifier are in the URI:

$Uri = ("https://graph.microsoft.com/v1.0/users/{0}/messages/{1}/permanentDelete" -f $UserId, $Message.Id)

$Uri
https://graph.microsoft.com/v1.0/users/eff4cd58-1bb8-4899-94de-795f656b4a18/messages/AAMkADAzNzBmMzU0LTI3NTItNDQzNy04NzhkLWNmMGU1MzEwYThkNABGAAAAAAB_7ILpFNx8TrktaK8VYWerBwDcIrNcmtpBSZUJ1fXZjZ5iAB_wAYDdAAA3tTkMTDKYRI6zB9VW59QNAAQnaACXAAA=/permanentDelete

Invoke-MgGraphRequest -Uri $Uri -Method Post

The Graph API doesn’t ask for confirmation before proceeding to remove the item and it doesn’t provide a status to show that the deletion was successful. The only indication that something happened is found by using the Get-MailboxFolderStatistics cmdlet to see if the items in the Purges folder increase:

Get-MailboxFolderStatistics -FolderScope RecoverableItems -Identity Tony.Redmond | Format-Table Name, ItemsInFolder

Name                                    ItemsInFolder
----                                    -------------
Recoverable Items                                   0
Deletions                                        2135
DiscoveryHolds                                   2543
Purges                                             16
SubstrateHolds                                     12
Versions                                           79

Alternatively, use the MFCMAPI utility to examine the items in the Purges folder. Figure 1 shows that the “Thank you for subscribing” message is in the Purges folder.

MFCMAPI shows the permanently deleted item in the Purges folder.Permanent deletion with Graph APIs
Figure 1: MFCMAPI shows the permanently deleted item in the Purges folder

Permanent Removal with the Microsoft Graph PowerShell SDK

The Remove-MgUserMessagePermanent cmdlet does the same job as the Graph API request:

Remove-MgUserMessagePermanent -UserId $UserId -MessageId $Message.Id

Once again, there’s no status or confirmation required for the deletion to proceed. The other Microsoft Graph PowerShell SDK cmdlets to permanently remove objects are:

  • Remove-MgUserMailFolderPermanent: Remove mail folder
  • Remove-MgUserCalendarPermanent: Remove calendar.
  • Remove-MgUserEventPermanent: Remove calendar event.
  • Remove-MgUserContactPermanent: Remove contact.
  • Remove-MgUserContactFolderPermanent: Remove contact folder.

All the cmdlets work in the same way. Deletion is immediate and permanent.

Adding new automation capabilities by extending APIs is always welcome. I just need to find a suitable use case for the new cmdlets.


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.

 

Mainframes Are the New AI Infrastructure. Protect it with Secure AI
News Other

Mainframes Are the New AI Infrastructure. Protect it with Secure AI

PuTI / 2025-05-06
Mainframes Are the New AI Infrastructure. Protect it with Secure AI

If your AI workloads run in containers, then securing those containers is the first and most important step in protecting your AI. And as enterprises begin to deploy containerized AI workloads on Red Hat OpenShift for mainframe environments, that priority becomes even more urgent.

If your AI workloads run in containers, then securing those containers is the first and most important step in protecting your AI. And as enterprises begin to deploy containerized AI workloads on Red Hat OpenShift for mainframe environments, that priority becomes even more urgent.Read More

Previous 1 2 3 4 5 6 … 109 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

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss