Category: News
Solving Duffing Equation with the new framework for ODEs
I solved the duffing equation using the new framework for ODEs. Below is the code.
It works fine and plots as expected. However, I was wondering if there is a way to create a phase portrait in the interval t=[0 3000] without looking like a smudge.
% Define the parameters
delta = 0.1;
alpha = -1;
beta = 1;
gamma = 0.35;
omega = 1.4;
% Define the ODE function for the Duffing equation
duffingODE = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions: [x(0), dx/dt(0)]
initialConditions = [0; 0];
% Create an ode object
F = ode(ODEFcn=duffingODE, InitialTime=0, InitialValue=initialConditions);
% Solve the equation over the interval [0, 3000]
sol = solve(F, 0, 3000);
% Interpolate the solution to get more points for plotting
timeFine = linspace(0, 300, 10000); % Create a fine time vector with 10,000 points
solutionFine = interp1(sol.Time, sol.Solution’, timeFine)’; % Interpolate solution
% Plot the interpolated time series solution
figure;
subplot(2, 1, 1);
plot(timeFine, solutionFine(1, :), ‘LineWidth’, 1.5);
xlabel(‘Time’);
ylabel(‘Displacement’);
title(‘Interpolated Solution of the Duffing Equation’);
grid on;
% Plot the interpolated phase portrait
subplot(2, 1, 2);
plot(solutionFine(1, :), solutionFine(2, :), ‘LineWidth’, 1.5);
xlabel(‘Displacement x(t)’);
ylabel(‘Velocity dx/dt’);
title(‘Interpolated Phase Portrait of the Duffing Equation’);
grid on;I solved the duffing equation using the new framework for ODEs. Below is the code.
It works fine and plots as expected. However, I was wondering if there is a way to create a phase portrait in the interval t=[0 3000] without looking like a smudge.
% Define the parameters
delta = 0.1;
alpha = -1;
beta = 1;
gamma = 0.35;
omega = 1.4;
% Define the ODE function for the Duffing equation
duffingODE = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions: [x(0), dx/dt(0)]
initialConditions = [0; 0];
% Create an ode object
F = ode(ODEFcn=duffingODE, InitialTime=0, InitialValue=initialConditions);
% Solve the equation over the interval [0, 3000]
sol = solve(F, 0, 3000);
% Interpolate the solution to get more points for plotting
timeFine = linspace(0, 300, 10000); % Create a fine time vector with 10,000 points
solutionFine = interp1(sol.Time, sol.Solution’, timeFine)’; % Interpolate solution
% Plot the interpolated time series solution
figure;
subplot(2, 1, 1);
plot(timeFine, solutionFine(1, :), ‘LineWidth’, 1.5);
xlabel(‘Time’);
ylabel(‘Displacement’);
title(‘Interpolated Solution of the Duffing Equation’);
grid on;
% Plot the interpolated phase portrait
subplot(2, 1, 2);
plot(solutionFine(1, :), solutionFine(2, :), ‘LineWidth’, 1.5);
xlabel(‘Displacement x(t)’);
ylabel(‘Velocity dx/dt’);
title(‘Interpolated Phase Portrait of the Duffing Equation’);
grid on; I solved the duffing equation using the new framework for ODEs. Below is the code.
It works fine and plots as expected. However, I was wondering if there is a way to create a phase portrait in the interval t=[0 3000] without looking like a smudge.
% Define the parameters
delta = 0.1;
alpha = -1;
beta = 1;
gamma = 0.35;
omega = 1.4;
% Define the ODE function for the Duffing equation
duffingODE = @(t, y) [y(2);
-delta*y(2) – alpha*y(1) – beta*y(1)^3 + gamma*cos(omega*t)];
% Initial conditions: [x(0), dx/dt(0)]
initialConditions = [0; 0];
% Create an ode object
F = ode(ODEFcn=duffingODE, InitialTime=0, InitialValue=initialConditions);
% Solve the equation over the interval [0, 3000]
sol = solve(F, 0, 3000);
% Interpolate the solution to get more points for plotting
timeFine = linspace(0, 300, 10000); % Create a fine time vector with 10,000 points
solutionFine = interp1(sol.Time, sol.Solution’, timeFine)’; % Interpolate solution
% Plot the interpolated time series solution
figure;
subplot(2, 1, 1);
plot(timeFine, solutionFine(1, :), ‘LineWidth’, 1.5);
xlabel(‘Time’);
ylabel(‘Displacement’);
title(‘Interpolated Solution of the Duffing Equation’);
grid on;
% Plot the interpolated phase portrait
subplot(2, 1, 2);
plot(solutionFine(1, :), solutionFine(2, :), ‘LineWidth’, 1.5);
xlabel(‘Displacement x(t)’);
ylabel(‘Velocity dx/dt’);
title(‘Interpolated Phase Portrait of the Duffing Equation’);
grid on; ode, plotting, differential equations, mathematics, nonlinear, duffing equation MATLAB Answers — New Questions
Issue Summing Linearized Optimization Expressions
Hello!
I m working on an optimization problem in MATLAB where I need to linearize and sum two expressions: uplink_time and Execution_time. My goal is to correctly define and use these expressions in an optimization problem. However, I am encountering issues where the solver switches to Genetic Algorithm unexpectedly.
known that both expressions are linear respect to my optimization variable A.
End_time = optimexpr(N, numNodes, num_vehicles);
for m = 1:num_vehicles
for k = 1:N
for n = 1:numNodes
End_time(k, n, m) = A(k, n, m)*uplink_time(k, n, m)+ A(k, n, m)*Execution_time(k, n, m);
end
end
end
When I run this code, I observe that the solver switches to GA instead of using a linear programming solver.
Could someone please help me understand why the solver is switching to GA and how to correctly define and use the optimization expressions in this context? Any advice on resolving this issue would be greatly appreciated.
Thanks a lot.Hello!
I m working on an optimization problem in MATLAB where I need to linearize and sum two expressions: uplink_time and Execution_time. My goal is to correctly define and use these expressions in an optimization problem. However, I am encountering issues where the solver switches to Genetic Algorithm unexpectedly.
known that both expressions are linear respect to my optimization variable A.
End_time = optimexpr(N, numNodes, num_vehicles);
for m = 1:num_vehicles
for k = 1:N
for n = 1:numNodes
End_time(k, n, m) = A(k, n, m)*uplink_time(k, n, m)+ A(k, n, m)*Execution_time(k, n, m);
end
end
end
When I run this code, I observe that the solver switches to GA instead of using a linear programming solver.
Could someone please help me understand why the solver is switching to GA and how to correctly define and use the optimization expressions in this context? Any advice on resolving this issue would be greatly appreciated.
Thanks a lot. Hello!
I m working on an optimization problem in MATLAB where I need to linearize and sum two expressions: uplink_time and Execution_time. My goal is to correctly define and use these expressions in an optimization problem. However, I am encountering issues where the solver switches to Genetic Algorithm unexpectedly.
known that both expressions are linear respect to my optimization variable A.
End_time = optimexpr(N, numNodes, num_vehicles);
for m = 1:num_vehicles
for k = 1:N
for n = 1:numNodes
End_time(k, n, m) = A(k, n, m)*uplink_time(k, n, m)+ A(k, n, m)*Execution_time(k, n, m);
end
end
end
When I run this code, I observe that the solver switches to GA instead of using a linear programming solver.
Could someone please help me understand why the solver is switching to GA and how to correctly define and use the optimization expressions in this context? Any advice on resolving this issue would be greatly appreciated.
Thanks a lot. matlab, code, issue, ilp, optimization MATLAB Answers — New Questions
Conditional Access App Control keeps Bypassing
Hi all,
I’ve setup a Conditional Access policy in Entra ID with the following settings:
Targeted User: me (as a test)Targeted Resource: Office 365 (I’m interested specifically in SharePoint and OWA)Session Control: Use Conditional Access App Control > Custom Policy
I’ve then setup two policies in the Defender CAS service, one that prevents downloads and one that prevents Cut/Copy. I’ve not used the templates as I’d like to learn how to create these from scratch anyway.
The targets for both policies in CAS are simply App > Manual Onboarding > Microsoft Online Services. My understanding is that using “Microsoft Online Services” here should basically encompass all services I want. If I go to Settings in Defender Microsoft Exchange Online and Microsoft SharePoint both show as onboarded and enabled.
When I sign into one of these services, I can see it try and redirect me to the mcas.ms URL but then falls back to the original and the controls in my policies are not applied. If I check in the Activity Log my sign-ins show as “Bypass Session Control”.
Does anyone know what I might be missing?
TIA
Hi all, I’ve setup a Conditional Access policy in Entra ID with the following settings:Targeted User: me (as a test)Targeted Resource: Office 365 (I’m interested specifically in SharePoint and OWA)Session Control: Use Conditional Access App Control > Custom PolicyI’ve then setup two policies in the Defender CAS service, one that prevents downloads and one that prevents Cut/Copy. I’ve not used the templates as I’d like to learn how to create these from scratch anyway. The targets for both policies in CAS are simply App > Manual Onboarding > Microsoft Online Services. My understanding is that using “Microsoft Online Services” here should basically encompass all services I want. If I go to Settings in Defender Microsoft Exchange Online and Microsoft SharePoint both show as onboarded and enabled. When I sign into one of these services, I can see it try and redirect me to the mcas.ms URL but then falls back to the original and the controls in my policies are not applied. If I check in the Activity Log my sign-ins show as “Bypass Session Control”. Does anyone know what I might be missing? TIA Read More
#CONNECT! Error – Stockhistory down?
Is anyone else having this issue with stockhistory? I am receiving the #CONNECT! error randomly, sometimes it works, sometimes it doesn’t. I can change the time period, shorter or longer, and it just seems random when it decides to retrieve the data or not
Is anyone else having this issue with stockhistory? I am receiving the #CONNECT! error randomly, sometimes it works, sometimes it doesn’t. I can change the time period, shorter or longer, and it just seems random when it decides to retrieve the data or not Read More
How to get UserMeetingRole
Hi, we’ve got a tab app which needs to be able to find which of the users inside the meeting is the Organizer.
I see there is microsoftTeams.UserMeeringRole object with constants (Organizer, Attendee, etc).
However can’t find which API function returns this value?
This is essential because the organizer of the meeting needs to be able to access a few more actions and controls in the tab app.
Hi, we’ve got a tab app which needs to be able to find which of the users inside the meeting is the Organizer. I see there is microsoftTeams.UserMeeringRole object with constants (Organizer, Attendee, etc). However can’t find which API function returns this value? This is essential because the organizer of the meeting needs to be able to access a few more actions and controls in the tab app. Read More
Transforming long panel data
I have a panel data in long format just like the attachment "before", now I want to transform it in a way that variables of a specific country will be under their respective countries on the column while years Will be on rows of the data frame.. Just like in the attachment" After "I have a panel data in long format just like the attachment "before", now I want to transform it in a way that variables of a specific country will be under their respective countries on the column while years Will be on rows of the data frame.. Just like in the attachment" After " I have a panel data in long format just like the attachment "before", now I want to transform it in a way that variables of a specific country will be under their respective countries on the column while years Will be on rows of the data frame.. Just like in the attachment" After " panel data, transform, long MATLAB Answers — New Questions
Summing over observations in unbalanced panel data
Hello, I have an unbalanced panel data set. For each id, I’d like to sum all values of x up to the latest time I observe that id, and record the summation to a new variable. How can I do this? Ideally, I’d like to avoid looping as I have a large dataset and I try to speed up the process.
Thank you in advance!
SelcenHello, I have an unbalanced panel data set. For each id, I’d like to sum all values of x up to the latest time I observe that id, and record the summation to a new variable. How can I do this? Ideally, I’d like to avoid looping as I have a large dataset and I try to speed up the process.
Thank you in advance!
Selcen Hello, I have an unbalanced panel data set. For each id, I’d like to sum all values of x up to the latest time I observe that id, and record the summation to a new variable. How can I do this? Ideally, I’d like to avoid looping as I have a large dataset and I try to speed up the process.
Thank you in advance!
Selcen unbalanced panel data, summation MATLAB Answers — New Questions
VBA Code to Split Text
Hello,
My place of employee switched programs and there is currently not a way to extract data. I’m looking to insert a VBA code that splits the Job Title and Job Req # into seperate cells.
All job reqs start with a P. Here is a sample position/req.
Material HandlerP25-116021-2
Thank you!
Hello, My place of employee switched programs and there is currently not a way to extract data. I’m looking to insert a VBA code that splits the Job Title and Job Req # into seperate cells. All job reqs start with a P. Here is a sample position/req.Material HandlerP25-116021-2 Thank you! Read More
Uap16/17 BaseNamedObjectsIsolation
Some early feedback.
The latest Windows SDK includes a few new schema extensions. Documentation on these new extensions are not yet posted, and I assume that implementation is a work-in-progress and not released yet, but I am concerned that perhaps one of the items needs more thought before finalization.
Assuming that the new BasedNamedObjectsIsolation is an intended new feature to rename kernel named objects (like semaphores, mutexes, and other types) needed by software in the package, this would be a feature similar to that previously available via Microsoft App-V to help with running certain apps on multi-user operating systems or even multiple versions of the same app in parallel on a single user OS.
The schema for this element appears only to allow the specification to enable it for the package, and I am concerned that this is an insufficient level of control.
The equivalent feature in App-V included a system implemented (but registry editable) list of names to be excluded from the name spoofing. Furthermore, on a package basis the AppXManifest supported an override to include/exclude items.
The general system exclusion was a list of nearly 100 names. These exclusions were needed because the objects would also need to be recognized by name by an OS component that was not in the App-V container, so renaming one end would not work.
While Microsoft maintained this exclusion list (see HKEY_LOCAL_MACHINESOFTWAREMicrosoftAppVSubsystemObjExclusions) there was at least one time that IT Pros had to locally add to the exclusion list when Microsoft made a security change to RDS that broke almost half of App-V packages.
There was also a case where I helped a vendor with a package customization to the list because there were components in their package that ran outside of the App-V container (an out of process COM object) and needed to communicate using a name with a component running inside of the container.
Given that MSIX services might not be running inside the same container as the packaged app (I’m not sure about that) there might be more issues.
The bottom line is that there needs to be some exclusions applied somewhere, and overrides to the exclusion, at least on a system level, would be wise.
@Fiza_Azmi
Some early feedback.
The latest Windows SDK includes a few new schema extensions. Documentation on these new extensions are not yet posted, and I assume that implementation is a work-in-progress and not released yet, but I am concerned that perhaps one of the items needs more thought before finalization.
Assuming that the new BasedNamedObjectsIsolation is an intended new feature to rename kernel named objects (like semaphores, mutexes, and other types) needed by software in the package, this would be a feature similar to that previously available via Microsoft App-V to help with running certain apps on multi-user operating systems or even multiple versions of the same app in parallel on a single user OS.
The schema for this element appears only to allow the specification to enable it for the package, and I am concerned that this is an insufficient level of control.
The equivalent feature in App-V included a system implemented (but registry editable) list of names to be excluded from the name spoofing. Furthermore, on a package basis the AppXManifest supported an override to include/exclude items.
The general system exclusion was a list of nearly 100 names. These exclusions were needed because the objects would also need to be recognized by name by an OS component that was not in the App-V container, so renaming one end would not work.
While Microsoft maintained this exclusion list (see HKEY_LOCAL_MACHINESOFTWAREMicrosoftAppVSubsystemObjExclusions) there was at least one time that IT Pros had to locally add to the exclusion list when Microsoft made a security change to RDS that broke almost half of App-V packages.
There was also a case where I helped a vendor with a package customization to the list because there were components in their package that ran outside of the App-V container (an out of process COM object) and needed to communicate using a name with a component running inside of the container.
Given that MSIX services might not be running inside the same container as the packaged app (I’m not sure about that) there might be more issues.
The bottom line is that there needs to be some exclusions applied somewhere, and overrides to the exclusion, at least on a system level, would be wise. Read More
I do not have the ‘Editor’ tab available on my Matlab program, is there any way I could display it so I could easily run my code?
Hello all,
I’m having the problem of running my code. I have Matlab on my laptop and I recently installed it on my desktop at home. However, some things differ from the programs on my laptop and desktop. My laptop has the following tabs available, ‘Home’, ‘Plots’, ‘Apps’, ‘Editor’, ‘Publish’, ‘View’. Whereas my desktop only has ‘Home’, ‘Plots’, and ‘Apps’ and I cannot run my code since I don’t have all the tabs available, does anybody know how I can get this working on my desktop? Thanks in advance!
-Matlab NewbieHello all,
I’m having the problem of running my code. I have Matlab on my laptop and I recently installed it on my desktop at home. However, some things differ from the programs on my laptop and desktop. My laptop has the following tabs available, ‘Home’, ‘Plots’, ‘Apps’, ‘Editor’, ‘Publish’, ‘View’. Whereas my desktop only has ‘Home’, ‘Plots’, and ‘Apps’ and I cannot run my code since I don’t have all the tabs available, does anybody know how I can get this working on my desktop? Thanks in advance!
-Matlab Newbie Hello all,
I’m having the problem of running my code. I have Matlab on my laptop and I recently installed it on my desktop at home. However, some things differ from the programs on my laptop and desktop. My laptop has the following tabs available, ‘Home’, ‘Plots’, ‘Apps’, ‘Editor’, ‘Publish’, ‘View’. Whereas my desktop only has ‘Home’, ‘Plots’, and ‘Apps’ and I cannot run my code since I don’t have all the tabs available, does anybody know how I can get this working on my desktop? Thanks in advance!
-Matlab Newbie tabs, editor MATLAB Answers — New Questions
Use the PyTorch Model Predict function block in the matlab2024a simulink module to import a neural network trained using pytorch.
Hi everyone, I am now going to use PyTorch Model Predict in matlab2024a,simulink to import the neural network trained in pytorch into simulink for robot dynamics control. My current environment configuration is: matlab2024a,conda environment python environment, interpreter version 3.9, pytorch version using the cpu version, the neural network has also been saved as cpu version.
Checking python at the matlab command line:
>>pyenv
ans =
PythonEnvironment – 属性:
Version: "3.9"
Executable: "C:Users64375.condaenvsconda_env_39python.exe"
Library: "C:Users64375.condaenvsconda_env_39python39.dll"
Home: "C:Users64375.condaenvsconda_env_39"
Status: Loaded
ExecutionMode: InProcess
ProcessID: "21020"
ProcessName: "MATLAB"
Import the neural network policy_net_matlab.pth file in the simulink module following the official tutorial, using the function torch.load(). The input and output dimensions are set to match the network parameters. No pre-processing and post-processing functions are loaded. Because they are not used. Clicking Run reports the following error as shown in the image:Hi everyone, I am now going to use PyTorch Model Predict in matlab2024a,simulink to import the neural network trained in pytorch into simulink for robot dynamics control. My current environment configuration is: matlab2024a,conda environment python environment, interpreter version 3.9, pytorch version using the cpu version, the neural network has also been saved as cpu version.
Checking python at the matlab command line:
>>pyenv
ans =
PythonEnvironment – 属性:
Version: "3.9"
Executable: "C:Users64375.condaenvsconda_env_39python.exe"
Library: "C:Users64375.condaenvsconda_env_39python39.dll"
Home: "C:Users64375.condaenvsconda_env_39"
Status: Loaded
ExecutionMode: InProcess
ProcessID: "21020"
ProcessName: "MATLAB"
Import the neural network policy_net_matlab.pth file in the simulink module following the official tutorial, using the function torch.load(). The input and output dimensions are set to match the network parameters. No pre-processing and post-processing functions are loaded. Because they are not used. Clicking Run reports the following error as shown in the image: Hi everyone, I am now going to use PyTorch Model Predict in matlab2024a,simulink to import the neural network trained in pytorch into simulink for robot dynamics control. My current environment configuration is: matlab2024a,conda environment python environment, interpreter version 3.9, pytorch version using the cpu version, the neural network has also been saved as cpu version.
Checking python at the matlab command line:
>>pyenv
ans =
PythonEnvironment – 属性:
Version: "3.9"
Executable: "C:Users64375.condaenvsconda_env_39python.exe"
Library: "C:Users64375.condaenvsconda_env_39python39.dll"
Home: "C:Users64375.condaenvsconda_env_39"
Status: Loaded
ExecutionMode: InProcess
ProcessID: "21020"
ProcessName: "MATLAB"
Import the neural network policy_net_matlab.pth file in the simulink module following the official tutorial, using the function torch.load(). The input and output dimensions are set to match the network parameters. No pre-processing and post-processing functions are loaded. Because they are not used. Clicking Run reports the following error as shown in the image: python, simulink MATLAB Answers — New Questions
How to fit power-law to each column of data arranged in a table?
Hello all! Here my question:
I have a table displaying 1000 columns (spikes_mtx). Each column has 400 rows of data displaying exponential decay over 100s time (std_time).
I’d like to fit a three-coefficient power-fit model (y = a*x^b+c) to each column so as to obtain:
A table with x1000 a coefficient (coming from the 1000 exponential decays)
A table with x1000 b coefficient (coming from the 1000 exponential decays)
A table with x1000 c coefficient (coming from the 1000 exponential decays)
A table with x1000 fit goodness parameters (coming from the 1000 exponential decays)
All tables stored in one single structure (results.STD). My code doesn’t function, any recommendation? Thanks in advance!
ft = fittype( ‘power2’ ); % Power Fit: y = a*x^b+c
opts = fitoptions(ft); % Power fit options
opts.StartPoint = [1 -1 0];
opts.Lower = [0 -Inf -Inf];
opts.Upper = [Inf 0 Inf];
for i=1:length (spikes_mtx)
[xData, yData] = prepareCurveData(std_time,spikes_mtx(:,i)); % x = std_time y = spikes_mtx
[fitresult, gof] = fit( xData, yData, ft, opts ); % Goodnes of the Fit R^2
results.STD.Coeff.a(1,i)=S.std.fitmodel.a;
results.STD.Coeff.b(1,i)=S.std.fitmodel.b;
results.STD.Coeff.c(1,i)=S.std.fitmodel.c;
results.STD.gof.sse(1,i)=S.std.gof.sse;
results.STD.gof.rsquare(1,i)=S.std.gof.rsquare;
results.STD.gof.dfe(1,i)=S.std.gof.dfe;
results.STD.gof.adjrsquare(1,i)=S.std.gof.adjrsquare;
results.STD.gof.rmse(1,i)=S.std.gof.rmse;
endHello all! Here my question:
I have a table displaying 1000 columns (spikes_mtx). Each column has 400 rows of data displaying exponential decay over 100s time (std_time).
I’d like to fit a three-coefficient power-fit model (y = a*x^b+c) to each column so as to obtain:
A table with x1000 a coefficient (coming from the 1000 exponential decays)
A table with x1000 b coefficient (coming from the 1000 exponential decays)
A table with x1000 c coefficient (coming from the 1000 exponential decays)
A table with x1000 fit goodness parameters (coming from the 1000 exponential decays)
All tables stored in one single structure (results.STD). My code doesn’t function, any recommendation? Thanks in advance!
ft = fittype( ‘power2’ ); % Power Fit: y = a*x^b+c
opts = fitoptions(ft); % Power fit options
opts.StartPoint = [1 -1 0];
opts.Lower = [0 -Inf -Inf];
opts.Upper = [Inf 0 Inf];
for i=1:length (spikes_mtx)
[xData, yData] = prepareCurveData(std_time,spikes_mtx(:,i)); % x = std_time y = spikes_mtx
[fitresult, gof] = fit( xData, yData, ft, opts ); % Goodnes of the Fit R^2
results.STD.Coeff.a(1,i)=S.std.fitmodel.a;
results.STD.Coeff.b(1,i)=S.std.fitmodel.b;
results.STD.Coeff.c(1,i)=S.std.fitmodel.c;
results.STD.gof.sse(1,i)=S.std.gof.sse;
results.STD.gof.rsquare(1,i)=S.std.gof.rsquare;
results.STD.gof.dfe(1,i)=S.std.gof.dfe;
results.STD.gof.adjrsquare(1,i)=S.std.gof.adjrsquare;
results.STD.gof.rmse(1,i)=S.std.gof.rmse;
end Hello all! Here my question:
I have a table displaying 1000 columns (spikes_mtx). Each column has 400 rows of data displaying exponential decay over 100s time (std_time).
I’d like to fit a three-coefficient power-fit model (y = a*x^b+c) to each column so as to obtain:
A table with x1000 a coefficient (coming from the 1000 exponential decays)
A table with x1000 b coefficient (coming from the 1000 exponential decays)
A table with x1000 c coefficient (coming from the 1000 exponential decays)
A table with x1000 fit goodness parameters (coming from the 1000 exponential decays)
All tables stored in one single structure (results.STD). My code doesn’t function, any recommendation? Thanks in advance!
ft = fittype( ‘power2’ ); % Power Fit: y = a*x^b+c
opts = fitoptions(ft); % Power fit options
opts.StartPoint = [1 -1 0];
opts.Lower = [0 -Inf -Inf];
opts.Upper = [Inf 0 Inf];
for i=1:length (spikes_mtx)
[xData, yData] = prepareCurveData(std_time,spikes_mtx(:,i)); % x = std_time y = spikes_mtx
[fitresult, gof] = fit( xData, yData, ft, opts ); % Goodnes of the Fit R^2
results.STD.Coeff.a(1,i)=S.std.fitmodel.a;
results.STD.Coeff.b(1,i)=S.std.fitmodel.b;
results.STD.Coeff.c(1,i)=S.std.fitmodel.c;
results.STD.gof.sse(1,i)=S.std.gof.sse;
results.STD.gof.rsquare(1,i)=S.std.gof.rsquare;
results.STD.gof.dfe(1,i)=S.std.gof.dfe;
results.STD.gof.adjrsquare(1,i)=S.std.gof.adjrsquare;
results.STD.gof.rmse(1,i)=S.std.gof.rmse;
end preparecurvedata, power-law, exponential-decay MATLAB Answers — New Questions
Add-Ons for Access 2019 (for PC)
Hello,
Today I search for some add-ons because there are none into my installed office 2019. So, I try it within Acces 2019 at settings, management. Oops… empty and nothing there to install.
Can anyone tell me how to get this add-ons into my system?
In previous Office (2007, 2009, 2013 and so on) they are installed at first installation.
Where or how can I get these COM and ACCESS add-ons???
By example: Analysis Toolpak, Analystis Toolpak – VBA, ASAP Utilities, Euro Currency Tools, Solution Add-Ons.
Thamks in advanced for your suggestions and help.
Hello,Today I search for some add-ons because there are none into my installed office 2019. So, I try it within Acces 2019 at settings, management. Oops… empty and nothing there to install.Can anyone tell me how to get this add-ons into my system?In previous Office (2007, 2009, 2013 and so on) they are installed at first installation.Where or how can I get these COM and ACCESS add-ons???By example: Analysis Toolpak, Analystis Toolpak – VBA, ASAP Utilities, Euro Currency Tools, Solution Add-Ons.Thamks in advanced for your suggestions and help. Read More
SQL and .net issue
Hi I am unable to see .mdf file in my visual studio when I opened one project of C# .Net in visual studio.
But same way the files are visible in data connections in YouTubers video.
I don’t have sql server installed and connected, is it happening due to this?
(I AM A BEGINNER PLS HELP IN THIS)
Hi I am unable to see .mdf file in my visual studio when I opened one project of C# .Net in visual studio.But same way the files are visible in data connections in YouTubers video. I don’t have sql server installed and connected, is it happening due to this? (I AM A BEGINNER PLS HELP IN THIS) Read More
Draw a line between a point, which has non-normalised coordinates, and a legend, which has a normalised position
I want to draw a line between a point (which has non-normalised coordinates) and a legend (which has a normalised position).
xp = 34573;
yp = 89832;
p = plot(xp,yp,’o’,’MarkerFaceColor’,’b’);
lgd = legend(p);
It would be easy if both the point coordinates and the legend position were either both normalised or both non-normalised. Indeed, I would like to use something similar to this:
plot([xp lgd.Position(1)],[yp lgd.Position(2)])
but it does not work, since they have a different normalization.
Therefore, is there a way to transform either the non-normalised coordinates into normalised coordinates, or viceversa?I want to draw a line between a point (which has non-normalised coordinates) and a legend (which has a normalised position).
xp = 34573;
yp = 89832;
p = plot(xp,yp,’o’,’MarkerFaceColor’,’b’);
lgd = legend(p);
It would be easy if both the point coordinates and the legend position were either both normalised or both non-normalised. Indeed, I would like to use something similar to this:
plot([xp lgd.Position(1)],[yp lgd.Position(2)])
but it does not work, since they have a different normalization.
Therefore, is there a way to transform either the non-normalised coordinates into normalised coordinates, or viceversa? I want to draw a line between a point (which has non-normalised coordinates) and a legend (which has a normalised position).
xp = 34573;
yp = 89832;
p = plot(xp,yp,’o’,’MarkerFaceColor’,’b’);
lgd = legend(p);
It would be easy if both the point coordinates and the legend position were either both normalised or both non-normalised. Indeed, I would like to use something similar to this:
plot([xp lgd.Position(1)],[yp lgd.Position(2)])
but it does not work, since they have a different normalization.
Therefore, is there a way to transform either the non-normalised coordinates into normalised coordinates, or viceversa? coordiantes, position, line, normalised, normalised coordiantes, non-normalised, non-normalised coordiantes MATLAB Answers — New Questions
Conditional Access Help
Hi –
Thought this would be easy but it’s not. We have a group of 5 temporary employees that need to access one custom built app in our environment. That app utilizes M365 authentication. I setup these users in a security group and want to block all access with the exclusion to this one app. The problem is, if I block Office 365, it does not allow them to login to the custom app. They get an error that blocks them, even though the app itself is excluded. I then exclude the app and Office 365 and it allows the login. This is frustrating because we cannot allow any access to Outlook, Sharepoint, OneDrive, etc. Any advice? When I try to search for just Exchange or Sharepoint by itself, there are no options to select under Cloud Apps.
Hi – Thought this would be easy but it’s not. We have a group of 5 temporary employees that need to access one custom built app in our environment. That app utilizes M365 authentication. I setup these users in a security group and want to block all access with the exclusion to this one app. The problem is, if I block Office 365, it does not allow them to login to the custom app. They get an error that blocks them, even though the app itself is excluded. I then exclude the app and Office 365 and it allows the login. This is frustrating because we cannot allow any access to Outlook, Sharepoint, OneDrive, etc. Any advice? When I try to search for just Exchange or Sharepoint by itself, there are no options to select under Cloud Apps. Read More
how to achieve parameter sharing in the deep learning design?
in the deep learing design, is there a way to achieve an intermidiate layer, and this layer can accept varied length of inputs, each input is processed using the same learnable parameters.in the deep learing design, is there a way to achieve an intermidiate layer, and this layer can accept varied length of inputs, each input is processed using the same learnable parameters. in the deep learing design, is there a way to achieve an intermidiate layer, and this layer can accept varied length of inputs, each input is processed using the same learnable parameters. neural network, parameter sharing MATLAB Answers — New Questions
Unable to start Microsoft Defender for Endpoint Service. Error message: The service name is invalid.
I am trying to onboard Microsoft Defender for Business by using the onboarding script “WindowsDefenderATPLocalOnboardingScript.cmd”
As I use Admin to run it, it just shows “Unable to start Microsoft Defender for Endpoint Service. Error message: The Service name is invalid”
I tried to find the ATP service but I did not find the service has anything to do with “Windows Defender ATP”. Also I did not find the same Error message in the help document though we have the same error number.
I tried to reference the
for the solution, but it doesn’t work.
Output log:
C:WindowsSystem32>”D:DownloadsGatewayWindowsDefenderATPOnboardingPackage(3) WindowsDefenderATPLocalOnboardingScript.cmd” This script is used to enroll the machine in the Microsoft Defender for Endpoint service, including security and compliance products. Upon completion, the machine should light up in the portal within 5-30 minutes, depending on the availability of an Internet connection to the machine and the power status of the machine (plugged in vs. battery powered).
IMPORTANT: This script is optimized for single machine uploads and should not be used for large scale deployments. For more information on large-scale deployments, see the MDE documentation (link available in the Endpoint Upload section of the MDE portal).
Press (Y) to confirm and continue, or (N) to cancel and exit: y
Start the Microsoft Defender for Endpoint onboarding process…
Test Administrator Privileges
Scripts run with sufficient privileges
Perform the onboarding operation
Start the service (if not already running)
Microsoft Defender for Endpoint service is not yet started
Wait for the service to start
[Error ID: 15, Error Level: 1] Microsoft Defender for Endpoint Service could not be started. error message: The Service name is invalid.
For more information, please visit: https://go.microsoft.com/fwlink/p/?linkid=822
I am trying to onboard Microsoft Defender for Business by using the onboarding script “WindowsDefenderATPLocalOnboardingScript.cmd”As I use Admin to run it, it just shows “Unable to start Microsoft Defender for Endpoint Service. Error message: The Service name is invalid”I tried to find the ATP service but I did not find the service has anything to do with “Windows Defender ATP”. Also I did not find the same Error message in the help document though we have the same error number.I tried to reference thehttps://answers.microsoft.com/en-us/insider/forum/all/unable-to-start-microsoft-defender-for-endpoint/854aec41-ff21-4daa-8321- b7a4eb9ba5cdfor the solution, but it doesn’t work.Output log:C:WindowsSystem32>”D:DownloadsGatewayWindowsDefenderATPOnboardingPackage(3) WindowsDefenderATPLocalOnboardingScript.cmd” This script is used to enroll the machine in the Microsoft Defender for Endpoint service, including security and compliance products. Upon completion, the machine should light up in the portal within 5-30 minutes, depending on the availability of an Internet connection to the machine and the power status of the machine (plugged in vs. battery powered).IMPORTANT: This script is optimized for single machine uploads and should not be used for large scale deployments. For more information on large-scale deployments, see the MDE documentation (link available in the Endpoint Upload section of the MDE portal).Press (Y) to confirm and continue, or (N) to cancel and exit: yStart the Microsoft Defender for Endpoint onboarding process…Test Administrator PrivilegesScripts run with sufficient privilegesPerform the onboarding operationStart the service (if not already running)Microsoft Defender for Endpoint service is not yet startedWait for the service to start[Error ID: 15, Error Level: 1] Microsoft Defender for Endpoint Service could not be started. error message: The Service name is invalid.For more information, please visit: https://go.microsoft.com/fwlink/p/?linkid=822 Read More
Simulink running despite error message
So, I have the following issue, that confuses me. I have simulink model to compare different controller (in Variant Subsystems). I use mainly MATLAB Function Blocks to implement those controllers. For one controller, however, simulink throws me an error message:
This is the only error message and it doesn’t make sense to me. But the simulation completes normally, and all the values seem correct. I could also set breakpoints and check on the matrix dimensions:
I am wondering if anybody had same issue and what causes it? I could just ignore it, but this does not seem right for me. I would rather fix this.So, I have the following issue, that confuses me. I have simulink model to compare different controller (in Variant Subsystems). I use mainly MATLAB Function Blocks to implement those controllers. For one controller, however, simulink throws me an error message:
This is the only error message and it doesn’t make sense to me. But the simulation completes normally, and all the values seem correct. I could also set breakpoints and check on the matrix dimensions:
I am wondering if anybody had same issue and what causes it? I could just ignore it, but this does not seem right for me. I would rather fix this. So, I have the following issue, that confuses me. I have simulink model to compare different controller (in Variant Subsystems). I use mainly MATLAB Function Blocks to implement those controllers. For one controller, however, simulink throws me an error message:
This is the only error message and it doesn’t make sense to me. But the simulation completes normally, and all the values seem correct. I could also set breakpoints and check on the matrix dimensions:
I am wondering if anybody had same issue and what causes it? I could just ignore it, but this does not seem right for me. I would rather fix this. simulink MATLAB Answers — New Questions
Random Number Generation with Parameters
Dear All,
Kindly ask for your assistant, I am trying to generate a time series with approx 500 data with the following parameters
1)values between min=0 max=1500
2) 0-100 range 50% of total data, 101-200 25% of total data etc
3) x/x+1 data should be +/-10% at 20% of data, x/x+1 should be between +/-10% – +/-20 at 15% of total data etc
Any ideas will be highly appreciatedDear All,
Kindly ask for your assistant, I am trying to generate a time series with approx 500 data with the following parameters
1)values between min=0 max=1500
2) 0-100 range 50% of total data, 101-200 25% of total data etc
3) x/x+1 data should be +/-10% at 20% of data, x/x+1 should be between +/-10% – +/-20 at 15% of total data etc
Any ideas will be highly appreciated Dear All,
Kindly ask for your assistant, I am trying to generate a time series with approx 500 data with the following parameters
1)values between min=0 max=1500
2) 0-100 range 50% of total data, 101-200 25% of total data etc
3) x/x+1 data should be +/-10% at 20% of data, x/x+1 should be between +/-10% – +/-20 at 15% of total data etc
Any ideas will be highly appreciated random number generator, discrete distribution MATLAB Answers — New Questions