Month: February 2025
Where do i find sequence component for three-phase source for asymmetrical fault of bus system?
Three-phase fault (symmetrical & asymmetrical fault) of a 2 bus system.
I want to create fault using three-phase fault from simulink but the results are not the same as my calculations. I have verified that my calculation is correct but I cant seem to get the correct fault waveform from simulink as there are missing sequence components/parameters such as x0,x1,x2 at the source.
The transmission line with sequence parameters that I can find are pi model and distributed line parameters, are there only reactance model that has sequence parameters too?Three-phase fault (symmetrical & asymmetrical fault) of a 2 bus system.
I want to create fault using three-phase fault from simulink but the results are not the same as my calculations. I have verified that my calculation is correct but I cant seem to get the correct fault waveform from simulink as there are missing sequence components/parameters such as x0,x1,x2 at the source.
The transmission line with sequence parameters that I can find are pi model and distributed line parameters, are there only reactance model that has sequence parameters too? Three-phase fault (symmetrical & asymmetrical fault) of a 2 bus system.
I want to create fault using three-phase fault from simulink but the results are not the same as my calculations. I have verified that my calculation is correct but I cant seem to get the correct fault waveform from simulink as there are missing sequence components/parameters such as x0,x1,x2 at the source.
The transmission line with sequence parameters that I can find are pi model and distributed line parameters, are there only reactance model that has sequence parameters too? three-phase fault, sequence components, sequence parameters MATLAB Answers — New Questions
Uncertainty for exponential fitting
Hello,
I am using Curve Fitting Toolbox in MatLab, to fit single and double expoenential decays. (I’ve used cftool)
In this toolbox, the confidence interval is calculated for both the exponential coefficient and time. However, I do not know how to calculate uncertainty for exponential distribution? I need to report the time with uncertainty like this : t= 2.3 ± …
Would it be possible for someone to answer my question. Your help is really needed.
Thank you in advance,Hello,
I am using Curve Fitting Toolbox in MatLab, to fit single and double expoenential decays. (I’ve used cftool)
In this toolbox, the confidence interval is calculated for both the exponential coefficient and time. However, I do not know how to calculate uncertainty for exponential distribution? I need to report the time with uncertainty like this : t= 2.3 ± …
Would it be possible for someone to answer my question. Your help is really needed.
Thank you in advance, Hello,
I am using Curve Fitting Toolbox in MatLab, to fit single and double expoenential decays. (I’ve used cftool)
In this toolbox, the confidence interval is calculated for both the exponential coefficient and time. However, I do not know how to calculate uncertainty for exponential distribution? I need to report the time with uncertainty like this : t= 2.3 ± …
Would it be possible for someone to answer my question. Your help is really needed.
Thank you in advance, exponential fitting, curve fitting, uncertainty MATLAB Answers — New Questions
Simulink model of avarage values model of buck converter with Pi current control
Hello, how can I model an avarage values model of a buck converter with a PI current control. The idea was to go in p.u. values and with a basic pi loop that generate the Duty cycle (in p.u. taking as base the max load is equivalent to the voltage in p.u.) that is entering the controlled voltage source block (Simscape-9) that is feeding a resistance (load) through an filtering inductance.
can you give me a schematic in simulink of the model?
thanks
something like thatHello, how can I model an avarage values model of a buck converter with a PI current control. The idea was to go in p.u. values and with a basic pi loop that generate the Duty cycle (in p.u. taking as base the max load is equivalent to the voltage in p.u.) that is entering the controlled voltage source block (Simscape-9) that is feeding a resistance (load) through an filtering inductance.
can you give me a schematic in simulink of the model?
thanks
something like that Hello, how can I model an avarage values model of a buck converter with a PI current control. The idea was to go in p.u. values and with a basic pi loop that generate the Duty cycle (in p.u. taking as base the max load is equivalent to the voltage in p.u.) that is entering the controlled voltage source block (Simscape-9) that is feeding a resistance (load) through an filtering inductance.
can you give me a schematic in simulink of the model?
thanks
something like that dc dc, buck, current pi control, avarage values model, controlled voltage source, simscape electrical, duty cycle, per unit MATLAB Answers — New Questions
I am trying to plot a graph using mathematical formulas.
Hello everyone, I am trying to obtain the following graph using the explanations below, but I am getting a different result. I would really appreciate it if you could help me find the error.
explanations:
my code:
clear all
clc
% Parameters
epsilon0 = 8.85e-12;
epsilon_m = 79;
CM = 0.5;
k_B = 1.38e-23;
R = 1e-6;
gamma = 1.88e-8;
q = 1e-14;
dt = 1e-3;
T = 300;
x0 = 10e-6;
num_steps = 1000;
N = 100000;
epsilon = 1e-9;
k = 1 / (4 * pi * epsilon_m);
% **Creating matrices to store FDEP force and positions**
x_dep = zeros(num_steps, N);
x_diff = zeros(num_steps, N);
FDEP = zeros(num_steps, N);
% **Initial Positions**
x_dep(1, 🙂 = x0;
x_diff(1, 🙂 = x0;
% **Generating random numbers for Brownian motion**
rng(0);
% **Loop for 100,000 Simulations (Each Simulation Runs Independently!)**
for sim = 1:N
% **Generate random Gaussian noise for each particle**
W = randn(num_steps, 1);
for i = 1:num_steps-1
% **Calculate FDEP separately for each particle**
FDEP(i, sim) = 4 * pi * R^3 * epsilon0 * epsilon_m * CM * (-2 * k^2 * q^2) / ((abs(x_dep(i, sim) – x0) + epsilon)^5);
% **Motion under the effect of FDEP (Used for Correct Simulation)**
x_dep(i+1, sim) = x_dep(i, sim) + (FDEP(i, sim) / gamma) * dt + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
% **Pure diffusion (without DEP force)**
x_diff(i+1, sim) = x_diff(i, sim) + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
end
end
% **Calculate Mean Positions**
x_mean_dep = mean(x_dep, 2);
x_mean_diff = mean(x_diff, 2);
% **Plot the Graph**
figure;
plot((0:num_steps-1) * dt, x_mean_dep * 1e6, ‘b’, ‘LineWidth’, 1.5);
hold on;
plot((0:num_steps-1) * dt, x_mean_diff * 1e6, ‘r–‘, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’);
ylabel(‘Position (μm)’);
title(‘Particle Motion Under the Effect of Dielectrophoretic Force’);
legend(‘Diffusion under F_{DEP}’, ‘Pure diffusion’);
grid on;
hold off;Hello everyone, I am trying to obtain the following graph using the explanations below, but I am getting a different result. I would really appreciate it if you could help me find the error.
explanations:
my code:
clear all
clc
% Parameters
epsilon0 = 8.85e-12;
epsilon_m = 79;
CM = 0.5;
k_B = 1.38e-23;
R = 1e-6;
gamma = 1.88e-8;
q = 1e-14;
dt = 1e-3;
T = 300;
x0 = 10e-6;
num_steps = 1000;
N = 100000;
epsilon = 1e-9;
k = 1 / (4 * pi * epsilon_m);
% **Creating matrices to store FDEP force and positions**
x_dep = zeros(num_steps, N);
x_diff = zeros(num_steps, N);
FDEP = zeros(num_steps, N);
% **Initial Positions**
x_dep(1, 🙂 = x0;
x_diff(1, 🙂 = x0;
% **Generating random numbers for Brownian motion**
rng(0);
% **Loop for 100,000 Simulations (Each Simulation Runs Independently!)**
for sim = 1:N
% **Generate random Gaussian noise for each particle**
W = randn(num_steps, 1);
for i = 1:num_steps-1
% **Calculate FDEP separately for each particle**
FDEP(i, sim) = 4 * pi * R^3 * epsilon0 * epsilon_m * CM * (-2 * k^2 * q^2) / ((abs(x_dep(i, sim) – x0) + epsilon)^5);
% **Motion under the effect of FDEP (Used for Correct Simulation)**
x_dep(i+1, sim) = x_dep(i, sim) + (FDEP(i, sim) / gamma) * dt + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
% **Pure diffusion (without DEP force)**
x_diff(i+1, sim) = x_diff(i, sim) + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
end
end
% **Calculate Mean Positions**
x_mean_dep = mean(x_dep, 2);
x_mean_diff = mean(x_diff, 2);
% **Plot the Graph**
figure;
plot((0:num_steps-1) * dt, x_mean_dep * 1e6, ‘b’, ‘LineWidth’, 1.5);
hold on;
plot((0:num_steps-1) * dt, x_mean_diff * 1e6, ‘r–‘, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’);
ylabel(‘Position (μm)’);
title(‘Particle Motion Under the Effect of Dielectrophoretic Force’);
legend(‘Diffusion under F_{DEP}’, ‘Pure diffusion’);
grid on;
hold off; Hello everyone, I am trying to obtain the following graph using the explanations below, but I am getting a different result. I would really appreciate it if you could help me find the error.
explanations:
my code:
clear all
clc
% Parameters
epsilon0 = 8.85e-12;
epsilon_m = 79;
CM = 0.5;
k_B = 1.38e-23;
R = 1e-6;
gamma = 1.88e-8;
q = 1e-14;
dt = 1e-3;
T = 300;
x0 = 10e-6;
num_steps = 1000;
N = 100000;
epsilon = 1e-9;
k = 1 / (4 * pi * epsilon_m);
% **Creating matrices to store FDEP force and positions**
x_dep = zeros(num_steps, N);
x_diff = zeros(num_steps, N);
FDEP = zeros(num_steps, N);
% **Initial Positions**
x_dep(1, 🙂 = x0;
x_diff(1, 🙂 = x0;
% **Generating random numbers for Brownian motion**
rng(0);
% **Loop for 100,000 Simulations (Each Simulation Runs Independently!)**
for sim = 1:N
% **Generate random Gaussian noise for each particle**
W = randn(num_steps, 1);
for i = 1:num_steps-1
% **Calculate FDEP separately for each particle**
FDEP(i, sim) = 4 * pi * R^3 * epsilon0 * epsilon_m * CM * (-2 * k^2 * q^2) / ((abs(x_dep(i, sim) – x0) + epsilon)^5);
% **Motion under the effect of FDEP (Used for Correct Simulation)**
x_dep(i+1, sim) = x_dep(i, sim) + (FDEP(i, sim) / gamma) * dt + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
% **Pure diffusion (without DEP force)**
x_diff(i+1, sim) = x_diff(i, sim) + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i);
end
end
% **Calculate Mean Positions**
x_mean_dep = mean(x_dep, 2);
x_mean_diff = mean(x_diff, 2);
% **Plot the Graph**
figure;
plot((0:num_steps-1) * dt, x_mean_dep * 1e6, ‘b’, ‘LineWidth’, 1.5);
hold on;
plot((0:num_steps-1) * dt, x_mean_diff * 1e6, ‘r–‘, ‘LineWidth’, 1.5);
xlabel(‘Time (s)’);
ylabel(‘Position (μm)’);
title(‘Particle Motion Under the Effect of Dielectrophoretic Force’);
legend(‘Diffusion under F_{DEP}’, ‘Pure diffusion’);
grid on;
hold off; mathematics, signal processing, signal, graph, graphics, matrices, matlab, differential equations MATLAB Answers — New Questions
Find Source of Warning: This model contains blocks that do not handle sample time changes at runtime.
I am getting the following warning when building a model for Simulink RealTime:
Warning: This model contains blocks that do not handle sample time
changes at runtime. To avoid incorrect results, only change
the sample time in the original model, then rebuild the model.
There are no other warnings when building the model. How can I find which block(s) are responsible for this warning or the reason for the warning?
More Info:
I am using the following system target file:
System Target File: C:Program FilesMATLABR2019atoolboxslrtrtwslrt.tlc
I am using the Microsoft Visual C++ 2019 (C) compiler
The warning is generated by the following private function:
function xpcSampleTimeWarning
% Simulink Real-Time private function
% Copyright 2008 The MathWorks, Inc.
warning(message(‘xPCTarget:sampleTime:sampleTimeInvariance’));
Runing various model advisor checks yielded no help.I am getting the following warning when building a model for Simulink RealTime:
Warning: This model contains blocks that do not handle sample time
changes at runtime. To avoid incorrect results, only change
the sample time in the original model, then rebuild the model.
There are no other warnings when building the model. How can I find which block(s) are responsible for this warning or the reason for the warning?
More Info:
I am using the following system target file:
System Target File: C:Program FilesMATLABR2019atoolboxslrtrtwslrt.tlc
I am using the Microsoft Visual C++ 2019 (C) compiler
The warning is generated by the following private function:
function xpcSampleTimeWarning
% Simulink Real-Time private function
% Copyright 2008 The MathWorks, Inc.
warning(message(‘xPCTarget:sampleTime:sampleTimeInvariance’));
Runing various model advisor checks yielded no help. I am getting the following warning when building a model for Simulink RealTime:
Warning: This model contains blocks that do not handle sample time
changes at runtime. To avoid incorrect results, only change
the sample time in the original model, then rebuild the model.
There are no other warnings when building the model. How can I find which block(s) are responsible for this warning or the reason for the warning?
More Info:
I am using the following system target file:
System Target File: C:Program FilesMATLABR2019atoolboxslrtrtwslrt.tlc
I am using the Microsoft Visual C++ 2019 (C) compiler
The warning is generated by the following private function:
function xpcSampleTimeWarning
% Simulink Real-Time private function
% Copyright 2008 The MathWorks, Inc.
warning(message(‘xPCTarget:sampleTime:sampleTimeInvariance’));
Runing various model advisor checks yielded no help. simulink, simulink realtime, code generation MATLAB Answers — New Questions
Microsoft Graph PowerShell SDK Runs into Choppy Waters
Graph SDK V2.26 Issues Make the Software Unusable
The Microsoft Graph PowerShell SDK is becoming increasingly popular. With over 3.5 million downloads of the previous version, a new release was bound to be a major event., especially after a three-month delay since Microsoft released V2.25 on November 21, 2024 (the SDK usually follows a monthly release cadence). V2.26 duly arrived five days ago.
Alas, you should avoid and not install V2.26. The release is buggy, exhibits little evidence of being tested before launch, and creates huge operational problems for Azure Automation-based runbooks.
The Cracks Appear
I installed V2.26 soon after it appeared in the PowerShell Gallery. I have a large number of PowerShell scripts and runbooks based on the Microsoft Graph PowerShell SDK and it didn’t take long before cracks appeared. For example, HTML messages generated by the Send-MgUserMail cmdlet didn’t display property in multiple email clients, including Outlook classic, the new Outlook, OWA, and Proton (Figure 1).

Another issue was that the Send-MgUserMail cmdlet failed to process attachments. The script I published last week to show how to add and send multiple attachments with Outlook messages failed spectacularly. Many production scripts use Send-MgUserMail to generate and send HTML formatted messages, so this issue was a big problem for a new release.
To be fair to Microsoft, they quickly fixed the two Send-MgUserMail issues. However, these weren’t the only problems. For instance, the New-MgGroupMember cmdlet failed because of an “invalid URL format” generated by an odd value appended to the request URI created for the POST request to add a new group member.
As is my norm, I reported the issues as I encountered problems (anyone who finds a problem with the Microsoft Graph PowerShell SDK, can report the issue online). After a couple of hours, it was evident that V2.26 was in bad shape and practically unusable.
The Big Issue
Discovering several Priority 1 issues in a short period is bad enough; finding that V2.26 had dropped support for .NET6 and .NET7 without warning delivered the coup de grace. This news is a bullet point in the Microsoft Graph PowerShell SDK release notes, which is nice if you read that information and understand the full consequences of the removal. Microsoft delivered no context for the change and no commentary as to what might be the effect.
Issue #3151 was the first report that came in to advise that Azure Automation runbooks had stopped working with V2.26. As you might recall, before Microsoft Graph PowerShell SDK cmdlets can be used with Azure Automation, the modules containing the cmdlets must be loaded as resources into the automation account. You can then create runbooks based on a specific PowerShell version and use the cmdlets in those runbooks.
Azure Automation supports runbooks based on PowerShell V5.1, V7.1. and V7.2. Sometimes a module only supports V5.1 (the SharePoint Online management module is an example), but usually it’s recommended to use PowerShell 7. The problem introduced with the new version of the SDK is that PowerShell V7.1 and V7.2 don’t use .NET 8. Because the SDK dropped support for .NET6 (which reached end of support in November 2024) and .NET7 (which reached end of support in May 2024), Azure Automation and the Microsoft Graph PowerShell SDK are now at odds with each other.
To demonstrate, I created a new automation account and loaded the Microsoft.Graph.Authentication module into the account (Figure 2). This module is the foundation of the Microsoft Graph PowerShell SDK because all other modules have a dependency on it. Note that the runtime version is PowerShell 7.2.

Next, I created a very simple runbook to sign into the Graph using a managed identity (Figure 3). The only processing performed by the runbook is to sign in and report the authentication context.

When I ran the runbook, it failed because the runbook couldn’t load an assembly it needed to run the Connect-MgGraph cmdlet. This isn’t surprising because PowerShell 7.2 is looking for a file that it doesn’t support or isn’t available.

Stay with V2.25
You won’t have a problem if automation accounts keep on using V2.25. You will have problems if you upgrade automation accounts to use the V2.26 modules or create new automation accounts and load the V2.26 modules (which is what Azure Automation offers) as account resources. Some workarounds have been suggested, such as using the Azure Runtime Environment, but that’s a preview feature and I don’t recommend using it in production. You’re safer by leaving the V2.25 modules in place and not attempting to upgrade.
A Big Mess
It’s obvious that V2.26 of the Microsoft Graph PowerShell SDK is a big mess. It’s not the only fiasco in SDK history as previous problems were experienced in V2.14 and V2.17/V2.18 in 2024. It’s obvious that Microsoft didn’t test this release thoroughly before pushing it out the door. It’s also clear that Microsoft failed to appreciate or communicate the impact of removing support for .NET6 and .NET7 on Azure Automation. I don’t recall seeing a support article that clearly outlines how V2.26 affects Azure Automation that might convince customers to pause upgrading to V2.26.
Although the two .NET releases are retired, PowerShell in Azure Automation hasn’t moved on to support PowerShell V7.5. Perhaps that’s because the Azure Automation development team know that dropping support for PowerShell V7.1 and V7.2 might break many production runbooks. Still, that’s an internal issue for Microsoft to work out between the development groups. Customers shouldn’t have to experience the downside of the lack of coordination and planning that obviously exists within the world’s largest software company.
If you’re one of the 150,000 who downloaded V2.26 SDK, it’s time to bin it and revert to V2.25. At least that version works.
Need some assistance to write and manage PowerShell scripts for Microsoft 365? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
Removing bias drift from integration of noisy signal
Hello,
I am working on a Simulink simulation where I need to perform a double integration of a noisy signal. The input signal is generated by exciting the system with a chirp signal that varies in frequency from 0.01 Hz to 10 Hz. To reduce noise before integration, I apply a moving mean filter.
However, despite the filtering, the double-integrated signal exhibits an unwanted upward trend (bias drift), which should not be present. I suspect this may be due to numerical drift and low-frequency components.
What would be the best approach to mitigate this bias? Should I use a different filtering technique, remove the DC component, or apply a different integration method?
I have attached plots showing:
The signal pre filtering
The signal after filtering
The output after single and double integration, highlighting the bias issue
Any advice would be greatly appreciated. Thank you!Hello,
I am working on a Simulink simulation where I need to perform a double integration of a noisy signal. The input signal is generated by exciting the system with a chirp signal that varies in frequency from 0.01 Hz to 10 Hz. To reduce noise before integration, I apply a moving mean filter.
However, despite the filtering, the double-integrated signal exhibits an unwanted upward trend (bias drift), which should not be present. I suspect this may be due to numerical drift and low-frequency components.
What would be the best approach to mitigate this bias? Should I use a different filtering technique, remove the DC component, or apply a different integration method?
I have attached plots showing:
The signal pre filtering
The signal after filtering
The output after single and double integration, highlighting the bias issue
Any advice would be greatly appreciated. Thank you! Hello,
I am working on a Simulink simulation where I need to perform a double integration of a noisy signal. The input signal is generated by exciting the system with a chirp signal that varies in frequency from 0.01 Hz to 10 Hz. To reduce noise before integration, I apply a moving mean filter.
However, despite the filtering, the double-integrated signal exhibits an unwanted upward trend (bias drift), which should not be present. I suspect this may be due to numerical drift and low-frequency components.
What would be the best approach to mitigate this bias? Should I use a different filtering technique, remove the DC component, or apply a different integration method?
I have attached plots showing:
The signal pre filtering
The signal after filtering
The output after single and double integration, highlighting the bias issue
Any advice would be greatly appreciated. Thank you! remove trends, bias, noise, simulink, identification MATLAB Answers — New Questions
Model variable/jittered clock to sample a signal in Simulink – how does variable sample times work?
I’m trying to understand the impact of a clock jitter in an embedded system and its effect on an FFT calculation.
Thus, I’m creating a jittered clock in Simulink, which triggers a sample & hold subsystem, which shall create discrete samples (like in an ADC) of a continuous 20 Hz sine input signal.
Due to the jittered nature of the clock, I can’t use a fixed sample rate (or would need to choose a way higher sample rate to model the jitter), thus I chose the auto solver and continuous sample rates.
Sample rate legend:
I tried to follow Model Effect of Temperature and Jitter on Crystal Oscillation Frequency and created two options for the clock generation, hit scheduler and the variable pulse generator, but those seem not to make any difference.
In the model, you can choose to enable or disable the jitter. f0 is the nominal clock frequency, which is 1 kHz in this example.
There’s also a counter to visualize the number of clock cycles. Assuming a simulation time of 2.048 s, exactly 2048 clock cycles are generated, assuming no jitter, which makes sense given the 1 kHz clock. On my PC, when I enable the jitter, only 1822 clock cycles are present.
Below you can see the input signal (20 Hz sine), the clock, and the sampled signal:
In the detail view you can see the desired unsteady clock and the sampled signal.
While this looks good at the first glance, I was wondering, how many data points per step are really generated? Can the be answered given that SL chooses the variable sample rate? Is there a way to generate exactly one data point/sample per clock trigger?
If the clock was stable, I’d use a rate transition (which is in the model, see the screenshot). But rate transitions can’t have variable sample rates, e.g. via an in-port it seems.
My next steps would be to calculate the FFT on those samples. But I’m not sure how to make sure that there’s one sample per clock.
In the model you can see various approaches I’ve tried to use to calculate the FFT, but I’m not sure if any is correct.
Unfortunately, the Spectrum Analyzer as well as the buffer blocks need non-continuous sample rates, thus the rate transition seems to be the only choice? But that implies a constant sample rate, which is not true…
Another trial was to calculate the FFT in a MATLAB function but not sure if that approach is correct.
Ultimately I want to estimate the error of the frequency bin estimation in the FFT given an unstable clock. I.e., when there’s no jitter in the clock, the 20 Hz sine should appear perfectly. But what if there’s a jitter?
Can the Spectrum Analyzer block used without discrete sample rates?
Are there any concepts I could use I’m not aware of? Right now I’m using normal rising edge triggers, would function-call triggers change something? Again, I’d like to make sure that there’s exactly one data point/sample available per clock edge – just like it would be in the embedded device’s ADC interrupt.
Is the problem clear? You need any more information?
Thanks for any input,
Jan
The model is attached for your reference.I’m trying to understand the impact of a clock jitter in an embedded system and its effect on an FFT calculation.
Thus, I’m creating a jittered clock in Simulink, which triggers a sample & hold subsystem, which shall create discrete samples (like in an ADC) of a continuous 20 Hz sine input signal.
Due to the jittered nature of the clock, I can’t use a fixed sample rate (or would need to choose a way higher sample rate to model the jitter), thus I chose the auto solver and continuous sample rates.
Sample rate legend:
I tried to follow Model Effect of Temperature and Jitter on Crystal Oscillation Frequency and created two options for the clock generation, hit scheduler and the variable pulse generator, but those seem not to make any difference.
In the model, you can choose to enable or disable the jitter. f0 is the nominal clock frequency, which is 1 kHz in this example.
There’s also a counter to visualize the number of clock cycles. Assuming a simulation time of 2.048 s, exactly 2048 clock cycles are generated, assuming no jitter, which makes sense given the 1 kHz clock. On my PC, when I enable the jitter, only 1822 clock cycles are present.
Below you can see the input signal (20 Hz sine), the clock, and the sampled signal:
In the detail view you can see the desired unsteady clock and the sampled signal.
While this looks good at the first glance, I was wondering, how many data points per step are really generated? Can the be answered given that SL chooses the variable sample rate? Is there a way to generate exactly one data point/sample per clock trigger?
If the clock was stable, I’d use a rate transition (which is in the model, see the screenshot). But rate transitions can’t have variable sample rates, e.g. via an in-port it seems.
My next steps would be to calculate the FFT on those samples. But I’m not sure how to make sure that there’s one sample per clock.
In the model you can see various approaches I’ve tried to use to calculate the FFT, but I’m not sure if any is correct.
Unfortunately, the Spectrum Analyzer as well as the buffer blocks need non-continuous sample rates, thus the rate transition seems to be the only choice? But that implies a constant sample rate, which is not true…
Another trial was to calculate the FFT in a MATLAB function but not sure if that approach is correct.
Ultimately I want to estimate the error of the frequency bin estimation in the FFT given an unstable clock. I.e., when there’s no jitter in the clock, the 20 Hz sine should appear perfectly. But what if there’s a jitter?
Can the Spectrum Analyzer block used without discrete sample rates?
Are there any concepts I could use I’m not aware of? Right now I’m using normal rising edge triggers, would function-call triggers change something? Again, I’d like to make sure that there’s exactly one data point/sample available per clock edge – just like it would be in the embedded device’s ADC interrupt.
Is the problem clear? You need any more information?
Thanks for any input,
Jan
The model is attached for your reference. I’m trying to understand the impact of a clock jitter in an embedded system and its effect on an FFT calculation.
Thus, I’m creating a jittered clock in Simulink, which triggers a sample & hold subsystem, which shall create discrete samples (like in an ADC) of a continuous 20 Hz sine input signal.
Due to the jittered nature of the clock, I can’t use a fixed sample rate (or would need to choose a way higher sample rate to model the jitter), thus I chose the auto solver and continuous sample rates.
Sample rate legend:
I tried to follow Model Effect of Temperature and Jitter on Crystal Oscillation Frequency and created two options for the clock generation, hit scheduler and the variable pulse generator, but those seem not to make any difference.
In the model, you can choose to enable or disable the jitter. f0 is the nominal clock frequency, which is 1 kHz in this example.
There’s also a counter to visualize the number of clock cycles. Assuming a simulation time of 2.048 s, exactly 2048 clock cycles are generated, assuming no jitter, which makes sense given the 1 kHz clock. On my PC, when I enable the jitter, only 1822 clock cycles are present.
Below you can see the input signal (20 Hz sine), the clock, and the sampled signal:
In the detail view you can see the desired unsteady clock and the sampled signal.
While this looks good at the first glance, I was wondering, how many data points per step are really generated? Can the be answered given that SL chooses the variable sample rate? Is there a way to generate exactly one data point/sample per clock trigger?
If the clock was stable, I’d use a rate transition (which is in the model, see the screenshot). But rate transitions can’t have variable sample rates, e.g. via an in-port it seems.
My next steps would be to calculate the FFT on those samples. But I’m not sure how to make sure that there’s one sample per clock.
In the model you can see various approaches I’ve tried to use to calculate the FFT, but I’m not sure if any is correct.
Unfortunately, the Spectrum Analyzer as well as the buffer blocks need non-continuous sample rates, thus the rate transition seems to be the only choice? But that implies a constant sample rate, which is not true…
Another trial was to calculate the FFT in a MATLAB function but not sure if that approach is correct.
Ultimately I want to estimate the error of the frequency bin estimation in the FFT given an unstable clock. I.e., when there’s no jitter in the clock, the 20 Hz sine should appear perfectly. But what if there’s a jitter?
Can the Spectrum Analyzer block used without discrete sample rates?
Are there any concepts I could use I’m not aware of? Right now I’m using normal rising edge triggers, would function-call triggers change something? Again, I’d like to make sure that there’s exactly one data point/sample available per clock edge – just like it would be in the embedded device’s ADC interrupt.
Is the problem clear? You need any more information?
Thanks for any input,
Jan
The model is attached for your reference. simulink, clock jitter, fft, sampling, rate transition MATLAB Answers — New Questions
find is not working in a loop, it skips numbers
Hello,
I am using a loop with a "find" to indentify the rows in the third column that have the same number (e.g. 0.75 etc), then I select which to chose based on a criterio. In some cases for example 0.82, 0.93 the function find returns a zero array instead of an array with ones at the locations of the number. Depending on the limits of the initial range ("sisto" in the code below) it skips different number. I tried to correct using the mask instead of the find but I am still having the same results. Could you please help me with this? (I attach the text file with the input matrix) Thanks.
load(‘HP4140AT5OR40DOS.txt’);
LINE=HP4140AT5OR40DOS;
x=LINE(:,3);
sisto = 0.60:0.01:1;
s=size(sisto,2)
for i=1:s
sisto(i)
find = (x==sisto(i));
MA=LINE(find,:)
dast=MA(:,5); %the storage days
ouf=abs(40-dast)% how close they are to 30
[minValue, minIndex] = min(ouf)
point=MA(minIndex,:)%the point I select for this wind contribution
endHello,
I am using a loop with a "find" to indentify the rows in the third column that have the same number (e.g. 0.75 etc), then I select which to chose based on a criterio. In some cases for example 0.82, 0.93 the function find returns a zero array instead of an array with ones at the locations of the number. Depending on the limits of the initial range ("sisto" in the code below) it skips different number. I tried to correct using the mask instead of the find but I am still having the same results. Could you please help me with this? (I attach the text file with the input matrix) Thanks.
load(‘HP4140AT5OR40DOS.txt’);
LINE=HP4140AT5OR40DOS;
x=LINE(:,3);
sisto = 0.60:0.01:1;
s=size(sisto,2)
for i=1:s
sisto(i)
find = (x==sisto(i));
MA=LINE(find,:)
dast=MA(:,5); %the storage days
ouf=abs(40-dast)% how close they are to 30
[minValue, minIndex] = min(ouf)
point=MA(minIndex,:)%the point I select for this wind contribution
end Hello,
I am using a loop with a "find" to indentify the rows in the third column that have the same number (e.g. 0.75 etc), then I select which to chose based on a criterio. In some cases for example 0.82, 0.93 the function find returns a zero array instead of an array with ones at the locations of the number. Depending on the limits of the initial range ("sisto" in the code below) it skips different number. I tried to correct using the mask instead of the find but I am still having the same results. Could you please help me with this? (I attach the text file with the input matrix) Thanks.
load(‘HP4140AT5OR40DOS.txt’);
LINE=HP4140AT5OR40DOS;
x=LINE(:,3);
sisto = 0.60:0.01:1;
s=size(sisto,2)
for i=1:s
sisto(i)
find = (x==sisto(i));
MA=LINE(find,:)
dast=MA(:,5); %the storage days
ouf=abs(40-dast)% how close they are to 30
[minValue, minIndex] = min(ouf)
point=MA(minIndex,:)%the point I select for this wind contribution
end find, loop, skips MATLAB Answers — New Questions
Tracking Down Bootleg Copies of Office 365 for IT Pros
Free Downloads of Office 365 for IT Pros Pop Up Around the Internet
Ever since electronic copies of books have existed, people have posted illegal copies of books on websites across the internet. The copies are illegal because they infringe the copyright holder’s rights and are not paid for. In the past, publishers took most of the loss caused by unpaid copies. With the gradual spread of self-publication, which is what we do for the Office 365 for IT Pros and the Automating Microsoft 365 with PowerShell eBooks, the loss falls directly on authors.
Figure 1 shows a typical example of an illegal copy of the PDF for the 2023 edition available for download from a site called Dokumen.Pub, which is apparently based in Canada.

To some publishers, tolerating some illegal copies is part of the cost of doing business. To others, it’s an affront to the work done to create the content. We’re in the middle. We don’t have the time to expend a lot of effort searching for and attempting to remove illegal copies, but when we do, we like the administrators of the hosting sites to remove the illegal copies quickly.
Tracking Down Free Downloads of Office 365 for IT Pros
Most of the time, we are told about illegal copies. Occasionally, we search for illegal copies. Either way, when we find an illegal copy, we contact the site administrator and try to make a Digital Millennium Copyright Act (DMCA) notification to let the administrators know that infringing material exists on their site. Usually, sites make this process easy by providing an online form to allow a copyright holder to assert their ownership of content.
After that, it’s a matter of waiting. Some sites take copyright infringement very seriously. They respond within a day and take down the illegal copy without a quibble. In other cases, sites like Scribd.com refer the DMCA notification for review by an internal copyright abuse team, and the process takes much longer. It’s right and fair that complaints should be reviewed and dealt with fairly, but from our perspective, it seems like reviews could be completed faster. In any case, it is what it is. Figure 2 shows an illegal copy of the 2023 edition that was available for download on Scribd.com (now removed).

Just a word of warning: some download sites are vectors for malware. If you download files from these sites, you might receive more than you expect.
What Can Be Done About Illegal Downloads of Office 365 for IT Pros
The answer is precisely nothing. The internet has some dark corners where people do stuff that they shouldn’t. This is just a mild example. The best defense that we have is our monthly updates. Take the illegal PDF shown in Figure 2. The downloadable file is for update #86. The current version of the book is #116 and we are working on monthly update #117. A bunch of stuff has changed in Microsoft 365 over the last 30 months, none of which is covered in the illegal material. Another thing that’s noticeable is that none of the PDFs available online have the stamped email address of the original purchaser. This could be because the person who uploaded the file removed the stamped address, or it could be because Gumroad failed to stamp some PDFs in the past. As we noted last month, we believe that the issues with PDF stamping are now resolved. Whether the stamps will make any difference remains to be seen.
All we can do is ask anyone who’s considering uploading a PDF is to please reconsider and ask yourself why you propose to share intellectual material that doesn’t belong to you. It’s not like you help anyone. Some might learn something from outdated material, but the content will eventually age out or be taken down.
Keep Authors Interested
What those who upload book PDFs really do is remove the desire of the authors to continue working on a project. If our work is not respected and deemed essentially to be worth nothing, then we’ll stop producing our eBooks. If something is worthwhile, you should pay for it. And we think that there’s enough value in our books to justify a fair payment, especially considering our commitment to continually update the books to add new content, remove old material, and address any issues that people find.
We publish free information for all to learn from on this site and we share a bunch of PowerShell scripts in our GitHub repository to help people master PowerShell for Microsoft 365. But the site and the repository exist to support the books. If the book publishing project ceases, everything stops, and that would be a bad thing.
Don’t be a bad guy. Keep authors interested in generating great content by respecting copyright and intellectual property. Support us by subscribing to Office 365 for IT Pros and get two great books that are updated monthly! And if you come across any illegal downloads of Office 365 for IT Pros, please let us know (post a comment here), and we’ll take care of the paperwork.
Open panel in new window with script
Hello everyone
Is it possible to open a created panel in a new window via a command in the script?
Many thanks in advanceHello everyone
Is it possible to open a created panel in a new window via a command in the script?
Many thanks in advance Hello everyone
Is it possible to open a created panel in a new window via a command in the script?
Many thanks in advance panel MATLAB Answers — New Questions
Speed up this bottleneck line of code
Hello.
I have a big chunk of code, here is a part of it (arrays a, b and c, indeces ind1 and ind2 are actually different, its just an artificially constructed example):
n = 10000;
m = 5000;
k = 20;
a = rand(n,m);
b = rand(n,m);
c = rand(m+k,n)*1.1-0.1;
ind1 = repmat([ones(1,m/k),0]==1,1,k)’;
ind2 = repmat([0,ones(1,m/k)]==1,1,k)’;
tic;
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
toc
I am not satisfied with it’s speed. After profiling my code i found that string
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
is a bottleneck of my code. Indeces ind1 and ind2 are almost entirely true.
Now im not sure now to improve from here, i’ve tried to google how to speed up .* operation or speed up indexing of matrix c but with no luck. Any advice would be great.
Thanks!Hello.
I have a big chunk of code, here is a part of it (arrays a, b and c, indeces ind1 and ind2 are actually different, its just an artificially constructed example):
n = 10000;
m = 5000;
k = 20;
a = rand(n,m);
b = rand(n,m);
c = rand(m+k,n)*1.1-0.1;
ind1 = repmat([ones(1,m/k),0]==1,1,k)’;
ind2 = repmat([0,ones(1,m/k)]==1,1,k)’;
tic;
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
toc
I am not satisfied with it’s speed. After profiling my code i found that string
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
is a bottleneck of my code. Indeces ind1 and ind2 are almost entirely true.
Now im not sure now to improve from here, i’ve tried to google how to speed up .* operation or speed up indexing of matrix c but with no luck. Any advice would be great.
Thanks! Hello.
I have a big chunk of code, here is a part of it (arrays a, b and c, indeces ind1 and ind2 are actually different, its just an artificially constructed example):
n = 10000;
m = 5000;
k = 20;
a = rand(n,m);
b = rand(n,m);
c = rand(m+k,n)*1.1-0.1;
ind1 = repmat([ones(1,m/k),0]==1,1,k)’;
ind2 = repmat([0,ones(1,m/k)]==1,1,k)’;
tic;
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
toc
I am not satisfied with it’s speed. After profiling my code i found that string
d = m * sum(a .* b .* max(0, c(ind1,:) – c(ind2,:))’,2);
is a bottleneck of my code. Indeces ind1 and ind2 are almost entirely true.
Now im not sure now to improve from here, i’ve tried to google how to speed up .* operation or speed up indexing of matrix c but with no luck. Any advice would be great.
Thanks! times, max, indexing, speed MATLAB Answers — New Questions
How to find the steady state using events function for pde?
Hi,
I am solving coupled reaction diffusion PDEs of the form:
I am using the ‘pdepe’ function to solve them. I have become aware that there is an ‘events’ functionality embedded into the ‘pdepe’ solver that allows the user to trigger an event when a certain event occurs. This is because the pdepe solver uses the ODE15s solver for dynamic time integration. I would like to use this functionality to find when the ‘steady state’ event occurs. I believe there are limited examples when using this functionality for PDEs.
I am using the following code to call ‘pdepe’ in the function file:
optns = odeset(‘Events’,@ssEvent);
[sol1,tsol,sole,te,ie] = pdepe(m, @(x, t, c, DcDx)PDE_PSw_EK(x, t, c, DcDx, alpha,…
kappa, eta, gamma, mu),IC, BC, chi, t, optns);
I then resolved the ‘sol1’ into following components.
% Concentration Profiles c(i, j, k)(Solutions)
c1 = sol1(:, :, 1); % Substrate Conc.
c2 = sol1(:, :, 2); % Mox Conc.
Standard syntax for PDEs for event function is as:
function [value,isterminal,direction] = pdevents(m,t,xmesh,umesh)
value = umesh;
isterminal = zeros(size(umesh));
direction = zeros(size(umesh));
end
One of my questions is, is the ‘umesh’ the same as ‘sol1’?
Do I have to provide a matrix to ‘isterminal’ to inform the function to terminate or just a single value is enough? Same for direction.
Currently I am using the following script to try to find the steady state. But it is not working very well so I am here.
function [value, isterminal, direction] = ssEvent(m, t, xmesh, umesh)
% Compute the absolute difference between successive time steps
diff_solution = abs(diff(umesh, 1, 2)); % Max change in solution across time
% Define steady-state condition (threshold for change)
steady_threshold = 1e-4;
% Event occurs when the maximum solution change is below the threshold
value = diff_solution – steady_threshold;
isterminal = 0; % Stop integration when steady state is reached
direction = 0; % Detects steady state in both increasing & decreasing directions
end
Eventual goal is to make a graph like this. Where I want to extract the time against the event and plot it against the gamma. This graph was made using another method though.
Also I would appreciate if respected members can give some pointers on how to rid of numerical oscillations while computing errors.Hi,
I am solving coupled reaction diffusion PDEs of the form:
I am using the ‘pdepe’ function to solve them. I have become aware that there is an ‘events’ functionality embedded into the ‘pdepe’ solver that allows the user to trigger an event when a certain event occurs. This is because the pdepe solver uses the ODE15s solver for dynamic time integration. I would like to use this functionality to find when the ‘steady state’ event occurs. I believe there are limited examples when using this functionality for PDEs.
I am using the following code to call ‘pdepe’ in the function file:
optns = odeset(‘Events’,@ssEvent);
[sol1,tsol,sole,te,ie] = pdepe(m, @(x, t, c, DcDx)PDE_PSw_EK(x, t, c, DcDx, alpha,…
kappa, eta, gamma, mu),IC, BC, chi, t, optns);
I then resolved the ‘sol1’ into following components.
% Concentration Profiles c(i, j, k)(Solutions)
c1 = sol1(:, :, 1); % Substrate Conc.
c2 = sol1(:, :, 2); % Mox Conc.
Standard syntax for PDEs for event function is as:
function [value,isterminal,direction] = pdevents(m,t,xmesh,umesh)
value = umesh;
isterminal = zeros(size(umesh));
direction = zeros(size(umesh));
end
One of my questions is, is the ‘umesh’ the same as ‘sol1’?
Do I have to provide a matrix to ‘isterminal’ to inform the function to terminate or just a single value is enough? Same for direction.
Currently I am using the following script to try to find the steady state. But it is not working very well so I am here.
function [value, isterminal, direction] = ssEvent(m, t, xmesh, umesh)
% Compute the absolute difference between successive time steps
diff_solution = abs(diff(umesh, 1, 2)); % Max change in solution across time
% Define steady-state condition (threshold for change)
steady_threshold = 1e-4;
% Event occurs when the maximum solution change is below the threshold
value = diff_solution – steady_threshold;
isterminal = 0; % Stop integration when steady state is reached
direction = 0; % Detects steady state in both increasing & decreasing directions
end
Eventual goal is to make a graph like this. Where I want to extract the time against the event and plot it against the gamma. This graph was made using another method though.
Also I would appreciate if respected members can give some pointers on how to rid of numerical oscillations while computing errors. Hi,
I am solving coupled reaction diffusion PDEs of the form:
I am using the ‘pdepe’ function to solve them. I have become aware that there is an ‘events’ functionality embedded into the ‘pdepe’ solver that allows the user to trigger an event when a certain event occurs. This is because the pdepe solver uses the ODE15s solver for dynamic time integration. I would like to use this functionality to find when the ‘steady state’ event occurs. I believe there are limited examples when using this functionality for PDEs.
I am using the following code to call ‘pdepe’ in the function file:
optns = odeset(‘Events’,@ssEvent);
[sol1,tsol,sole,te,ie] = pdepe(m, @(x, t, c, DcDx)PDE_PSw_EK(x, t, c, DcDx, alpha,…
kappa, eta, gamma, mu),IC, BC, chi, t, optns);
I then resolved the ‘sol1’ into following components.
% Concentration Profiles c(i, j, k)(Solutions)
c1 = sol1(:, :, 1); % Substrate Conc.
c2 = sol1(:, :, 2); % Mox Conc.
Standard syntax for PDEs for event function is as:
function [value,isterminal,direction] = pdevents(m,t,xmesh,umesh)
value = umesh;
isterminal = zeros(size(umesh));
direction = zeros(size(umesh));
end
One of my questions is, is the ‘umesh’ the same as ‘sol1’?
Do I have to provide a matrix to ‘isterminal’ to inform the function to terminate or just a single value is enough? Same for direction.
Currently I am using the following script to try to find the steady state. But it is not working very well so I am here.
function [value, isterminal, direction] = ssEvent(m, t, xmesh, umesh)
% Compute the absolute difference between successive time steps
diff_solution = abs(diff(umesh, 1, 2)); % Max change in solution across time
% Define steady-state condition (threshold for change)
steady_threshold = 1e-4;
% Event occurs when the maximum solution change is below the threshold
value = diff_solution – steady_threshold;
isterminal = 0; % Stop integration when steady state is reached
direction = 0; % Detects steady state in both increasing & decreasing directions
end
Eventual goal is to make a graph like this. Where I want to extract the time against the event and plot it against the gamma. This graph was made using another method though.
Also I would appreciate if respected members can give some pointers on how to rid of numerical oscillations while computing errors. pdepe, ode15s MATLAB Answers — New Questions
how to include COM API in m scripts?
Hello,
I am trying to automate dSPACE Configuration desk. I need to find the way to include the dSPACE COM API into m scripts. your support is greatly appreciated.Thank youHello,
I am trying to automate dSPACE Configuration desk. I need to find the way to include the dSPACE COM API into m scripts. your support is greatly appreciated.Thank you Hello,
I am trying to automate dSPACE Configuration desk. I need to find the way to include the dSPACE COM API into m scripts. your support is greatly appreciated.Thank you dspace com api MATLAB Answers — New Questions
Finding the points where Bessel functions are equivalent
Hello,
I am trying to repeat some results in a research paper using Matlab. I am having some trouble finding some propagation constants. I suspect Matlab is capable of doing this, but I’m not sure how to go about it. The value I am trying to find is the propagation constant , given in the following:
The values for k, n1, n0 and a are known. Only is unknown. I am trying to find by determining the values for u and w using the following equation:
Where J1 and J0 are Bessel functions of the first kind and K1 and K0 are Bessel functions of the second kind. I have tried solving for this using symbolic logic as follows:
um = 1e-6;
nCore = 1.4682;
nClad = 1.446;
lam = 1.55*um;
k = 2*pi/lam;
a = 8.2*um;
A = 125*um;
syms x
w = (a/2)*sqrt(k^2*nCore^2 – x^2);
u = (a/2)*sqrt(x^2 – k^2*nClad^2);
eqn = (besselj(1, u)/(u*besselj(0, u))) == -1*(besselk(1, w)/(w*besselk(0, w)));
S = vpasolve(eqn, x);
This returns the following:
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
In besselTest (line 24)
The results here are well-known, so I think the issue is with my execution of the problem.
Is there another way to go about this without using symbolic logic?
Thanks!Hello,
I am trying to repeat some results in a research paper using Matlab. I am having some trouble finding some propagation constants. I suspect Matlab is capable of doing this, but I’m not sure how to go about it. The value I am trying to find is the propagation constant , given in the following:
The values for k, n1, n0 and a are known. Only is unknown. I am trying to find by determining the values for u and w using the following equation:
Where J1 and J0 are Bessel functions of the first kind and K1 and K0 are Bessel functions of the second kind. I have tried solving for this using symbolic logic as follows:
um = 1e-6;
nCore = 1.4682;
nClad = 1.446;
lam = 1.55*um;
k = 2*pi/lam;
a = 8.2*um;
A = 125*um;
syms x
w = (a/2)*sqrt(k^2*nCore^2 – x^2);
u = (a/2)*sqrt(x^2 – k^2*nClad^2);
eqn = (besselj(1, u)/(u*besselj(0, u))) == -1*(besselk(1, w)/(w*besselk(0, w)));
S = vpasolve(eqn, x);
This returns the following:
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
In besselTest (line 24)
The results here are well-known, so I think the issue is with my execution of the problem.
Is there another way to go about this without using symbolic logic?
Thanks! Hello,
I am trying to repeat some results in a research paper using Matlab. I am having some trouble finding some propagation constants. I suspect Matlab is capable of doing this, but I’m not sure how to go about it. The value I am trying to find is the propagation constant , given in the following:
The values for k, n1, n0 and a are known. Only is unknown. I am trying to find by determining the values for u and w using the following equation:
Where J1 and J0 are Bessel functions of the first kind and K1 and K0 are Bessel functions of the second kind. I have tried solving for this using symbolic logic as follows:
um = 1e-6;
nCore = 1.4682;
nClad = 1.446;
lam = 1.55*um;
k = 2*pi/lam;
a = 8.2*um;
A = 125*um;
syms x
w = (a/2)*sqrt(k^2*nCore^2 – x^2);
u = (a/2)*sqrt(x^2 – k^2*nClad^2);
eqn = (besselj(1, u)/(u*besselj(0, u))) == -1*(besselk(1, w)/(w*besselk(0, w)));
S = vpasolve(eqn, x);
This returns the following:
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
In besselTest (line 24)
The results here are well-known, so I think the issue is with my execution of the problem.
Is there another way to go about this without using symbolic logic?
Thanks! symbolic, simulation MATLAB Answers — New Questions
Error when trying to export a trained deep learning model to ONNX format in MATLAB due to the “SplitComplexInputs”
I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python?I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python? I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python? machine learning, deep learning, model MATLAB Answers — New Questions
How to write in multiple lines simultaneously in Matlab Editor ?
I have seen the new funcionalities in version 2021b and it appears that you can put the cursor in multiples lines for writing code.I have seen the new funcionalities in version 2021b and it appears that you can put the cursor in multiples lines for writing code. I have seen the new funcionalities in version 2021b and it appears that you can put the cursor in multiples lines for writing code. multiple lines, editor MATLAB Answers — New Questions
MATLAB Simulink Task 5 Power Systems Simulation Incorrect Output Description
I’m working on the MATLAB Simulink Power Systems Simulation Onramp, specifically Task 5. I changed the Wye-Connected Load block component structure to Series RL and set the default value to 12∠0° (A) for inductive reactive power, as required. I also used the filter from the previous task to extract the reactive power from the Q port of the Power Sensor and connected the filtered measurement to the Signal Assessment block. However, I still receive an incorrect output error.
Could anyone help identify what might be wrong?I’m working on the MATLAB Simulink Power Systems Simulation Onramp, specifically Task 5. I changed the Wye-Connected Load block component structure to Series RL and set the default value to 12∠0° (A) for inductive reactive power, as required. I also used the filter from the previous task to extract the reactive power from the Q port of the Power Sensor and connected the filtered measurement to the Signal Assessment block. However, I still receive an incorrect output error.
Could anyone help identify what might be wrong? I’m working on the MATLAB Simulink Power Systems Simulation Onramp, specifically Task 5. I changed the Wye-Connected Load block component structure to Series RL and set the default value to 12∠0° (A) for inductive reactive power, as required. I also used the filter from the previous task to extract the reactive power from the Q port of the Power Sensor and connected the filtered measurement to the Signal Assessment block. However, I still receive an incorrect output error.
Could anyone help identify what might be wrong? simulink, power systems, onramp, signal assessment MATLAB Answers — New Questions
MATLAB 2023b Keeps Crashing on My Windows Desktop But Works on Laptop
Hey everyone,
I’m reaching out to see if anyone else has experienced similar issues or might have some advice. I’ve been running MATLAB 2023b on my Windows desktop, and it keeps crashing unexpectedly. What’s puzzling is that the same code runs perfectly fine on my laptop, so I’m inclined to think the problem isn’t with the code itself.
Here’s what I’ve observed:
No Error Logs or Dumps: When MATLAB crashes, it doesn’t generate any logs or dumps that I can check for clues. This makes it really challenging to diagnose the issue.
Consistent Crashes: The crashes seem to happen randomly, without any specific pattern or trigger that I can identify.
System Specs: My desktop has mush better spec than laptop, so I don’t think it’s a hardware limitation. Both my desktop and laptop are running Windows, but the desktop is where the issue persists. I have tried running with softwareopengl option, but that also does not help.
I’ve tried a few basic troubleshooting steps like reinstalling MATLAB, and ensuring Windows is up to date, but the problem persists.
If anyone has experienced something similar or has any suggestions on what I could try next, I’d really appreciate your input. It’s quite frustrating, and I’m hoping to get back to a stable working environment soon.Hey everyone,
I’m reaching out to see if anyone else has experienced similar issues or might have some advice. I’ve been running MATLAB 2023b on my Windows desktop, and it keeps crashing unexpectedly. What’s puzzling is that the same code runs perfectly fine on my laptop, so I’m inclined to think the problem isn’t with the code itself.
Here’s what I’ve observed:
No Error Logs or Dumps: When MATLAB crashes, it doesn’t generate any logs or dumps that I can check for clues. This makes it really challenging to diagnose the issue.
Consistent Crashes: The crashes seem to happen randomly, without any specific pattern or trigger that I can identify.
System Specs: My desktop has mush better spec than laptop, so I don’t think it’s a hardware limitation. Both my desktop and laptop are running Windows, but the desktop is where the issue persists. I have tried running with softwareopengl option, but that also does not help.
I’ve tried a few basic troubleshooting steps like reinstalling MATLAB, and ensuring Windows is up to date, but the problem persists.
If anyone has experienced something similar or has any suggestions on what I could try next, I’d really appreciate your input. It’s quite frustrating, and I’m hoping to get back to a stable working environment soon. Hey everyone,
I’m reaching out to see if anyone else has experienced similar issues or might have some advice. I’ve been running MATLAB 2023b on my Windows desktop, and it keeps crashing unexpectedly. What’s puzzling is that the same code runs perfectly fine on my laptop, so I’m inclined to think the problem isn’t with the code itself.
Here’s what I’ve observed:
No Error Logs or Dumps: When MATLAB crashes, it doesn’t generate any logs or dumps that I can check for clues. This makes it really challenging to diagnose the issue.
Consistent Crashes: The crashes seem to happen randomly, without any specific pattern or trigger that I can identify.
System Specs: My desktop has mush better spec than laptop, so I don’t think it’s a hardware limitation. Both my desktop and laptop are running Windows, but the desktop is where the issue persists. I have tried running with softwareopengl option, but that also does not help.
I’ve tried a few basic troubleshooting steps like reinstalling MATLAB, and ensuring Windows is up to date, but the problem persists.
If anyone has experienced something similar or has any suggestions on what I could try next, I’d really appreciate your input. It’s quite frustrating, and I’m hoping to get back to a stable working environment soon. crash, matlab, 2023b MATLAB Answers — New Questions
Simulink Threshold with action
I would like to create a simulink model that basically takes an input, lets say 2.5, and check if this value is between 6.5 to 8.5. Once checked, if below this range, then it must add 1 to the initial input. If it is betwen this range, all it needs to do is display the output that falls between the 6.5 to 8.5 range. If possible, I would like for it to show how many iterations it took to get between range.I would like to create a simulink model that basically takes an input, lets say 2.5, and check if this value is between 6.5 to 8.5. Once checked, if below this range, then it must add 1 to the initial input. If it is betwen this range, all it needs to do is display the output that falls between the 6.5 to 8.5 range. If possible, I would like for it to show how many iterations it took to get between range. I would like to create a simulink model that basically takes an input, lets say 2.5, and check if this value is between 6.5 to 8.5. Once checked, if below this range, then it must add 1 to the initial input. If it is betwen this range, all it needs to do is display the output that falls between the 6.5 to 8.5 range. If possible, I would like for it to show how many iterations it took to get between range. simulink MATLAB Answers — New Questions