Category: News
How can I replicate this plot using the supplied equations?
Post Content Post Content matlab plot MATLAB Answers — New Questions
Cut Through Alert Noise and Fix Toxic Combinations First
Not every security alert is a threat, but the right combination can bring down your cloud native and containerized applications.
Security incidents rarely happen because of a single weak point. Instead, they stem from toxic combinations. A misconfigured workload might seem harmless on its own, but add exposed credentials and an unpatched vulnerability, and attackers have a direct path to exploitation.
Not every security alert is a threat, but the right combination can bring down your cloud native and containerized applications.
Security incidents rarely happen because of a single weak point. Instead, they stem from toxic combinations. A misconfigured workload might seem harmless on its own, but add exposed credentials and an unpatched vulnerability, and attackers have a direct path to exploitation.Read More
Problem with Unpack Block
I need help with Simulink UDP Recieve and the Unpack blocks. I am using a C++ code to stream data from two sensors in our lab via UDP into a Simulink UDP block on the same computer. Each frame of my data contains 10 int_32 values. The first int_32 value is either a 0 or a 1 to indicate which of two sensors is the current frame associated with. The rest of the 9 are the payload data from the sensor.
After receiving the frames from the UDP packet, I also use a Display block to monitor the raw byte values. When I put the byte values in the Display block into a vector and call the char() function on the vector, I get the same signal frame that was sent from each sensor. However, the output from the Unpack block is made of some weird numbers. For instance, when I parse the outputs from the Unpack block into two – (1) sensor identity and (2) payload, the identity value switches between 8240 and 8241 instead of 0 and 1. The payload data is also made up of weird numbers not similar to the actual sensor data. A typical frame of raw data from the sensors appears as this: 0 76 -99 9863 -10 8 -1 184 -87 -56. Can anyone help me? NOTE: In the Unpacking block setting, the same problem using Byte alignment of 1 or 4.I need help with Simulink UDP Recieve and the Unpack blocks. I am using a C++ code to stream data from two sensors in our lab via UDP into a Simulink UDP block on the same computer. Each frame of my data contains 10 int_32 values. The first int_32 value is either a 0 or a 1 to indicate which of two sensors is the current frame associated with. The rest of the 9 are the payload data from the sensor.
After receiving the frames from the UDP packet, I also use a Display block to monitor the raw byte values. When I put the byte values in the Display block into a vector and call the char() function on the vector, I get the same signal frame that was sent from each sensor. However, the output from the Unpack block is made of some weird numbers. For instance, when I parse the outputs from the Unpack block into two – (1) sensor identity and (2) payload, the identity value switches between 8240 and 8241 instead of 0 and 1. The payload data is also made up of weird numbers not similar to the actual sensor data. A typical frame of raw data from the sensors appears as this: 0 76 -99 9863 -10 8 -1 184 -87 -56. Can anyone help me? NOTE: In the Unpacking block setting, the same problem using Byte alignment of 1 or 4. I need help with Simulink UDP Recieve and the Unpack blocks. I am using a C++ code to stream data from two sensors in our lab via UDP into a Simulink UDP block on the same computer. Each frame of my data contains 10 int_32 values. The first int_32 value is either a 0 or a 1 to indicate which of two sensors is the current frame associated with. The rest of the 9 are the payload data from the sensor.
After receiving the frames from the UDP packet, I also use a Display block to monitor the raw byte values. When I put the byte values in the Display block into a vector and call the char() function on the vector, I get the same signal frame that was sent from each sensor. However, the output from the Unpack block is made of some weird numbers. For instance, when I parse the outputs from the Unpack block into two – (1) sensor identity and (2) payload, the identity value switches between 8240 and 8241 instead of 0 and 1. The payload data is also made up of weird numbers not similar to the actual sensor data. A typical frame of raw data from the sensors appears as this: 0 76 -99 9863 -10 8 -1 184 -87 -56. Can anyone help me? NOTE: In the Unpacking block setting, the same problem using Byte alignment of 1 or 4. udp recieve/ unpack block MATLAB Answers — New Questions
tfest function does not recognize nearby poles and zeros in a 2dof system
I am using tfestimate and tfest to experimentally derive the frequency response function of a 2 dof system with 1 input and 2 output.
The problem is that tfest seems to cancel or does not recognize a complex pole pair (resonance) near a complex zero pair (antiresonance) around 6 Hz in the tf from input 1 to output 1 and consequently simplifies the frequency response of the system (see image, correct plot in blue vs simplified plot in red):
I tried different types of windowing in tfestimate but the only one that allows me to obtain the correct frequency response after tfest is rectwin without overlap: this works only with mathematical model I/O data, the blue plot shown above, but with the real model data the problem persists. Other windows like hann (which would be more suitable) also leads to a pole-zero simplification after tfest, with mathematical model I/O data too.
Increasing the number of zeros-poles from 2-4 to 6-8 tfest gives me the correct transfer functions, but I absolutely need the model with 2 zeros and 4 poles for a correct dynamic of the system to control by using the identification of its FRF.
To load I/O data see attachment .mat file
The code is the following:
% Upload I/O data
load ‘test_identificazione_chirp_tauGain_0,1.mat’
% Data from real model
th1abs = theta1_rad_MEAS.signals.values;
th2rel = theta2_rad_MEAS.signals.values;
th2abs = th1abs+th2rel;
tauIn = tauInput.signals.values;
nfs = 4096*4; % Number of samples for FFT
Fs = 1000; % Sampling frequency
% Transfer functions estimate from input 1 (tauIn) to outputs 1 and 2 (th1abs and th2abs)
[H_11, f_H_11] = tfestimate(squeeze(tauIn), squeeze(th1abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
[H_21, f_H_21] = tfestimate(squeeze(tauIn), squeeze(th2abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
% Try also hann window with overlap to get a better curve: hann(floor(size(squeeze(tauIn), 1) / 15)), 3000
% Estimated tf smoothing, by movmean with [x,x] values
H_11 = movmean(H_11,[2,2]);
H_21 = movmean(H_21,[2,2]);
% Estimated tf plot
figure(1)
subplot(1,2,1);
semilogx(f_H_11, mag2db(abs(H_11)), ‘b’, ‘LineWidth’, 0.7);
hold on;
subplot(1,2,2);
semilogx(f_H_21, mag2db(abs(H_21)), ‘b’, ‘LineWidth’, 0.7);
hold on;
% Frequency range to keep only relevant part of tf by tfestimate
fmin = 0.1; % min freq (Hz)
fmax = 15; % max freq (Hz)
idx_11 = (f_H_11 >= fmin) & (f_H_11 <= fmax); % frequency index in the selected range
idx_21 = (f_H_21 >= fmin) & (f_H_21 <= fmax); % frequency index in the selected range
H_11_filtered = H_11(idx_11);
f_11_filtered = f_H_11(idx_11); % corresponding frequencies
H_21_filtered = H_21(idx_21);
f_21_filtered = f_H_21(idx_21); % corresponding frequencies
% rad/s conversion to use in `idfrd`
f_11_rad = f_11_filtered * 2 * pi;
f_21_rad = f_21_filtered * 2 * pi;
% Filtered tf plot
subplot(1,2,1);
semilogx(f_11_filtered, mag2db(abs(H_11_filtered)), ‘r’, ‘LineWidth’, 0.7);
subplot(1,2,2);
semilogx(f_21_filtered, mag2db(abs(H_21_filtered)), ‘r’, ‘LineWidth’, 0.7);
% Creating an identified model based on frequency data
H_11_idfrd = idfrd(H_11_filtered, f_11_rad, ‘Ts’, 0); % continuous time
H_21_idfrd = idfrd(H_21_filtered, f_21_rad, ‘Ts’, 0); % continuous time
% tf estimation in "tf" variable type
np = 4; % system pole number
nz = 2; % system zero number
sys_est_11 = tfest(H_11_idfrd, np, nz);
sys_est_21 = tfest(H_21_idfrd, np, nz);
sys_est = [sys_est_11; sys_est_21]; % [2×1] dimension
% Estimated FRF plot
figure(2)
P = bodeoptions;
P.FreqUnits = ‘Hz’; % Frequency axys in Hz
bodeplot(sys_est, P);
grid on;
hold on;
% Print estimated tf in the Command Window
sys_est
Any help? Thank you in advance!I am using tfestimate and tfest to experimentally derive the frequency response function of a 2 dof system with 1 input and 2 output.
The problem is that tfest seems to cancel or does not recognize a complex pole pair (resonance) near a complex zero pair (antiresonance) around 6 Hz in the tf from input 1 to output 1 and consequently simplifies the frequency response of the system (see image, correct plot in blue vs simplified plot in red):
I tried different types of windowing in tfestimate but the only one that allows me to obtain the correct frequency response after tfest is rectwin without overlap: this works only with mathematical model I/O data, the blue plot shown above, but with the real model data the problem persists. Other windows like hann (which would be more suitable) also leads to a pole-zero simplification after tfest, with mathematical model I/O data too.
Increasing the number of zeros-poles from 2-4 to 6-8 tfest gives me the correct transfer functions, but I absolutely need the model with 2 zeros and 4 poles for a correct dynamic of the system to control by using the identification of its FRF.
To load I/O data see attachment .mat file
The code is the following:
% Upload I/O data
load ‘test_identificazione_chirp_tauGain_0,1.mat’
% Data from real model
th1abs = theta1_rad_MEAS.signals.values;
th2rel = theta2_rad_MEAS.signals.values;
th2abs = th1abs+th2rel;
tauIn = tauInput.signals.values;
nfs = 4096*4; % Number of samples for FFT
Fs = 1000; % Sampling frequency
% Transfer functions estimate from input 1 (tauIn) to outputs 1 and 2 (th1abs and th2abs)
[H_11, f_H_11] = tfestimate(squeeze(tauIn), squeeze(th1abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
[H_21, f_H_21] = tfestimate(squeeze(tauIn), squeeze(th2abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
% Try also hann window with overlap to get a better curve: hann(floor(size(squeeze(tauIn), 1) / 15)), 3000
% Estimated tf smoothing, by movmean with [x,x] values
H_11 = movmean(H_11,[2,2]);
H_21 = movmean(H_21,[2,2]);
% Estimated tf plot
figure(1)
subplot(1,2,1);
semilogx(f_H_11, mag2db(abs(H_11)), ‘b’, ‘LineWidth’, 0.7);
hold on;
subplot(1,2,2);
semilogx(f_H_21, mag2db(abs(H_21)), ‘b’, ‘LineWidth’, 0.7);
hold on;
% Frequency range to keep only relevant part of tf by tfestimate
fmin = 0.1; % min freq (Hz)
fmax = 15; % max freq (Hz)
idx_11 = (f_H_11 >= fmin) & (f_H_11 <= fmax); % frequency index in the selected range
idx_21 = (f_H_21 >= fmin) & (f_H_21 <= fmax); % frequency index in the selected range
H_11_filtered = H_11(idx_11);
f_11_filtered = f_H_11(idx_11); % corresponding frequencies
H_21_filtered = H_21(idx_21);
f_21_filtered = f_H_21(idx_21); % corresponding frequencies
% rad/s conversion to use in `idfrd`
f_11_rad = f_11_filtered * 2 * pi;
f_21_rad = f_21_filtered * 2 * pi;
% Filtered tf plot
subplot(1,2,1);
semilogx(f_11_filtered, mag2db(abs(H_11_filtered)), ‘r’, ‘LineWidth’, 0.7);
subplot(1,2,2);
semilogx(f_21_filtered, mag2db(abs(H_21_filtered)), ‘r’, ‘LineWidth’, 0.7);
% Creating an identified model based on frequency data
H_11_idfrd = idfrd(H_11_filtered, f_11_rad, ‘Ts’, 0); % continuous time
H_21_idfrd = idfrd(H_21_filtered, f_21_rad, ‘Ts’, 0); % continuous time
% tf estimation in "tf" variable type
np = 4; % system pole number
nz = 2; % system zero number
sys_est_11 = tfest(H_11_idfrd, np, nz);
sys_est_21 = tfest(H_21_idfrd, np, nz);
sys_est = [sys_est_11; sys_est_21]; % [2×1] dimension
% Estimated FRF plot
figure(2)
P = bodeoptions;
P.FreqUnits = ‘Hz’; % Frequency axys in Hz
bodeplot(sys_est, P);
grid on;
hold on;
% Print estimated tf in the Command Window
sys_est
Any help? Thank you in advance! I am using tfestimate and tfest to experimentally derive the frequency response function of a 2 dof system with 1 input and 2 output.
The problem is that tfest seems to cancel or does not recognize a complex pole pair (resonance) near a complex zero pair (antiresonance) around 6 Hz in the tf from input 1 to output 1 and consequently simplifies the frequency response of the system (see image, correct plot in blue vs simplified plot in red):
I tried different types of windowing in tfestimate but the only one that allows me to obtain the correct frequency response after tfest is rectwin without overlap: this works only with mathematical model I/O data, the blue plot shown above, but with the real model data the problem persists. Other windows like hann (which would be more suitable) also leads to a pole-zero simplification after tfest, with mathematical model I/O data too.
Increasing the number of zeros-poles from 2-4 to 6-8 tfest gives me the correct transfer functions, but I absolutely need the model with 2 zeros and 4 poles for a correct dynamic of the system to control by using the identification of its FRF.
To load I/O data see attachment .mat file
The code is the following:
% Upload I/O data
load ‘test_identificazione_chirp_tauGain_0,1.mat’
% Data from real model
th1abs = theta1_rad_MEAS.signals.values;
th2rel = theta2_rad_MEAS.signals.values;
th2abs = th1abs+th2rel;
tauIn = tauInput.signals.values;
nfs = 4096*4; % Number of samples for FFT
Fs = 1000; % Sampling frequency
% Transfer functions estimate from input 1 (tauIn) to outputs 1 and 2 (th1abs and th2abs)
[H_11, f_H_11] = tfestimate(squeeze(tauIn), squeeze(th1abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
[H_21, f_H_21] = tfestimate(squeeze(tauIn), squeeze(th2abs), rectwin(floor(size(squeeze(tauIn), 1))), 0, nfs*4, Fs);
% Try also hann window with overlap to get a better curve: hann(floor(size(squeeze(tauIn), 1) / 15)), 3000
% Estimated tf smoothing, by movmean with [x,x] values
H_11 = movmean(H_11,[2,2]);
H_21 = movmean(H_21,[2,2]);
% Estimated tf plot
figure(1)
subplot(1,2,1);
semilogx(f_H_11, mag2db(abs(H_11)), ‘b’, ‘LineWidth’, 0.7);
hold on;
subplot(1,2,2);
semilogx(f_H_21, mag2db(abs(H_21)), ‘b’, ‘LineWidth’, 0.7);
hold on;
% Frequency range to keep only relevant part of tf by tfestimate
fmin = 0.1; % min freq (Hz)
fmax = 15; % max freq (Hz)
idx_11 = (f_H_11 >= fmin) & (f_H_11 <= fmax); % frequency index in the selected range
idx_21 = (f_H_21 >= fmin) & (f_H_21 <= fmax); % frequency index in the selected range
H_11_filtered = H_11(idx_11);
f_11_filtered = f_H_11(idx_11); % corresponding frequencies
H_21_filtered = H_21(idx_21);
f_21_filtered = f_H_21(idx_21); % corresponding frequencies
% rad/s conversion to use in `idfrd`
f_11_rad = f_11_filtered * 2 * pi;
f_21_rad = f_21_filtered * 2 * pi;
% Filtered tf plot
subplot(1,2,1);
semilogx(f_11_filtered, mag2db(abs(H_11_filtered)), ‘r’, ‘LineWidth’, 0.7);
subplot(1,2,2);
semilogx(f_21_filtered, mag2db(abs(H_21_filtered)), ‘r’, ‘LineWidth’, 0.7);
% Creating an identified model based on frequency data
H_11_idfrd = idfrd(H_11_filtered, f_11_rad, ‘Ts’, 0); % continuous time
H_21_idfrd = idfrd(H_21_filtered, f_21_rad, ‘Ts’, 0); % continuous time
% tf estimation in "tf" variable type
np = 4; % system pole number
nz = 2; % system zero number
sys_est_11 = tfest(H_11_idfrd, np, nz);
sys_est_21 = tfest(H_21_idfrd, np, nz);
sys_est = [sys_est_11; sys_est_21]; % [2×1] dimension
% Estimated FRF plot
figure(2)
P = bodeoptions;
P.FreqUnits = ‘Hz’; % Frequency axys in Hz
bodeplot(sys_est, P);
grid on;
hold on;
% Print estimated tf in the Command Window
sys_est
Any help? Thank you in advance! tfest, system identification, frequency response MATLAB Answers — New Questions
Determine the Bode diagram or a transfer function with input output data without tfest
In a partially unknown system, I measured a square-wave signal as input and the associated system response. Now I would like to use fft() to determine the transfer function or the Bode diagram. I have attached the measurements. I have the following code (also from this forum) but it results in this very bad bode plot. where is my mistake?
input = x3bzeit((23000:39000),2);
output = x3bzeit((23000:39000),3);
time = x3bzeit((23000:39000),1)*10^(-6);
Fs = 1/mean(diff(time)); % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(time);
FTinp = fft(input)/L;
FTout = fft(output)/L;
TF = FTout ./ FTinp; % Transfer Function
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
subplot(2,1,1)
plot(Fv, 20*log10(abs(TF(Iv))))
set(gca, ‘XScale’, ‘log’)
title(‘Amplitude’)
ylabel(‘dB’)
subplot(2,1,2)
plot(Fv, angle(TF(Iv))*180/pi)
title(‘Phase’)
ylabel(‘°’)In a partially unknown system, I measured a square-wave signal as input and the associated system response. Now I would like to use fft() to determine the transfer function or the Bode diagram. I have attached the measurements. I have the following code (also from this forum) but it results in this very bad bode plot. where is my mistake?
input = x3bzeit((23000:39000),2);
output = x3bzeit((23000:39000),3);
time = x3bzeit((23000:39000),1)*10^(-6);
Fs = 1/mean(diff(time)); % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(time);
FTinp = fft(input)/L;
FTout = fft(output)/L;
TF = FTout ./ FTinp; % Transfer Function
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
subplot(2,1,1)
plot(Fv, 20*log10(abs(TF(Iv))))
set(gca, ‘XScale’, ‘log’)
title(‘Amplitude’)
ylabel(‘dB’)
subplot(2,1,2)
plot(Fv, angle(TF(Iv))*180/pi)
title(‘Phase’)
ylabel(‘°’) In a partially unknown system, I measured a square-wave signal as input and the associated system response. Now I would like to use fft() to determine the transfer function or the Bode diagram. I have attached the measurements. I have the following code (also from this forum) but it results in this very bad bode plot. where is my mistake?
input = x3bzeit((23000:39000),2);
output = x3bzeit((23000:39000),3);
time = x3bzeit((23000:39000),1)*10^(-6);
Fs = 1/mean(diff(time)); % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(time);
FTinp = fft(input)/L;
FTout = fft(output)/L;
TF = FTout ./ FTinp; % Transfer Function
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
subplot(2,1,1)
plot(Fv, 20*log10(abs(TF(Iv))))
set(gca, ‘XScale’, ‘log’)
title(‘Amplitude’)
ylabel(‘dB’)
subplot(2,1,2)
plot(Fv, angle(TF(Iv))*180/pi)
title(‘Phase’)
ylabel(‘°’) bode, transfer function, fft MATLAB Answers — New Questions
Convert a part of simulink model of my project to VHDL or Verilog code for FPGA
I have completed my direct power control for my wind energy conversion system, this is going to be implemented in hardware for this i want to generated Verilog or VHDL code of Direct Power Control to produce pulses to the Back to back converter, how to do thisI have completed my direct power control for my wind energy conversion system, this is going to be implemented in hardware for this i want to generated Verilog or VHDL code of Direct Power Control to produce pulses to the Back to back converter, how to do this I have completed my direct power control for my wind energy conversion system, this is going to be implemented in hardware for this i want to generated Verilog or VHDL code of Direct Power Control to produce pulses to the Back to back converter, how to do this fpga, verilog, vhdl MATLAB Answers — New Questions
Duplicate Mail User Objects Created for Guest Accounts
EX1015484 Issue Causes Duplicate Exchange Online Mail User Objects Linked to Entra ID Guest Accounts
I am indebted to MVP Joe Stocker for sharing information about incident EX1015484 (duration from February 20 7:38AM PST to February 27 5AM PST). The problem as reported by Microsoft (Figure 1) is that when administrators create new Entra ID guest accounts, duplicate objects appear in Exchange Online that prevent email delivery to the guest accounts.

Creating Mail User Objects
Entra ID and Exchange Online use a dual-write mechanism to update objects. Guest accounts originate when external users are added to Teams or Microsoft 365 groups, or when an administrator invites an external user to join the tenant from the Entra admin center.
When Entra ID creates a new guest user account, Exchange Online creates a mail user object. The existence of the mail user object allows guest users to be included in distribution lists. The mail user object has an email address, so email can be sent to the object, and the transport system is able to route messages to the guest account. Exchange Online removes a mail user object automatically following the removal of the guest user account from Entra ID. If the deleted Entra ID account is restored, the mail user object reappears.
Duplicated SMTP Addresses
In the case of EX1015484, it seems like Microsoft shipped a feature update with a bug that created mail user objects with duplicate SMTP email addresses. The Exchange transport system insists that email-enabled objects have unique email addresses because that’s the basis for routing messages to their final destinations.
Apparently, tenants need to contact Microsoft support to remove the duplicate objects. You can’t just remove duplicate mail user objects because of the dual-write mechanism. Entra ID is the directory of record, so any attempts to run Remove-MailUser to delete an object linked to a guest account will fail:
Remove-MailUser -Identity a9f35d52-572e-4438-a129-08d8c00ae88b Confirm Are you sure you want to perform this action? Removing the mail enabled user Identity:"a9f35d52-572e-4438-a129-08d8c00ae88b" will delete the mail enabled user and the associated Windows Live ID "elifon_contoso.com#EXT#office365itpros.onmicrosoft.com". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y Remove-MailUser: ||An Azure Active Directory call was made to keep object in sync between Azure Active Directory and Exchange Online. However, it failed. Detailed error message: Resource 'a9f35d52-572e-4438-a129-08d8c00ae88b' does not exist or one of its queried reference-property objects are not present. DualWrite (Graph) RequestId: 61220f4c-90ea-4fa5-bf1f-c07b5d10c26d The issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members for more information.
Removing the guest accounts from Entra ID and restoring them after a few minutes might well work. I can’t say because the problem didn’t affect any tenant that I have access to.
In any case, Joe posted some PowerShell to find mail-enabled objects with duplicate SMTP addresses:
Connect-ExchangeOnline; Get-Recipient -ResultSize unlimited | Select-Object -ExpandProperty EmailAddresses | Where-Object {$_ -like "smtp:*"} | Group-Object -Property {$_.ToString().ToLower()} | Where-Object {$_.Count -gt 1} | Select-Object @{Name="SMTPAddress";Expression={$_.Name.Substring(5)}}, Count | Sort-Object -Property Count -Descending
The code is faster when a filter is applied to select mail user objects. Here’s my version:
Connect-ExchangeOnline; Get-ExoRecipient -RecipientTypeDetails MailUser -ResultSize unlimited | Select-Object -ExpandProperty EmailAddresses | Where-Object {$_ -like "smtp:*"} | Group-Object -Property {$_.ToString().ToLower()} | Where-Object {$_.Count -gt 1} | Select-Object @{Name="SMTPAddress";Expression={$_.Name.Substring(5)}}, Count | Sort-Object -Property Count -Descending
I tested the amended code by removing the check for addresses with a count greater than 1, so I am pretty sure that it works. Feel free to improve the code!
Problems Happen
It’s regrettable that EX1015484 happens, but that’s the nature of software. The issue has been resolved, and you will no longer encounter mail user objects with duplicate SMTP addresses in your tenant. It’s worth running the code shown above just in case that the problem hit your tenant and left some bad objects behind.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive monthly insights into what happens, why it happens, and what new features and capabilities mean for your tenant.
Xlim error in App designer
% Value changing function: STARTKnob_2
function STARTKnob_2ValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StartYear = event.Value;
if app.StartYear>app.StopYear-1 %checks the increasing-xrule
app.StopYear=min([app.StartYear+1,app.STOPKnob.Limits(2)]);
app.STOPKnob.Value=app.StopYear; %rotate the stop knob
app.StartYear=app.StopYear-1;
app.STARTKnob_2.Value=app.StartYear;
end
app.plotData();
end
% Value changing function: STOPKnob
function STOPKnobValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StopYear = event.Value;
if app.StopYear<app.StartYear+1
app.StartYear=max([app.StopYear-1 app.STARTKnob_2.Limits(1)]);
app.STARTKnob_2.Value=app.StartYear;
app.StopYear=app.StartYear+1;
app.STOPKnob.Value=app.StopYear;
end
app.plotData();% Value changing function: STARTKnob_2
function STARTKnob_2ValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StartYear = event.Value;
if app.StartYear>app.StopYear-1 %checks the increasing-xrule
app.StopYear=min([app.StartYear+1,app.STOPKnob.Limits(2)]);
app.STOPKnob.Value=app.StopYear; %rotate the stop knob
app.StartYear=app.StopYear-1;
app.STARTKnob_2.Value=app.StartYear;
end
app.plotData();
end
% Value changing function: STOPKnob
function STOPKnobValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StopYear = event.Value;
if app.StopYear<app.StartYear+1
app.StartYear=max([app.StopYear-1 app.STARTKnob_2.Limits(1)]);
app.STARTKnob_2.Value=app.StartYear;
app.StopYear=app.StartYear+1;
app.STOPKnob.Value=app.StopYear;
end
app.plotData(); % Value changing function: STARTKnob_2
function STARTKnob_2ValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StartYear = event.Value;
if app.StartYear>app.StopYear-1 %checks the increasing-xrule
app.StopYear=min([app.StartYear+1,app.STOPKnob.Limits(2)]);
app.STOPKnob.Value=app.StopYear; %rotate the stop knob
app.StartYear=app.StopYear-1;
app.STARTKnob_2.Value=app.StartYear;
end
app.plotData();
end
% Value changing function: STOPKnob
function STOPKnobValueChanging(app, event)
arguments
app
event.Value(1,1) {mustBeNumeric}=0
end
app.StopYear = event.Value;
if app.StopYear<app.StartYear+1
app.StartYear=max([app.StopYear-1 app.STARTKnob_2.Limits(1)]);
app.STARTKnob_2.Value=app.StartYear;
app.StopYear=app.StartYear+1;
app.STOPKnob.Value=app.StopYear;
end
app.plotData(); xlim error in app designer MATLAB Answers — New Questions
IngressNightmare Vulnerabilities: All You Need to Know
On March 24, 2025, a series of several critical vulnerabilities (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, and CVE-2025-1974) were disclosed in the ingress-nginx
Controller for Kubernetes, collectively termed IngressNightmare. These vulnerabilities could lead to a complete cluster takeover by allowing attackers unauthorized access to all secrets stored across all namespaces in the Kubernetes cluster.
On March 24, 2025, a series of several critical vulnerabilities (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, and CVE-2025-1974) were disclosed in the ingress-nginx Controller for Kubernetes, collectively termed IngressNightmare. These vulnerabilities could lead to a complete cluster takeover by allowing attackers unauthorized access to all secrets stored across all namespaces in the Kubernetes cluster.
Read More
How can I simulate an active distribution system using the Monte Carlo method in MATLAB?
I need to simulate an article using MATLAB based on customer satisfaction using the Monte Carlo method
using by simulink or matlab code.
I know that this article doesn’t have an accurate circuit or block diagram and it should be optimized from previous sources. Assuming that a part is disconnected or connected randomly
You can see the original article here
here
anyone can help me on this ?!
best regards.I need to simulate an article using MATLAB based on customer satisfaction using the Monte Carlo method
using by simulink or matlab code.
I know that this article doesn’t have an accurate circuit or block diagram and it should be optimized from previous sources. Assuming that a part is disconnected or connected randomly
You can see the original article here
here
anyone can help me on this ?!
best regards. I need to simulate an article using MATLAB based on customer satisfaction using the Monte Carlo method
using by simulink or matlab code.
I know that this article doesn’t have an accurate circuit or block diagram and it should be optimized from previous sources. Assuming that a part is disconnected or connected randomly
You can see the original article here
here
anyone can help me on this ?!
best regards. simulink, monte carlo, active distribution networks, customer satisfaction MATLAB Answers — New Questions
add_line connection for to column cells
Hi there,
While creating column Cells connections, last cell in each column still not connected…stayed unconnected.
I wonder if someone can assist to solve this problem.
please see shared Matlab code (file.m) and picture (marked in red line)
Thanks for help
Tommy
open_system(‘Module_arc’)
mdl = ‘Module_arc’;
bat_rec_model = find_system(mdl,’FindAll’,’on’,’Name’,’Module_arc’);
%%% add Cell – basic CELL_unit:
for i=1:2 %% set two columns
colPos = 200; %% spaces between columns
for v=1:4 %% loop for 13 cells per column
nl=num2str(v + 4*(i-1));
if i==1
AddCell(v) = add_block(‘CELL_Unit/CELL 1’, [mdl,’/CELL ‘,nl]);
else
AddCell(v) = add_block(‘CELL_Unit2/CELL 1’, [mdl,’/CELL ‘,nl]);
end
posc = get(AddCell(v),’Position’);
set(AddCell(v),’Position’,posc + [100+(i-1)*colPos 120*(v-1)-45 100+(i-1)*colPos 120*(v-1)-45])
PH_AddCell{v}=get(AddCell(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_AddCell{v-1}.LConn(2),PH_AddCell{v}.LConn(1),’Autorouting’,’on’);
end
end
switch i
case 2
Minus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
PH_minus2Cell=get(Minus_2_Cell,’PortHandles’);
Neg_port= add_line(mdl,PH_minus2Cell.RConn,PH_AddCell{1}.LConn(1),’Autorouting’,’on’);
case 1
Plus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
PH_plus2Cell=get(Plus_2_Cell,’PortHandles’);
Pos_port= add_line(mdl,PH_plus2Cell.RConn,PH_AddCell{1}.LConn(1), ‘Autorouting’,’on’);
end
endHi there,
While creating column Cells connections, last cell in each column still not connected…stayed unconnected.
I wonder if someone can assist to solve this problem.
please see shared Matlab code (file.m) and picture (marked in red line)
Thanks for help
Tommy
open_system(‘Module_arc’)
mdl = ‘Module_arc’;
bat_rec_model = find_system(mdl,’FindAll’,’on’,’Name’,’Module_arc’);
%%% add Cell – basic CELL_unit:
for i=1:2 %% set two columns
colPos = 200; %% spaces between columns
for v=1:4 %% loop for 13 cells per column
nl=num2str(v + 4*(i-1));
if i==1
AddCell(v) = add_block(‘CELL_Unit/CELL 1’, [mdl,’/CELL ‘,nl]);
else
AddCell(v) = add_block(‘CELL_Unit2/CELL 1’, [mdl,’/CELL ‘,nl]);
end
posc = get(AddCell(v),’Position’);
set(AddCell(v),’Position’,posc + [100+(i-1)*colPos 120*(v-1)-45 100+(i-1)*colPos 120*(v-1)-45])
PH_AddCell{v}=get(AddCell(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_AddCell{v-1}.LConn(2),PH_AddCell{v}.LConn(1),’Autorouting’,’on’);
end
end
switch i
case 2
Minus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
PH_minus2Cell=get(Minus_2_Cell,’PortHandles’);
Neg_port= add_line(mdl,PH_minus2Cell.RConn,PH_AddCell{1}.LConn(1),’Autorouting’,’on’);
case 1
Plus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
PH_plus2Cell=get(Plus_2_Cell,’PortHandles’);
Pos_port= add_line(mdl,PH_plus2Cell.RConn,PH_AddCell{1}.LConn(1), ‘Autorouting’,’on’);
end
end Hi there,
While creating column Cells connections, last cell in each column still not connected…stayed unconnected.
I wonder if someone can assist to solve this problem.
please see shared Matlab code (file.m) and picture (marked in red line)
Thanks for help
Tommy
open_system(‘Module_arc’)
mdl = ‘Module_arc’;
bat_rec_model = find_system(mdl,’FindAll’,’on’,’Name’,’Module_arc’);
%%% add Cell – basic CELL_unit:
for i=1:2 %% set two columns
colPos = 200; %% spaces between columns
for v=1:4 %% loop for 13 cells per column
nl=num2str(v + 4*(i-1));
if i==1
AddCell(v) = add_block(‘CELL_Unit/CELL 1’, [mdl,’/CELL ‘,nl]);
else
AddCell(v) = add_block(‘CELL_Unit2/CELL 1’, [mdl,’/CELL ‘,nl]);
end
posc = get(AddCell(v),’Position’);
set(AddCell(v),’Position’,posc + [100+(i-1)*colPos 120*(v-1)-45 100+(i-1)*colPos 120*(v-1)-45])
PH_AddCell{v}=get(AddCell(v),’PortHandles’);
%%% connect minus to plus ports:
if v>1
add_line(mdl,PH_AddCell{v-1}.LConn(2),PH_AddCell{v}.LConn(1),’Autorouting’,’on’);
end
end
switch i
case 2
Minus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’NEG’);
PH_minus2Cell=get(Minus_2_Cell,’PortHandles’);
Neg_port= add_line(mdl,PH_minus2Cell.RConn,PH_AddCell{1}.LConn(1),’Autorouting’,’on’);
case 1
Plus_2_Cell = find_system(mdl,’LookUnderMasks’,’All’,’FindAll’,’on’,’Name’,’POS’);
PH_plus2Cell=get(Plus_2_Cell,’PortHandles’);
Pos_port= add_line(mdl,PH_plus2Cell.RConn,PH_AddCell{1}.LConn(1), ‘Autorouting’,’on’);
end
end matlab, simulink MATLAB Answers — New Questions
Data must be a single matrix Y or a list of pairs X,Y
My aim is to plot 2d the function ph (xx,yy) in the plane (xx,yy).
x-axis is xx, y-axis is yy, and the function ph(xx,yy)
=====================================================
q=1.0;
v=(1.0-sqrt(1.0+4.0*q))/(2.0*q);
p=4*atan(1.0);
for j=0:100
a=0.0+j.*p/100;
fori=0:100
b=0.0+i.*p/100;
x=cos(a);
y=sin(b);
z=x.*x+y.*y;
if z<1.0
xx=x;
yy=y;
zz=z;
D=1.0+q.*(v.*v)*(zz.*zz);
N=1.0-v.*zz-q.*(v.*v)*(zz.*zz);
ph=D/N;
hold on
plot(xx,yy,ph)
end
end
end
=====================================My aim is to plot 2d the function ph (xx,yy) in the plane (xx,yy).
x-axis is xx, y-axis is yy, and the function ph(xx,yy)
=====================================================
q=1.0;
v=(1.0-sqrt(1.0+4.0*q))/(2.0*q);
p=4*atan(1.0);
for j=0:100
a=0.0+j.*p/100;
fori=0:100
b=0.0+i.*p/100;
x=cos(a);
y=sin(b);
z=x.*x+y.*y;
if z<1.0
xx=x;
yy=y;
zz=z;
D=1.0+q.*(v.*v)*(zz.*zz);
N=1.0-v.*zz-q.*(v.*v)*(zz.*zz);
ph=D/N;
hold on
plot(xx,yy,ph)
end
end
end
===================================== My aim is to plot 2d the function ph (xx,yy) in the plane (xx,yy).
x-axis is xx, y-axis is yy, and the function ph(xx,yy)
=====================================================
q=1.0;
v=(1.0-sqrt(1.0+4.0*q))/(2.0*q);
p=4*atan(1.0);
for j=0:100
a=0.0+j.*p/100;
fori=0:100
b=0.0+i.*p/100;
x=cos(a);
y=sin(b);
z=x.*x+y.*y;
if z<1.0
xx=x;
yy=y;
zz=z;
D=1.0+q.*(v.*v)*(zz.*zz);
N=1.0-v.*zz-q.*(v.*v)*(zz.*zz);
ph=D/N;
hold on
plot(xx,yy,ph)
end
end
end
===================================== error in plot MATLAB Answers — New Questions
Legends using bodeplot with latex interpretation
Hi, I am trying to write code for plotting frequency responses and cannot get the legend to accept latex formatting. I know there are issues with all of these signal processing tools and stuff like legends, but if I open the figure in a new window and manually adjust the legend in the property editor then it is possible. So there must be a work around. Here is one of the many iterations I have used, in this version the legend appears, but as soon as I add interpreter to the command then I get errors such as seen below:
G1 = G(1,1);
G2 = G(1,2);
G3 = G(2,1);
G4 = G(2,2);
names = {‘$G_{11}$’, ‘$G_{12}$’, ‘$G_{21}$’, ‘$G_{22}$’};
LegendValues = string(names);
bp = bodeplot(G1, G2, G3, G4);
opts = bodeoptions;
opts.Title.String = ”; % Disable title
opts.XLabel.Interpreter = ‘latex’;
opts.XLabel.FontSize = 12;
opts.YLabel.Interpreter = ‘latex’;
opts.YLabel.FontSize = 12;
opts.PhaseVisible = ‘off’; % Hide phase plot
opts.Grid = ‘on’; % Enable grid
setoptions(bp, opts);
legend(LegendValues);
Error if I add interpreter (legend(LegendValues, "Interpreter","latex");):
"Error using legend (line 176). First argument must be text."
I appreciate any input.
MarcusHi, I am trying to write code for plotting frequency responses and cannot get the legend to accept latex formatting. I know there are issues with all of these signal processing tools and stuff like legends, but if I open the figure in a new window and manually adjust the legend in the property editor then it is possible. So there must be a work around. Here is one of the many iterations I have used, in this version the legend appears, but as soon as I add interpreter to the command then I get errors such as seen below:
G1 = G(1,1);
G2 = G(1,2);
G3 = G(2,1);
G4 = G(2,2);
names = {‘$G_{11}$’, ‘$G_{12}$’, ‘$G_{21}$’, ‘$G_{22}$’};
LegendValues = string(names);
bp = bodeplot(G1, G2, G3, G4);
opts = bodeoptions;
opts.Title.String = ”; % Disable title
opts.XLabel.Interpreter = ‘latex’;
opts.XLabel.FontSize = 12;
opts.YLabel.Interpreter = ‘latex’;
opts.YLabel.FontSize = 12;
opts.PhaseVisible = ‘off’; % Hide phase plot
opts.Grid = ‘on’; % Enable grid
setoptions(bp, opts);
legend(LegendValues);
Error if I add interpreter (legend(LegendValues, "Interpreter","latex");):
"Error using legend (line 176). First argument must be text."
I appreciate any input.
Marcus Hi, I am trying to write code for plotting frequency responses and cannot get the legend to accept latex formatting. I know there are issues with all of these signal processing tools and stuff like legends, but if I open the figure in a new window and manually adjust the legend in the property editor then it is possible. So there must be a work around. Here is one of the many iterations I have used, in this version the legend appears, but as soon as I add interpreter to the command then I get errors such as seen below:
G1 = G(1,1);
G2 = G(1,2);
G3 = G(2,1);
G4 = G(2,2);
names = {‘$G_{11}$’, ‘$G_{12}$’, ‘$G_{21}$’, ‘$G_{22}$’};
LegendValues = string(names);
bp = bodeplot(G1, G2, G3, G4);
opts = bodeoptions;
opts.Title.String = ”; % Disable title
opts.XLabel.Interpreter = ‘latex’;
opts.XLabel.FontSize = 12;
opts.YLabel.Interpreter = ‘latex’;
opts.YLabel.FontSize = 12;
opts.PhaseVisible = ‘off’; % Hide phase plot
opts.Grid = ‘on’; % Enable grid
setoptions(bp, opts);
legend(LegendValues);
Error if I add interpreter (legend(LegendValues, "Interpreter","latex");):
"Error using legend (line 176). First argument must be text."
I appreciate any input.
Marcus bodeplot, legend MATLAB Answers — New Questions
How to convert polynomial trajectory block out to a 4×4 homogeneous transformation matrix
I created 7 waypoints using inverse kinematics designer app and exported the configuration into a matrix (7×6 matrix) containg xyz position and respective euler angles. From this matrix i input only the xyz position data(3×7 matrix) as waypoints to a polynomial trajectory block with time. But when i run the simulink an error is showing up, saying that polynomial trajectory output should be 4×4 homogeneous matrix inorder to connect to the inverse kinematics block input (pose). How could I resolve this issueI created 7 waypoints using inverse kinematics designer app and exported the configuration into a matrix (7×6 matrix) containg xyz position and respective euler angles. From this matrix i input only the xyz position data(3×7 matrix) as waypoints to a polynomial trajectory block with time. But when i run the simulink an error is showing up, saying that polynomial trajectory output should be 4×4 homogeneous matrix inorder to connect to the inverse kinematics block input (pose). How could I resolve this issue I created 7 waypoints using inverse kinematics designer app and exported the configuration into a matrix (7×6 matrix) containg xyz position and respective euler angles. From this matrix i input only the xyz position data(3×7 matrix) as waypoints to a polynomial trajectory block with time. But when i run the simulink an error is showing up, saying that polynomial trajectory output should be 4×4 homogeneous matrix inorder to connect to the inverse kinematics block input (pose). How could I resolve this issue polynomial trajectory, inverse kinematics, simulink MATLAB Answers — New Questions
Artificial Intelligence and Microsoft 365 Administration
Artificial Intelligence and PowerShell for Tenant Administration – An Unlikely Couple?
I’ve been asked by a few people to comment about Lokka, the new creation of Merill Fernando, a program manager in the Microsoft Entra ID group. Lokka is a proof of concept exploring how the combination of AI Large Language Models (LLMs) and the Model Context Protocol (MCP) can bring value to Microsoft 365 administration. In this case, by generating Graph API queries in response to administrator prompts. For example, “How many user accounts belong to the marketing or sales departments.”
Merill’s a very inventive individual whose capacity to invent extends to his eye-catching tweet asking the question if Lokka is the end of PowerShell for Microsoft 365 administrators (Figure 1).

Helping Administrators with Simple Queries and Examples
Of course, the advent of a proof of concept like Lokka doesn’t mean that Microsoft 365 administrators suddenly need to lose all interest in PowerShell. AI tools can certainly be helpful in responding to queries that aren’t covered by the standard admin center GUI. They can also educate administrators by showing them how to use PowerShell to run Graph AI queries.
The Exchange Server 2007 product was the first Microsoft server to embrace PowerShell. One of the brainwaves in that product was how the Exchange Management Center (EMC) console displayed the PowerShell code it executed when it performed actions. Figure 2 shows how the EMC in Exchange Server 2007 displayed the code used to create a new mailbox.

Seeing the PowerShell code in action and being able to copy the commands for reuse helped administrators master basic PowerShell command for managing Exchange servers. Another example is how Merill’s Graph X-Ray tool gives administrators a glimpse into the Graph API requests run to perform some actions in the console.
Artificial Intelligence and PowerShell in the Microsoft 365 Admin Center
The Microsoft 365 admin center already has Copilot assistance that’s added automatically when a tenant buys some Copilot for Microsoft 365 licenses (Figure 3). The implementation is much like a Copilot Chat session where an administrator prompts Copilot for some information and receives a response containing instructions and possibly some PowerShell code. I imagine that the content used by Copilot is a restricted set of documentation, just like you can restrict a Copilot agent to reasoning over certain SharePoint and external web sites when it composes its responses.

The Importance of Training Material
There’s no doubt that we will see increasing use of AI to assist administrators with tasks as time progresses. The assistance will become more comprehensive, intelligent, and useful. However, the usefulness of any generative AI tool is bounded by the material used to create its LLMs. This means that the answers that an administrative agent can give, whether how-to instructions or PowerShell code snippets, depend on text scanned to build the LLM. If an answer exists to a question, the AI can respond. This includes incorrect answers because the LLM doesn’t know if content contained in source material is accurate. And if an answer isn’t available, the AI cannot respond without hallucinating. For example, Copilot has been known to include the names of PowerShell cmdlets that don’t exist in its responses.
The current set of AI tools we have don’t include insight or creativity. They can respond to known problems, but even so, responses are often based on whatever the most common answer is found in its source material. Those answers might be inefficient. Take the code suggested in Copilot’s response in Figure 3.
Get-MgUser | Where Department eq "Sales"
Several problems exist with the answer. First, the syntax is incorrect and won’t work because the piping to the Where-Object cmdlet is wrong (probably because Copilot absorbed an incorrect answer from some source). Second, the Department property is not retrieved by the Get-MgUser cmdlet unless explicitly requested.
Get-MgUser -Property Id, Displayname, Department | Where-Object {$_.Department -eq "Sales"}
Third, it’s always better to use a server-side filter to retrieve PowerShell objects. And in the case of user accounts, it’s also a good idea to filter out guest accounts.
Get-MgUser -Filter "Department eq 'Sales' and userType eq 'member'"
The takeaway is that generative AI can only be as good as the material used for its training. The current state of the art is such that AI can’t recognize when its output is incorrect.
PowerShell Still an Essential Tenant Management Skill
Even with the prospect of better, more complete, and more comprehensive AI tooling on the horizon, I still believe that Microsoft 365 administrators should take the time to acquire a working knowledge of PowerShell. For the foreseeable future, AI might well offer help to those who don’t even know how to start using PowerShell to manage a tenant.
Experience to date demonstrates that AI is unlikely to master the creativity that’s often needed to create something like a full-blown tenant licensing report, complete with costs anytime soon. Combining data from multiple sources to deliver a solution requires more ingenuity than running straightforward Graph requests. I await to be proven wrong that artificial intelligence and PowerShell can do more than perform straighforward, mundane tasks. In the interim, using GitHub Copilot to accelerate the development of PowerShell scripts might be the most productive way to use AI to improve Microsoft 365 automation.
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.
Error using save, too many output arguments – don’t know how to fix.
Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ;Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ; Hi y’all
I am trying to save multiple tables I’ve edited in matlab, but I get this error:
Error using save
Too many output arguments.
I’m having trouble figuring out how to fix this. The code it’s probably referring to is:
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
from the full code here:
% Pull data from files
function [output] = each_day_table(month, day)
fileNames = sprintf(‘D2024%02d%02d*.csv’, month, day) ;
datastore_result = datastore(fileNames) ;
original_data = readall(datastore_result) ;
output = original_data ;
end
% Find Where Equivilant Diamiter > 150 And Remove (ICB measures b/w 2 – 150 μm)
function [output] = remove_150(original)
new = original ;
Greater150 = original.EquivDiameter > 150 ;
new(Greater150, 🙂 = [] ;
output = new ;
end
% To Save Each Newly Made File Onto Computer
function [output] = save_on_Computer(ReferenceData, month, day)
file_name = "OL_"+month+"_"+day+".csv" ;
savefile = save(file_name) ;
output = savefile ;
end
function [output] = do_everything(year, month, day)
original_data = each_day_table(month, day) ;
data_lessthan_150 = remove_150( original_data) ;
save_to_folder = save_on_Computer(data_without_zeroes, month, day) ;
output = save_on_Computer ; % change data_with_surface_area with data_with_ratio
end
OL_06_03 = do_everything (2024,06,03) ;
OL_06_04 = do_everything (2024,06,04) ;
OL_06_05 = do_everything (2024,06,05) ;
OL_06_06 = do_everything (2024,06,06) ; save, error MATLAB Answers — New Questions
how to find the accuracy from the predicted labels for test data in Matlab?
I am using classification learner app svm generated code for the classification of multiclass dataset.
Now I wanted to test with the unseen dataset for this I am using yfit.
Now I got the predicted labels for the test data. How to find the test accuracy and from the predicted laebls?
Can someone please help me in this.I am using classification learner app svm generated code for the classification of multiclass dataset.
Now I wanted to test with the unseen dataset for this I am using yfit.
Now I got the predicted labels for the test data. How to find the test accuracy and from the predicted laebls?
Can someone please help me in this. I am using classification learner app svm generated code for the classification of multiclass dataset.
Now I wanted to test with the unseen dataset for this I am using yfit.
Now I got the predicted labels for the test data. How to find the test accuracy and from the predicted laebls?
Can someone please help me in this. calculate test data accuracy MATLAB Answers — New Questions
Precision issue when comparing matlab output with c code output
I am trying to compare my c code output with matlab output. My results are matching up to 18th decimal points. When both matlab and c compiler uses ieee754 floating point format. Then why am I observing the difference. As matlab by default uses double precision, my c code is also using double data type.I am trying to compare my c code output with matlab output. My results are matching up to 18th decimal points. When both matlab and c compiler uses ieee754 floating point format. Then why am I observing the difference. As matlab by default uses double precision, my c code is also using double data type. I am trying to compare my c code output with matlab output. My results are matching up to 18th decimal points. When both matlab and c compiler uses ieee754 floating point format. Then why am I observing the difference. As matlab by default uses double precision, my c code is also using double data type. ieee754, precision, accuracy MATLAB Answers — New Questions
how can I convert linear figure’s axis to logarithmic?
Hi,
I have following Figure#1, I want to convert only y-axis to logaritmic scale. I tried several ways but each time outcome is not normal. Can you please tell me how to achive y-axis of Figure#2. Thanks for you help.
% this my figure script.
figure;
imagesc(t, fliplr(f), ST_normalized)
previously I used the follwing command, it did not work. I want to have the image of Figure#2 in y-axis.
for instance, "10" in Figure#1 shoud be "10^1" in a new scaled figure.
set(gca, ‘YScale’, ‘log’)Hi,
I have following Figure#1, I want to convert only y-axis to logaritmic scale. I tried several ways but each time outcome is not normal. Can you please tell me how to achive y-axis of Figure#2. Thanks for you help.
% this my figure script.
figure;
imagesc(t, fliplr(f), ST_normalized)
previously I used the follwing command, it did not work. I want to have the image of Figure#2 in y-axis.
for instance, "10" in Figure#1 shoud be "10^1" in a new scaled figure.
set(gca, ‘YScale’, ‘log’) Hi,
I have following Figure#1, I want to convert only y-axis to logaritmic scale. I tried several ways but each time outcome is not normal. Can you please tell me how to achive y-axis of Figure#2. Thanks for you help.
% this my figure script.
figure;
imagesc(t, fliplr(f), ST_normalized)
previously I used the follwing command, it did not work. I want to have the image of Figure#2 in y-axis.
for instance, "10" in Figure#1 shoud be "10^1" in a new scaled figure.
set(gca, ‘YScale’, ‘log’) matlab, figure, scale MATLAB Answers — New Questions
Massive slowdown for Apple Silicon in computing SVD
I recently notice that there is an extreme slowdown in my version of Matlab while computing an SVD when the size of the matrix crosses some threshold. I came up with the following example that demonstrates my issue:
N = [10000 11000 12000 13000];
for i = 1:4
A = randn(N(i),3);
tic;
[U,S,V] = svd(A,0);
toc;
end
When I run this in Matlab R2024b (macOS Apple silicon), the output is:
Elapsed time is 0.000396 seconds.
Elapsed time is 0.000275 seconds.
Elapsed time is 0.000264 seconds.
Elapsed time is 0.083150 seconds.
Of course the exact numbers vary trial to trial, but the speed for the last run (where N = 13000) is consistently orders of magnitude slower.
When I run this same code on Matlab R2024b (Intel processor) on the same computer, this slow down does not happen. I was able to replicate this issue across two different Macs (one with M1 and another with M3) and different versions of Matlab (going back to R2023b).
Any idea why this might be happening in the silicon version?
Edit: I’m running macOS 15.1.1I recently notice that there is an extreme slowdown in my version of Matlab while computing an SVD when the size of the matrix crosses some threshold. I came up with the following example that demonstrates my issue:
N = [10000 11000 12000 13000];
for i = 1:4
A = randn(N(i),3);
tic;
[U,S,V] = svd(A,0);
toc;
end
When I run this in Matlab R2024b (macOS Apple silicon), the output is:
Elapsed time is 0.000396 seconds.
Elapsed time is 0.000275 seconds.
Elapsed time is 0.000264 seconds.
Elapsed time is 0.083150 seconds.
Of course the exact numbers vary trial to trial, but the speed for the last run (where N = 13000) is consistently orders of magnitude slower.
When I run this same code on Matlab R2024b (Intel processor) on the same computer, this slow down does not happen. I was able to replicate this issue across two different Macs (one with M1 and another with M3) and different versions of Matlab (going back to R2023b).
Any idea why this might be happening in the silicon version?
Edit: I’m running macOS 15.1.1 I recently notice that there is an extreme slowdown in my version of Matlab while computing an SVD when the size of the matrix crosses some threshold. I came up with the following example that demonstrates my issue:
N = [10000 11000 12000 13000];
for i = 1:4
A = randn(N(i),3);
tic;
[U,S,V] = svd(A,0);
toc;
end
When I run this in Matlab R2024b (macOS Apple silicon), the output is:
Elapsed time is 0.000396 seconds.
Elapsed time is 0.000275 seconds.
Elapsed time is 0.000264 seconds.
Elapsed time is 0.083150 seconds.
Of course the exact numbers vary trial to trial, but the speed for the last run (where N = 13000) is consistently orders of magnitude slower.
When I run this same code on Matlab R2024b (Intel processor) on the same computer, this slow down does not happen. I was able to replicate this issue across two different Macs (one with M1 and another with M3) and different versions of Matlab (going back to R2023b).
Any idea why this might be happening in the silicon version?
Edit: I’m running macOS 15.1.1 svd, mac, memory, speed MATLAB Answers — New Questions