Author: PuTI
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
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
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
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
C-Caller Block in Rapid Accelerator Mode with Busses
Is it possible to use the C-Caller in rapid accelerator mode when using buses?
When I include my structs as buses using `Simulink.importExternalCTypes`, I can’t run my simulation in rapid accelerator mode, because there is a name collision between my c code and the code generated by the rapid accelerator build process.
Renaming the structs in my code does not work, as then my c -caller blocks don’t recognize them as valid input/output dataformats.
This problem can be reproduced by using the C-Caller example "Call C Functions Using C Caller Block" (https://de.mathworks.com/help/releases/R2024b/simulink/slref/call-c-functions-using-c-caller-block.html).
When switching the example to rapid accelerator mode, the same problem occurs.Is it possible to use the C-Caller in rapid accelerator mode when using buses?
When I include my structs as buses using `Simulink.importExternalCTypes`, I can’t run my simulation in rapid accelerator mode, because there is a name collision between my c code and the code generated by the rapid accelerator build process.
Renaming the structs in my code does not work, as then my c -caller blocks don’t recognize them as valid input/output dataformats.
This problem can be reproduced by using the C-Caller example "Call C Functions Using C Caller Block" (https://de.mathworks.com/help/releases/R2024b/simulink/slref/call-c-functions-using-c-caller-block.html).
When switching the example to rapid accelerator mode, the same problem occurs. Is it possible to use the C-Caller in rapid accelerator mode when using buses?
When I include my structs as buses using `Simulink.importExternalCTypes`, I can’t run my simulation in rapid accelerator mode, because there is a name collision between my c code and the code generated by the rapid accelerator build process.
Renaming the structs in my code does not work, as then my c -caller blocks don’t recognize them as valid input/output dataformats.
This problem can be reproduced by using the C-Caller example "Call C Functions Using C Caller Block" (https://de.mathworks.com/help/releases/R2024b/simulink/slref/call-c-functions-using-c-caller-block.html).
When switching the example to rapid accelerator mode, the same problem occurs. c-code, c-caller, code-integration, rapid-accelerator, simulink, simulation MATLAB Answers — New Questions
How the Google-Wiz acquisition redefines cloud security
Google’s acquisition of Wiz, announced last week, is a pivotal moment as it marks a strategic shift in how cyber security will evolve over the next few years. It instantly turns Google into a major player in security, adding Wiz to other building blocks Google has racked up in the past couple of years, most notably Mandiant and Google Chronicle.
Google’s acquisition of Wiz, announced last week, is a pivotal moment as it marks a strategic shift in how cyber security will evolve over the next few years. It instantly turns Google into a major player in security, adding Wiz to other building blocks Google has racked up in the past couple of years, most notably Mandiant and Google Chronicle.
Read More