Category: Matlab
Category Archives: Matlab
Unable to create a exponential graph
I am trying to make a basic tyre degredation model and I am not able to get an increasing exponential graph. I have four input block representing vital variables reagrding tyre degredation. The current model is down below. The code inside the MATLAB function block is
function y = exp_temp(u)
2 % Exponential function for temperature degradation
3 a = 0.1; % adjust this value to fit the data
4 b = 0.02; % adjust this value to fit the data
5 y = a * exp(b * u);
6 end
The graph should look like something In the second picture. What am I doing wrong.I am trying to make a basic tyre degredation model and I am not able to get an increasing exponential graph. I have four input block representing vital variables reagrding tyre degredation. The current model is down below. The code inside the MATLAB function block is
function y = exp_temp(u)
2 % Exponential function for temperature degradation
3 a = 0.1; % adjust this value to fit the data
4 b = 0.02; % adjust this value to fit the data
5 y = a * exp(b * u);
6 end
The graph should look like something In the second picture. What am I doing wrong. I am trying to make a basic tyre degredation model and I am not able to get an increasing exponential graph. I have four input block representing vital variables reagrding tyre degredation. The current model is down below. The code inside the MATLAB function block is
function y = exp_temp(u)
2 % Exponential function for temperature degradation
3 a = 0.1; % adjust this value to fit the data
4 b = 0.02; % adjust this value to fit the data
5 y = a * exp(b * u);
6 end
The graph should look like something In the second picture. What am I doing wrong. matlab, simulink MATLAB Answers — New Questions
Portfolio Optimisation using a mean/ mean absolute deviation model (linear program)
Hey everybody,
I am new to Matlab. I have recently used quadprog for the standard mean-variance model to optimise a portfolio.
I want to try several models and am currently trying to model the linear program -> mean / mean absolute deviation.
Mathematically speaking :
[URL=http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html][IMG]http://www10.pic-upload.de/thumb/05.08.13/3hz1okoiiv24.png[/IMG][/URL]
in case that didn’t work :
http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html
S = 872 observations I have for 9 stocks.
delta is the target return.
% This script will calculate and plot the efficient frontier for a
% mean – mean absolute deviation model in the Konno context.
% Take sample ‘Sample’ and calculate the mad -> transpose PeriodMAD
% and store variable in the workspace
PeriodMAD = mad(Sample);
PeriodMAD = PeriodMAD’;
assignin(‘base’,’PeriodMAD’,PeriodMAD);
% get number of Assets ( i am using 9 stocks)
nAssets = numel(PeriodMAD);
% Set the first targetreturn
targetreturn = 0.000001;
% Not sure if that is right -> allow none of the MAD values to lower than
% 0
nonnegativityMAD = zeros(nAssets, 1);
% Conformity with the linproq notation
f = PeriodMAD;
% Set some restrictions -> as shown in the graphic I have provided. NOt
% sure if I set them up correctly to be honest.
% PeriodDeviations includes nothing more than Observation at time(i) –
% mean of the asset (PeriodDeviations -> (9,1) vector)
% PeriodReturns -> ln returns for the observations 782 -> vector (9,1)
Aeq = [ PeriodDeviations
-PeriodDeviations
-PeriodMAD
-PeriodReturns ];
Beq = [ PeriodMAD
-PeriodMAD
nonnegativityMAD
-targetreturn];
% Set lower and upper boundaries for the weights -> 0<= x <= 1
lb = zeros(nAssets,1);
ub = ones(nAssets, 1);
% Copied that line from the quadprog example given on the internet
% changed interior-point-convex to interior-point
options = optimset(‘Algorithm’,’interior-point’);
options = optimset(options,’Display’,’iter’,’TolFun’,1e-10);
for i=1:100000;
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
% Not sure if that is correct. Store respective mean in Output(1,i)
% do the same for the portfolio MAD -> is that correct?
% This is a modified "Sharpe- Ratio" or Konno Ratio. the quotient of
% the former two variables
% Finally store the weights x in Output as well -> 9 variables
% therefore Output(5,i) to Output(13,i)
Output(1,i) = x’ * PeriodReturns;
Output(2,i) = x’ * PeriodMAD;
Output(3,i) = (Output(1,i)/Output(2,i));
Output(5,i) = x(1,1);
Output(6,i) = x(2,1);
Output(7,i) = x(3,1);
Output(8,i) = x(4,1);
Output(9,i) = x(5,1);
Output(10,i) = x(6,1);
Output(11,i) = x(7,1);
Output(12,i) = x(8,1);
Output(13,i) = x(9,1);
% now increment targetreturn -> repeat the entire process as long as
% linprog finds a solutions (converges to a solution) otherwise
% stop/break
targetreturn = targetreturn + 0.000001;
if(exitflag == 1)
continue
else
break
end
end
% Find highest KonnoRatio – Quotient of Returns/Risk stored as
% maxKonnoRatio then find position in Output
maxKonnoRatio = max(Output(3,:));
[row col] = find(maxKonnoRatio == Output(3,:));
% finally create and display an array that contains all the information
% for the optimal allocation.
OptimalAll = [ Output(1,col)
Output(2,col)
Output(3,col)
0
Output(5,col)
Output(6,col)
Output(7,col)
Output(8,col)
Output(9,col) ]
% and hopefully draw the efficient frontier
plot(Output(2,i),Output(1,i))
I am stuck. I have modified so much stuff already and I keep getting error messages. currently this is the most recent one :
EDU>> MAD
Error using linprog (line 231)
The number of rows in Aeq must be the same as the number of elements of beq.
Error in MAD (line 37)
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
EDU>> MAD
Error: File: MAD.m Line: 108 Column: 32
Unbalanced or unexpected parenthesis or bracket.
EDU>>
if you could please help me.
Am I at least close to a proper solution ?
Btw. : I will annualise those daily data observations – as soon as I can solve the basic problem.
I would be very grateful for some advice and/or help.
Thank you so much!
DanielHey everybody,
I am new to Matlab. I have recently used quadprog for the standard mean-variance model to optimise a portfolio.
I want to try several models and am currently trying to model the linear program -> mean / mean absolute deviation.
Mathematically speaking :
[URL=http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html][IMG]http://www10.pic-upload.de/thumb/05.08.13/3hz1okoiiv24.png[/IMG][/URL]
in case that didn’t work :
http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html
S = 872 observations I have for 9 stocks.
delta is the target return.
% This script will calculate and plot the efficient frontier for a
% mean – mean absolute deviation model in the Konno context.
% Take sample ‘Sample’ and calculate the mad -> transpose PeriodMAD
% and store variable in the workspace
PeriodMAD = mad(Sample);
PeriodMAD = PeriodMAD’;
assignin(‘base’,’PeriodMAD’,PeriodMAD);
% get number of Assets ( i am using 9 stocks)
nAssets = numel(PeriodMAD);
% Set the first targetreturn
targetreturn = 0.000001;
% Not sure if that is right -> allow none of the MAD values to lower than
% 0
nonnegativityMAD = zeros(nAssets, 1);
% Conformity with the linproq notation
f = PeriodMAD;
% Set some restrictions -> as shown in the graphic I have provided. NOt
% sure if I set them up correctly to be honest.
% PeriodDeviations includes nothing more than Observation at time(i) –
% mean of the asset (PeriodDeviations -> (9,1) vector)
% PeriodReturns -> ln returns for the observations 782 -> vector (9,1)
Aeq = [ PeriodDeviations
-PeriodDeviations
-PeriodMAD
-PeriodReturns ];
Beq = [ PeriodMAD
-PeriodMAD
nonnegativityMAD
-targetreturn];
% Set lower and upper boundaries for the weights -> 0<= x <= 1
lb = zeros(nAssets,1);
ub = ones(nAssets, 1);
% Copied that line from the quadprog example given on the internet
% changed interior-point-convex to interior-point
options = optimset(‘Algorithm’,’interior-point’);
options = optimset(options,’Display’,’iter’,’TolFun’,1e-10);
for i=1:100000;
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
% Not sure if that is correct. Store respective mean in Output(1,i)
% do the same for the portfolio MAD -> is that correct?
% This is a modified "Sharpe- Ratio" or Konno Ratio. the quotient of
% the former two variables
% Finally store the weights x in Output as well -> 9 variables
% therefore Output(5,i) to Output(13,i)
Output(1,i) = x’ * PeriodReturns;
Output(2,i) = x’ * PeriodMAD;
Output(3,i) = (Output(1,i)/Output(2,i));
Output(5,i) = x(1,1);
Output(6,i) = x(2,1);
Output(7,i) = x(3,1);
Output(8,i) = x(4,1);
Output(9,i) = x(5,1);
Output(10,i) = x(6,1);
Output(11,i) = x(7,1);
Output(12,i) = x(8,1);
Output(13,i) = x(9,1);
% now increment targetreturn -> repeat the entire process as long as
% linprog finds a solutions (converges to a solution) otherwise
% stop/break
targetreturn = targetreturn + 0.000001;
if(exitflag == 1)
continue
else
break
end
end
% Find highest KonnoRatio – Quotient of Returns/Risk stored as
% maxKonnoRatio then find position in Output
maxKonnoRatio = max(Output(3,:));
[row col] = find(maxKonnoRatio == Output(3,:));
% finally create and display an array that contains all the information
% for the optimal allocation.
OptimalAll = [ Output(1,col)
Output(2,col)
Output(3,col)
0
Output(5,col)
Output(6,col)
Output(7,col)
Output(8,col)
Output(9,col) ]
% and hopefully draw the efficient frontier
plot(Output(2,i),Output(1,i))
I am stuck. I have modified so much stuff already and I keep getting error messages. currently this is the most recent one :
EDU>> MAD
Error using linprog (line 231)
The number of rows in Aeq must be the same as the number of elements of beq.
Error in MAD (line 37)
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
EDU>> MAD
Error: File: MAD.m Line: 108 Column: 32
Unbalanced or unexpected parenthesis or bracket.
EDU>>
if you could please help me.
Am I at least close to a proper solution ?
Btw. : I will annualise those daily data observations – as soon as I can solve the basic problem.
I would be very grateful for some advice and/or help.
Thank you so much!
Daniel Hey everybody,
I am new to Matlab. I have recently used quadprog for the standard mean-variance model to optimise a portfolio.
I want to try several models and am currently trying to model the linear program -> mean / mean absolute deviation.
Mathematically speaking :
[URL=http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html][IMG]http://www10.pic-upload.de/thumb/05.08.13/3hz1okoiiv24.png[/IMG][/URL]
in case that didn’t work :
http://www.pic-upload.de/view-20298258/Screen-Shot-2013-08-05-at-01.05.47.png.html
S = 872 observations I have for 9 stocks.
delta is the target return.
% This script will calculate and plot the efficient frontier for a
% mean – mean absolute deviation model in the Konno context.
% Take sample ‘Sample’ and calculate the mad -> transpose PeriodMAD
% and store variable in the workspace
PeriodMAD = mad(Sample);
PeriodMAD = PeriodMAD’;
assignin(‘base’,’PeriodMAD’,PeriodMAD);
% get number of Assets ( i am using 9 stocks)
nAssets = numel(PeriodMAD);
% Set the first targetreturn
targetreturn = 0.000001;
% Not sure if that is right -> allow none of the MAD values to lower than
% 0
nonnegativityMAD = zeros(nAssets, 1);
% Conformity with the linproq notation
f = PeriodMAD;
% Set some restrictions -> as shown in the graphic I have provided. NOt
% sure if I set them up correctly to be honest.
% PeriodDeviations includes nothing more than Observation at time(i) –
% mean of the asset (PeriodDeviations -> (9,1) vector)
% PeriodReturns -> ln returns for the observations 782 -> vector (9,1)
Aeq = [ PeriodDeviations
-PeriodDeviations
-PeriodMAD
-PeriodReturns ];
Beq = [ PeriodMAD
-PeriodMAD
nonnegativityMAD
-targetreturn];
% Set lower and upper boundaries for the weights -> 0<= x <= 1
lb = zeros(nAssets,1);
ub = ones(nAssets, 1);
% Copied that line from the quadprog example given on the internet
% changed interior-point-convex to interior-point
options = optimset(‘Algorithm’,’interior-point’);
options = optimset(options,’Display’,’iter’,’TolFun’,1e-10);
for i=1:100000;
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
% Not sure if that is correct. Store respective mean in Output(1,i)
% do the same for the portfolio MAD -> is that correct?
% This is a modified "Sharpe- Ratio" or Konno Ratio. the quotient of
% the former two variables
% Finally store the weights x in Output as well -> 9 variables
% therefore Output(5,i) to Output(13,i)
Output(1,i) = x’ * PeriodReturns;
Output(2,i) = x’ * PeriodMAD;
Output(3,i) = (Output(1,i)/Output(2,i));
Output(5,i) = x(1,1);
Output(6,i) = x(2,1);
Output(7,i) = x(3,1);
Output(8,i) = x(4,1);
Output(9,i) = x(5,1);
Output(10,i) = x(6,1);
Output(11,i) = x(7,1);
Output(12,i) = x(8,1);
Output(13,i) = x(9,1);
% now increment targetreturn -> repeat the entire process as long as
% linprog finds a solutions (converges to a solution) otherwise
% stop/break
targetreturn = targetreturn + 0.000001;
if(exitflag == 1)
continue
else
break
end
end
% Find highest KonnoRatio – Quotient of Returns/Risk stored as
% maxKonnoRatio then find position in Output
maxKonnoRatio = max(Output(3,:));
[row col] = find(maxKonnoRatio == Output(3,:));
% finally create and display an array that contains all the information
% for the optimal allocation.
OptimalAll = [ Output(1,col)
Output(2,col)
Output(3,col)
0
Output(5,col)
Output(6,col)
Output(7,col)
Output(8,col)
Output(9,col) ]
% and hopefully draw the efficient frontier
plot(Output(2,i),Output(1,i))
I am stuck. I have modified so much stuff already and I keep getting error messages. currently this is the most recent one :
EDU>> MAD
Error using linprog (line 231)
The number of rows in Aeq must be the same as the number of elements of beq.
Error in MAD (line 37)
x = linprog ( f,[],[],Aeq,Beq,lb,ub,[], options );
EDU>> MAD
Error: File: MAD.m Line: 108 Column: 32
Unbalanced or unexpected parenthesis or bracket.
EDU>>
if you could please help me.
Am I at least close to a proper solution ?
Btw. : I will annualise those daily data observations – as soon as I can solve the basic problem.
I would be very grateful for some advice and/or help.
Thank you so much!
Daniel optimisation, portfolio, mad, linear, finance MATLAB Answers — New Questions
Why do i get a “Pin d10 reserved by servo” error when I run “writeDigitalPin” with my Arduino Uno?
I have an Arduino Uno connected to a servo motor and DC motors. If I create objects for the servo and for the DC motors, and then call "writeDigitalPin" to pin d10 where the DC motor is connected, the states of all of the pins are set to 0 and I get the following error:
"Uno pin d10 is reserved by servo. To release the resource, clear all variables holding onto this resource"
How can I fix this error?I have an Arduino Uno connected to a servo motor and DC motors. If I create objects for the servo and for the DC motors, and then call "writeDigitalPin" to pin d10 where the DC motor is connected, the states of all of the pins are set to 0 and I get the following error:
"Uno pin d10 is reserved by servo. To release the resource, clear all variables holding onto this resource"
How can I fix this error? I have an Arduino Uno connected to a servo motor and DC motors. If I create objects for the servo and for the DC motors, and then call "writeDigitalPin" to pin d10 where the DC motor is connected, the states of all of the pins are set to 0 and I get the following error:
"Uno pin d10 is reserved by servo. To release the resource, clear all variables holding onto this resource"
How can I fix this error? arduino, servo, writedigitalpin MATLAB Answers — New Questions
Simulation of nonlinear simulation oscillating to infinity
I am simulating a wind turbine with a flexible drivetrain in simulink. I am using a two mass model to model the oscillations on the drivetrain.
Whenever I run a simulation with a smooth change in the power output of the turbine it ends up oscillating and the simulation quits with the error message:
"Solver encountered an error while simulating model ‘WecsNoConverter’ at time 47.9683593447728 and cannot continue. Please check the model for errors.
Nonlinear iteration is not converging with step size reduced to hmin (1.70418E-13) at time 47.9684. Try reducing the minimum step size and/or relax the relative error tolerance."
I am using ode15s as the solver. I have tried relaxing the relative error tolerance but it appears to make no difference. Enabling shape preservation makes no difference. Decreasing the max order increases the lenght of time before the system oscillates to infinity. The results above are with a max order of 1. Any max order of 2-4 makes results in the above behaviour happening sooner. I have tried other solvers but ode15s gives me the best results
One thing which fixes the simulation is to increase the damping term on the two mass model. Which results in the smooth output as shown below. However, this means the model is not accurate to the original turbine, so this is not an option.
Are there any other options I can try to get the simulation to run the full length of time?I am simulating a wind turbine with a flexible drivetrain in simulink. I am using a two mass model to model the oscillations on the drivetrain.
Whenever I run a simulation with a smooth change in the power output of the turbine it ends up oscillating and the simulation quits with the error message:
"Solver encountered an error while simulating model ‘WecsNoConverter’ at time 47.9683593447728 and cannot continue. Please check the model for errors.
Nonlinear iteration is not converging with step size reduced to hmin (1.70418E-13) at time 47.9684. Try reducing the minimum step size and/or relax the relative error tolerance."
I am using ode15s as the solver. I have tried relaxing the relative error tolerance but it appears to make no difference. Enabling shape preservation makes no difference. Decreasing the max order increases the lenght of time before the system oscillates to infinity. The results above are with a max order of 1. Any max order of 2-4 makes results in the above behaviour happening sooner. I have tried other solvers but ode15s gives me the best results
One thing which fixes the simulation is to increase the damping term on the two mass model. Which results in the smooth output as shown below. However, this means the model is not accurate to the original turbine, so this is not an option.
Are there any other options I can try to get the simulation to run the full length of time? I am simulating a wind turbine with a flexible drivetrain in simulink. I am using a two mass model to model the oscillations on the drivetrain.
Whenever I run a simulation with a smooth change in the power output of the turbine it ends up oscillating and the simulation quits with the error message:
"Solver encountered an error while simulating model ‘WecsNoConverter’ at time 47.9683593447728 and cannot continue. Please check the model for errors.
Nonlinear iteration is not converging with step size reduced to hmin (1.70418E-13) at time 47.9684. Try reducing the minimum step size and/or relax the relative error tolerance."
I am using ode15s as the solver. I have tried relaxing the relative error tolerance but it appears to make no difference. Enabling shape preservation makes no difference. Decreasing the max order increases the lenght of time before the system oscillates to infinity. The results above are with a max order of 1. Any max order of 2-4 makes results in the above behaviour happening sooner. I have tried other solvers but ode15s gives me the best results
One thing which fixes the simulation is to increase the damping term on the two mass model. Which results in the smooth output as shown below. However, this means the model is not accurate to the original turbine, so this is not an option.
Are there any other options I can try to get the simulation to run the full length of time? nonlinear, simulink, simulation, unstable, oscillation, ode, ode15s, instability MATLAB Answers — New Questions
I’m trying to solve a 2nd order ode with ode45, but have no idea where to start.
This the ode with conditions I’m trying to solve and the code below is as far as I got. It would be appreciated if I could get a detailed step by step to help solve this.
%initial conditions
y0 = [0 1];
tspan = [1 4];This the ode with conditions I’m trying to solve and the code below is as far as I got. It would be appreciated if I could get a detailed step by step to help solve this.
%initial conditions
y0 = [0 1];
tspan = [1 4]; This the ode with conditions I’m trying to solve and the code below is as far as I got. It would be appreciated if I could get a detailed step by step to help solve this.
%initial conditions
y0 = [0 1];
tspan = [1 4]; ode45, ode MATLAB Answers — New Questions
Hodrick-Prescott filter with smoothing factor as parameter
Hi i’m trying to parametrize Hodrick-Prescott filter (HP) as a function of smoothing parameter. Simple xy plot with the smoothing factor as parameter. I post my code below
excel=readmatrix("COMEX_SIZ2024, 1D_1f4e1.csv");
price=excel(:,6);
lambda=500:500:5500;
>> for pp=1:length(lambda)
[Trend(length(price),pp),Cyclical(length(price),pp)]=hpfilter(price,Smoothing=lambda(pp));
end
ERROR: Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
I’m using a for loop to impile the lambda on columns and calculation (x=price) on rows. However it doesnt seem to work.
Where is my error? ThanksHi i’m trying to parametrize Hodrick-Prescott filter (HP) as a function of smoothing parameter. Simple xy plot with the smoothing factor as parameter. I post my code below
excel=readmatrix("COMEX_SIZ2024, 1D_1f4e1.csv");
price=excel(:,6);
lambda=500:500:5500;
>> for pp=1:length(lambda)
[Trend(length(price),pp),Cyclical(length(price),pp)]=hpfilter(price,Smoothing=lambda(pp));
end
ERROR: Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
I’m using a for loop to impile the lambda on columns and calculation (x=price) on rows. However it doesnt seem to work.
Where is my error? Thanks Hi i’m trying to parametrize Hodrick-Prescott filter (HP) as a function of smoothing parameter. Simple xy plot with the smoothing factor as parameter. I post my code below
excel=readmatrix("COMEX_SIZ2024, 1D_1f4e1.csv");
price=excel(:,6);
lambda=500:500:5500;
>> for pp=1:length(lambda)
[Trend(length(price),pp),Cyclical(length(price),pp)]=hpfilter(price,Smoothing=lambda(pp));
end
ERROR: Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
I’m using a for loop to impile the lambda on columns and calculation (x=price) on rows. However it doesnt seem to work.
Where is my error? Thanks hp filter, parameter, for loop, cycle MATLAB Answers — New Questions
Function file does not work
If I save a function in a file it is not work even I save the function file in the same folder of the code
the error is
‘Undefined function ‘Crouts1A’ for input arguments of type ‘double’.’
but if I write the function in the last code it is work.. how can I fix it.
My version Matlab is R2024aIf I save a function in a file it is not work even I save the function file in the same folder of the code
the error is
‘Undefined function ‘Crouts1A’ for input arguments of type ‘double’.’
but if I write the function in the last code it is work.. how can I fix it.
My version Matlab is R2024a If I save a function in a file it is not work even I save the function file in the same folder of the code
the error is
‘Undefined function ‘Crouts1A’ for input arguments of type ‘double’.’
but if I write the function in the last code it is work.. how can I fix it.
My version Matlab is R2024a function file MATLAB Answers — New Questions
Licensing error: -8,523.
I have just installed matlab. But i get an error. I researched cause of the error. I opened and checked the license file. I haven’t got HostID in license file.
My license file:
# BEGIN————–BEGIN————–BEGIN
# DO NOT EDIT THIS FILE. Any changes will be overwritten.
# MathWorks license passcode file.
#LicenseNo: my license numberI have just installed matlab. But i get an error. I researched cause of the error. I opened and checked the license file. I haven’t got HostID in license file.
My license file:
# BEGIN————–BEGIN————–BEGIN
# DO NOT EDIT THIS FILE. Any changes will be overwritten.
# MathWorks license passcode file.
#LicenseNo: my license number I have just installed matlab. But i get an error. I researched cause of the error. I opened and checked the license file. I haven’t got HostID in license file.
My license file:
# BEGIN————–BEGIN————–BEGIN
# DO NOT EDIT THIS FILE. Any changes will be overwritten.
# MathWorks license passcode file.
#LicenseNo: my license number error MATLAB Answers — New Questions
Accessing network drives from within Matlab
I have two Windows 10 computers running Matlab 2023b on the same network. On one computer, I am able to reach a remote network drive easily enough from the Matlab prompt,
>> cd ‘\drivepathname’
However, on the other computer, while I can access the network drive through Windows File Explorer, I cannot do so from within Matlab,
>> cd ‘\drivepathname’
Error using cd
Unable to change current folder to ‘\drivepathname’ (Folder access failure).
I am trying to guess what might be different about the 2 installations. Ay suggestions are welcome.I have two Windows 10 computers running Matlab 2023b on the same network. On one computer, I am able to reach a remote network drive easily enough from the Matlab prompt,
>> cd ‘\drivepathname’
However, on the other computer, while I can access the network drive through Windows File Explorer, I cannot do so from within Matlab,
>> cd ‘\drivepathname’
Error using cd
Unable to change current folder to ‘\drivepathname’ (Folder access failure).
I am trying to guess what might be different about the 2 installations. Ay suggestions are welcome. I have two Windows 10 computers running Matlab 2023b on the same network. On one computer, I am able to reach a remote network drive easily enough from the Matlab prompt,
>> cd ‘\drivepathname’
However, on the other computer, while I can access the network drive through Windows File Explorer, I cannot do so from within Matlab,
>> cd ‘\drivepathname’
Error using cd
Unable to change current folder to ‘\drivepathname’ (Folder access failure).
I am trying to guess what might be different about the 2 installations. Ay suggestions are welcome. cd, network drive, priviliges MATLAB Answers — New Questions
How to quantify shape similarity between two vectors.
I need to quanitfy how similarity between two spectral profile. I have looked at procrustes distance but it dosent work when spectrum is shifted on x axis. Is there a way to quanitfy this, ideally between 0 (no similairty) and 1 (perfect similarity) ?
x1 = 0:0.1:10;
Y1 = gaussmf(x1,[0.8 5 ]);
Y2 = gaussmf(x1,[0.8 3 ]);
Y3 = gaussmf(x1,[0.4 2 ]);
figure(1)
plot(x1,Y1, ‘k’,’Linewidth’,2)
hold on
plot(x1,Y2, ‘b’,’Linewidth’,2)
hold on
plot(x1,Y3, ‘r’,’Linewidth’,2)
legend(["A","B","C"])
figure(1)
In the toy example, A and B are very similar so that should have a high similairty index but A-C and B-C should have lower similarity.I need to quanitfy how similarity between two spectral profile. I have looked at procrustes distance but it dosent work when spectrum is shifted on x axis. Is there a way to quanitfy this, ideally between 0 (no similairty) and 1 (perfect similarity) ?
x1 = 0:0.1:10;
Y1 = gaussmf(x1,[0.8 5 ]);
Y2 = gaussmf(x1,[0.8 3 ]);
Y3 = gaussmf(x1,[0.4 2 ]);
figure(1)
plot(x1,Y1, ‘k’,’Linewidth’,2)
hold on
plot(x1,Y2, ‘b’,’Linewidth’,2)
hold on
plot(x1,Y3, ‘r’,’Linewidth’,2)
legend(["A","B","C"])
figure(1)
In the toy example, A and B are very similar so that should have a high similairty index but A-C and B-C should have lower similarity. I need to quanitfy how similarity between two spectral profile. I have looked at procrustes distance but it dosent work when spectrum is shifted on x axis. Is there a way to quanitfy this, ideally between 0 (no similairty) and 1 (perfect similarity) ?
x1 = 0:0.1:10;
Y1 = gaussmf(x1,[0.8 5 ]);
Y2 = gaussmf(x1,[0.8 3 ]);
Y3 = gaussmf(x1,[0.4 2 ]);
figure(1)
plot(x1,Y1, ‘k’,’Linewidth’,2)
hold on
plot(x1,Y2, ‘b’,’Linewidth’,2)
hold on
plot(x1,Y3, ‘r’,’Linewidth’,2)
legend(["A","B","C"])
figure(1)
In the toy example, A and B are very similar so that should have a high similairty index but A-C and B-C should have lower similarity. similarity index, procrustes, spectral matching MATLAB Answers — New Questions
Generating codim-1 bifurcation diagram of sliding friction oscillator
I am performing continuation analysis in MATCONT and I am finding it difficult to generate co-dim bifurcation diagram.
Here is my linearized system of equations which represents a 3-dof clutch dynamics with sliding type friction:
x1′ = x2
x2′ = -(de+Fn*mukin)*x2/je + (Fn*mukin*x4)/je – ((x2-x4)*mukin + mus)/je
x3′ = x4
x4′ = (Fn*mukin*x2)/jd – (ds+Fn*mukin)*x4/jd +ds*x6/jd + ks*x7/jd
x5′ = x6
x6′ = ds*x4/jv -ds*x6/jv – ks*x7/jv
x7′ = x6 – x4
This system dynamics represents clutch dynamics with the sliding friction between inertias je and jd. jv is the load inertia. ks is stiffness between jd and jv. de,ds is damping coefficient. Fn is normal force acting on jd and je during engagement of clutch. mukin is slope of friction curve usually between [-0.01 to 0.01] and mus is static coefficient of friction 0.136 for this analysis.
je = 1.57
jd = 0.0066
jv = 4
ks = 56665.5
ds,de = 0.1
Fn = 8000
Please guide me how to perform the continuation of this system in MATCONT.I am performing continuation analysis in MATCONT and I am finding it difficult to generate co-dim bifurcation diagram.
Here is my linearized system of equations which represents a 3-dof clutch dynamics with sliding type friction:
x1′ = x2
x2′ = -(de+Fn*mukin)*x2/je + (Fn*mukin*x4)/je – ((x2-x4)*mukin + mus)/je
x3′ = x4
x4′ = (Fn*mukin*x2)/jd – (ds+Fn*mukin)*x4/jd +ds*x6/jd + ks*x7/jd
x5′ = x6
x6′ = ds*x4/jv -ds*x6/jv – ks*x7/jv
x7′ = x6 – x4
This system dynamics represents clutch dynamics with the sliding friction between inertias je and jd. jv is the load inertia. ks is stiffness between jd and jv. de,ds is damping coefficient. Fn is normal force acting on jd and je during engagement of clutch. mukin is slope of friction curve usually between [-0.01 to 0.01] and mus is static coefficient of friction 0.136 for this analysis.
je = 1.57
jd = 0.0066
jv = 4
ks = 56665.5
ds,de = 0.1
Fn = 8000
Please guide me how to perform the continuation of this system in MATCONT. I am performing continuation analysis in MATCONT and I am finding it difficult to generate co-dim bifurcation diagram.
Here is my linearized system of equations which represents a 3-dof clutch dynamics with sliding type friction:
x1′ = x2
x2′ = -(de+Fn*mukin)*x2/je + (Fn*mukin*x4)/je – ((x2-x4)*mukin + mus)/je
x3′ = x4
x4′ = (Fn*mukin*x2)/jd – (ds+Fn*mukin)*x4/jd +ds*x6/jd + ks*x7/jd
x5′ = x6
x6′ = ds*x4/jv -ds*x6/jv – ks*x7/jv
x7′ = x6 – x4
This system dynamics represents clutch dynamics with the sliding friction between inertias je and jd. jv is the load inertia. ks is stiffness between jd and jv. de,ds is damping coefficient. Fn is normal force acting on jd and je during engagement of clutch. mukin is slope of friction curve usually between [-0.01 to 0.01] and mus is static coefficient of friction 0.136 for this analysis.
je = 1.57
jd = 0.0066
jv = 4
ks = 56665.5
ds,de = 0.1
Fn = 8000
Please guide me how to perform the continuation of this system in MATCONT. matcont MATLAB Answers — New Questions
How to launch scripts into Simulink using key shortcut
I have some scripts to automate some procese designing in Simulink, but I would like to run/launch them with a key shortcuts.
I tried to use ‘accelerator’ but is shows in the menu accelerator keys but without work.
How to activate accelerators or run/launch a custom scripts with a key shortcuts ?I have some scripts to automate some procese designing in Simulink, but I would like to run/launch them with a key shortcuts.
I tried to use ‘accelerator’ but is shows in the menu accelerator keys but without work.
How to activate accelerators or run/launch a custom scripts with a key shortcuts ? I have some scripts to automate some procese designing in Simulink, but I would like to run/launch them with a key shortcuts.
I tried to use ‘accelerator’ but is shows in the menu accelerator keys but without work.
How to activate accelerators or run/launch a custom scripts with a key shortcuts ? accelerators, key shortcuts MATLAB Answers — New Questions
Using array input and output for simulink S-function C code block
I’m having a tough time attempting to use a C code block that needs uint8 array input and output . I’ve tried starting from a number of legacy code examples but encounter crashes every time my C code actually tries to access the incoming memory. If someone can point me to a working example (I’ve already tried everything that looked relevant here) I’d appreciate it. In my latest attempt I gave up on using the legacy code functions and took code from this example Create a Basic C MEX S-Function – MATLAB & Simulink (mathworks.com) which at least runs without crashing, and started to change it to take uint8 in/out as below. However I’ve no idea where to find the equivalent of InputRealPtrsType for unit8_T . If I use InputPtrsType instead of InputRealPtrsType I get the error error C2100: you cannot dereference an operand of type const void`
static void mdlOutputs(SimStruct *S, int_T tid)
{
int_T i;
// replced ssGetInputPortRealSignalPtrs(S,0) with ssGetInputPortSignalPtrs
InputRealPtrsType uPtrs = ssGetInputPortSignalPtrs(S,0);
// replaced ssGetOutputPortRealSignal(S,0) with ssGetOutputPortSignal
real_T *y = ssGetOutputPortSignal(S,0);
int_T width = ssGetOutputPortWidth(S,0);
for (i=0; i<width; i++) {
*y++ = 2.0 *(*uPtrs[i]);
}
}I’m having a tough time attempting to use a C code block that needs uint8 array input and output . I’ve tried starting from a number of legacy code examples but encounter crashes every time my C code actually tries to access the incoming memory. If someone can point me to a working example (I’ve already tried everything that looked relevant here) I’d appreciate it. In my latest attempt I gave up on using the legacy code functions and took code from this example Create a Basic C MEX S-Function – MATLAB & Simulink (mathworks.com) which at least runs without crashing, and started to change it to take uint8 in/out as below. However I’ve no idea where to find the equivalent of InputRealPtrsType for unit8_T . If I use InputPtrsType instead of InputRealPtrsType I get the error error C2100: you cannot dereference an operand of type const void`
static void mdlOutputs(SimStruct *S, int_T tid)
{
int_T i;
// replced ssGetInputPortRealSignalPtrs(S,0) with ssGetInputPortSignalPtrs
InputRealPtrsType uPtrs = ssGetInputPortSignalPtrs(S,0);
// replaced ssGetOutputPortRealSignal(S,0) with ssGetOutputPortSignal
real_T *y = ssGetOutputPortSignal(S,0);
int_T width = ssGetOutputPortWidth(S,0);
for (i=0; i<width; i++) {
*y++ = 2.0 *(*uPtrs[i]);
}
} I’m having a tough time attempting to use a C code block that needs uint8 array input and output . I’ve tried starting from a number of legacy code examples but encounter crashes every time my C code actually tries to access the incoming memory. If someone can point me to a working example (I’ve already tried everything that looked relevant here) I’d appreciate it. In my latest attempt I gave up on using the legacy code functions and took code from this example Create a Basic C MEX S-Function – MATLAB & Simulink (mathworks.com) which at least runs without crashing, and started to change it to take uint8 in/out as below. However I’ve no idea where to find the equivalent of InputRealPtrsType for unit8_T . If I use InputPtrsType instead of InputRealPtrsType I get the error error C2100: you cannot dereference an operand of type const void`
static void mdlOutputs(SimStruct *S, int_T tid)
{
int_T i;
// replced ssGetInputPortRealSignalPtrs(S,0) with ssGetInputPortSignalPtrs
InputRealPtrsType uPtrs = ssGetInputPortSignalPtrs(S,0);
// replaced ssGetOutputPortRealSignal(S,0) with ssGetOutputPortSignal
real_T *y = ssGetOutputPortSignal(S,0);
int_T width = ssGetOutputPortWidth(S,0);
for (i=0; i<width; i++) {
*y++ = 2.0 *(*uPtrs[i]);
}
} sfunction, c-code, legacy code MATLAB Answers — New Questions
Initializing data store memory for Simulink global variables
For all functions called by Simulink function block, Simulink requires the declaration of all global variables. Also these variables need to be initialized in Data store memory. Now if any of such global variables is an array, whose initial value is an empty matrix [ ] (as its size changes during the program execution), then the Simulink is not accepting the bare initial value of [ ] for any variable’s data store memory. How to handle this situation, as there are too many such variables.For all functions called by Simulink function block, Simulink requires the declaration of all global variables. Also these variables need to be initialized in Data store memory. Now if any of such global variables is an array, whose initial value is an empty matrix [ ] (as its size changes during the program execution), then the Simulink is not accepting the bare initial value of [ ] for any variable’s data store memory. How to handle this situation, as there are too many such variables. For all functions called by Simulink function block, Simulink requires the declaration of all global variables. Also these variables need to be initialized in Data store memory. Now if any of such global variables is an array, whose initial value is an empty matrix [ ] (as its size changes during the program execution), then the Simulink is not accepting the bare initial value of [ ] for any variable’s data store memory. How to handle this situation, as there are too many such variables. simulink, data store memory, initialization MATLAB Answers — New Questions
Access violation detected: Abnormal termination:
The simulink model successfully generates the C code, however as soon as I move around and click on any model reference block, the MATLAB crashes. I am using MATLAB 2023B and Microsoft visual c++ compiler
Attaching the crash dump file.
——————————————————————————–
Access violation detected at 2024-09-09 17:01:05 -0700
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 2 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 3 : Intel Corporation ( 0x8086 ) Intel(R) UHD Graphics Version 31.0.101.5388 (2024-4-2)
Graphics card 4 : NVIDIA ( 0x10de ) NVIDIA RTX A4000 Laptop GPU Version 31.0.15.3878 (2024-6-10)
Interpreter 0 : Executing request: 6D61696E2F4173796E63426174636865722E637070
JAWT Patch Status: : Patch applied
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 11829912
MATLAB Root : C:Program FilesMATLABR2023b
MATLAB Version : 23.2.0.2485118 (R2023b) Update 6
OpenGL : hardware
Operating System : Microsoft Windows 11 Pro
Process ID : 10524
Processor ID : x86 Family 6 Model 141 Stepping 1, GenuineIntel
Session Key : a0173aab-8175-4e16-af59-45895ff25504
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ‘MCR 0 interpreter thread’ id 28828
Register State (from fault):
RAX = 0000000000000000 RBX = 000002723a50d3f0
RCX = 0000000000000000 RDX = 000002723a50d3f0
RSP = 000000d07ddfbcb8 RBP = 0000000000000000
RSI = 00000272275cb370 RDI = 00000272275cb370
R8 = 000000d07ddfbe08 R9 = 0000000000000000
R10 = 00007fff6f7cf828 R11 = 000000d07ddfbd00
R12 = 000000d07ddfbe08 R13 = 0000000000000000
R14 = 000000d07ddfbe08 R15 = 000000d07ddfbdd8
RIP = 00007fff6164dad0 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007fff6164dad0 C:Program FilesMATLABR2023bbinwin64SimulinkBlock.dll+00187088 SLRootBlock::getRootBPI+00000000
[ 1] 0x00007fff69601b05 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429445 SlSSRefWS::getNextParentWorkspace+00000069
[ 2] 0x00007fff696019bb C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429115 SlSSRefWS::fullFindVariable+00000203
[ 3] 0x00007fff69472423 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+04793379 ValidateDialogFields::validateFieldForCanvas+00001811
[ 4] 0x00007fff6f055359 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10179417 BlockEditTimeController::findMissingVarHelper+00000281
[ 5] 0x00007fff6f054fe4 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10178532 BlockEditTimeController::findMissingVar+00001604
[ 6] 0x00007fff6f055daf C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10182063 BlockEditTimeController::findMissingVariable+00001119
[ 7] 0x00007ffeff62e123 C:Program FilesMATLABR2023bbinwin64sldiagnostic_edittime.dll+00123171
[ 8] 0x00007ffeff9ed951 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00579921 mwboost::archive::codecvt_null<wchar_t>::do_out+00104625
[ 9] 0x00007ffeff9daab9 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00502457 mwboost::archive::codecvt_null<wchar_t>::do_out+00027161
[ 10] 0x00007ffeff9bc61a C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00378394 MLTerminate_edittimecheckengine+00166394
[ 11] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 12] 0x00007fff8ca8b7bf C:Program FilesMATLABR2023bbinwin64performance.dll+00309183 Performance::CooperativeTaskManager::OrderedTaskSession::onProcess+00000159
[ 13] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 14] 0x00007fff8ca8b997 C:Program FilesMATLABR2023bbinwin64performance.dll+00309655 Performance::CooperativeTaskManager::RoundRobinTaskSession::onProcess+00000231
[ 15] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 16] 0x00007fff8ca8cbf6 C:Program FilesMATLABR2023bbinwin64performance.dll+00314358 Performance::CooperativeTaskManager::shutDown+00000694
[ 17] 0x00007fff8ca58594 C:Program FilesMATLABR2023bbinwin64performance.dll+00099732 Performance::CooperativeTaskManager::Task::setName+00059796
[ 18] 0x00007fff8ca72150 C:Program FilesMATLABR2023bbinwin64performance.dll+00205136 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00016528
[ 19] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 20] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 21] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 22] 0x00007fffe8dacc61 C:Program FilesMATLABR2023bbinwin64iqm.dll+00445537 iqm::Iqm::create+00007745
[ 23] 0x00007ffffe753f5e C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081758 ioReadLine+00000430
[ 24] 0x00007ffffe753d75 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081269 ioReadLine+00000165
[ 25] 0x00007ffffe785fb0 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00286640 mnGetCommandLineBuffer+00000288
[ 26] 0x00007ffffe7864b2 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00287922 mnParser+00000578
[ 27] 0x00007fffe7d1b398 C:Program FilesMATLABR2023bbinwin64mcr.dll+00439192 mcr_initialize_main+00013816
[ 28] 0x00007fffe7cc8604 C:Program FilesMATLABR2023bbinwin64mcr.dll+00099844 mcrFunctionSignature::set_signature+00078996
[ 29] 0x00007fffe7ce61a0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00221600 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00017728
[ 30] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 31] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 32] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 33] 0x00007fffe8dade81 C:Program FilesMATLABR2023bbinwin64iqm.dll+00450177 iqm::Iqm::create+00012385
[ 34] 0x00007fffe8dad5c9 C:Program FilesMATLABR2023bbinwin64iqm.dll+00447945 iqm::Iqm::create+00010153
[ 35] 0x00007fffe7d01c1c C:Program FilesMATLABR2023bbinwin64mcr.dll+00334876 mcrInstantiationError::operator=+00009948
[ 36] 0x00007fffe7d02645 C:Program FilesMATLABR2023bbinwin64mcr.dll+00337477 mcrInstantiationError::operator=+00012549
[ 37] 0x00007fffe7cfffd0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00327632 mcrInstantiationError::operator=+00002704
[ 38] 0x00007ff82b8a92ea C:Program FilesMATLABR2023bbinwin64mwboost_thread-vc142-mt-x64-1_78.dll+00037610 mwboost::detail::win32::handle_manager::swap+00001642
[ 39] 0x00007ff83fd79333 C:WINDOWSSystem32ucrtbase.dll+00168755 recalloc+00000163
[ 40] 0x00007ff840de257d C:WINDOWSSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 41] 0x00007ff8421caf28 C:WINDOWSSYSTEM32ntdll.dll+00372520 RtlUserThreadStart+00000040
Program State:
Most Recent Simulink Activity:
coderGenerateCodeOnlyAction : OK in editor 23 at Mon Sep 9 16:59:47 2024
embeddedCoderAppAction : OK in editor 23 at Mon Sep 9 16:59:45 2024
coderGenerateCodeOnlyAction : OK in editor 22 at Mon Sep 9 16:54:23 2024
embeddedCoderAppAction : OK in editor 22 at Mon Sep 9 16:54:20 2024
saveModelAction : OK in editor 13 at Mon Sep 9 15:32:54 2024
saveModelAction : OK in editor 6 at Mon Sep 9 15:32:50 2024
Delete : OK in editor 6 at Mon Sep 9 15:32:48 2024
coderGenerateCodeOnlyAction : OK in editor 13 at Mon Sep 9 15:32:11 2024
embeddedCoderAppAction : OK in editor 13 at Mon Sep 9 15:32:09 2024
stopSimulationAction : OK in editor 13 at Mon Sep 9 15:32:05 2024
Most Recent Tool Interaction:
Editor 16: tools idle, class GLUE2::PanZoomTool is most recently active tool since Mon Sep 9 16:53:43 2024
Editor 17: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:53:52 2024
Editor 18: tools idle, no most recently active tool Editor 19: tools idle, no most recently active tool Editor 20: tools idle, no most recently active tool Editor 21: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:54:14 2024
Editor 22: tools idle, no most recently active toolThe simulink model successfully generates the C code, however as soon as I move around and click on any model reference block, the MATLAB crashes. I am using MATLAB 2023B and Microsoft visual c++ compiler
Attaching the crash dump file.
——————————————————————————–
Access violation detected at 2024-09-09 17:01:05 -0700
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 2 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 3 : Intel Corporation ( 0x8086 ) Intel(R) UHD Graphics Version 31.0.101.5388 (2024-4-2)
Graphics card 4 : NVIDIA ( 0x10de ) NVIDIA RTX A4000 Laptop GPU Version 31.0.15.3878 (2024-6-10)
Interpreter 0 : Executing request: 6D61696E2F4173796E63426174636865722E637070
JAWT Patch Status: : Patch applied
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 11829912
MATLAB Root : C:Program FilesMATLABR2023b
MATLAB Version : 23.2.0.2485118 (R2023b) Update 6
OpenGL : hardware
Operating System : Microsoft Windows 11 Pro
Process ID : 10524
Processor ID : x86 Family 6 Model 141 Stepping 1, GenuineIntel
Session Key : a0173aab-8175-4e16-af59-45895ff25504
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ‘MCR 0 interpreter thread’ id 28828
Register State (from fault):
RAX = 0000000000000000 RBX = 000002723a50d3f0
RCX = 0000000000000000 RDX = 000002723a50d3f0
RSP = 000000d07ddfbcb8 RBP = 0000000000000000
RSI = 00000272275cb370 RDI = 00000272275cb370
R8 = 000000d07ddfbe08 R9 = 0000000000000000
R10 = 00007fff6f7cf828 R11 = 000000d07ddfbd00
R12 = 000000d07ddfbe08 R13 = 0000000000000000
R14 = 000000d07ddfbe08 R15 = 000000d07ddfbdd8
RIP = 00007fff6164dad0 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007fff6164dad0 C:Program FilesMATLABR2023bbinwin64SimulinkBlock.dll+00187088 SLRootBlock::getRootBPI+00000000
[ 1] 0x00007fff69601b05 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429445 SlSSRefWS::getNextParentWorkspace+00000069
[ 2] 0x00007fff696019bb C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429115 SlSSRefWS::fullFindVariable+00000203
[ 3] 0x00007fff69472423 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+04793379 ValidateDialogFields::validateFieldForCanvas+00001811
[ 4] 0x00007fff6f055359 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10179417 BlockEditTimeController::findMissingVarHelper+00000281
[ 5] 0x00007fff6f054fe4 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10178532 BlockEditTimeController::findMissingVar+00001604
[ 6] 0x00007fff6f055daf C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10182063 BlockEditTimeController::findMissingVariable+00001119
[ 7] 0x00007ffeff62e123 C:Program FilesMATLABR2023bbinwin64sldiagnostic_edittime.dll+00123171
[ 8] 0x00007ffeff9ed951 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00579921 mwboost::archive::codecvt_null<wchar_t>::do_out+00104625
[ 9] 0x00007ffeff9daab9 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00502457 mwboost::archive::codecvt_null<wchar_t>::do_out+00027161
[ 10] 0x00007ffeff9bc61a C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00378394 MLTerminate_edittimecheckengine+00166394
[ 11] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 12] 0x00007fff8ca8b7bf C:Program FilesMATLABR2023bbinwin64performance.dll+00309183 Performance::CooperativeTaskManager::OrderedTaskSession::onProcess+00000159
[ 13] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 14] 0x00007fff8ca8b997 C:Program FilesMATLABR2023bbinwin64performance.dll+00309655 Performance::CooperativeTaskManager::RoundRobinTaskSession::onProcess+00000231
[ 15] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 16] 0x00007fff8ca8cbf6 C:Program FilesMATLABR2023bbinwin64performance.dll+00314358 Performance::CooperativeTaskManager::shutDown+00000694
[ 17] 0x00007fff8ca58594 C:Program FilesMATLABR2023bbinwin64performance.dll+00099732 Performance::CooperativeTaskManager::Task::setName+00059796
[ 18] 0x00007fff8ca72150 C:Program FilesMATLABR2023bbinwin64performance.dll+00205136 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00016528
[ 19] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 20] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 21] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 22] 0x00007fffe8dacc61 C:Program FilesMATLABR2023bbinwin64iqm.dll+00445537 iqm::Iqm::create+00007745
[ 23] 0x00007ffffe753f5e C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081758 ioReadLine+00000430
[ 24] 0x00007ffffe753d75 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081269 ioReadLine+00000165
[ 25] 0x00007ffffe785fb0 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00286640 mnGetCommandLineBuffer+00000288
[ 26] 0x00007ffffe7864b2 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00287922 mnParser+00000578
[ 27] 0x00007fffe7d1b398 C:Program FilesMATLABR2023bbinwin64mcr.dll+00439192 mcr_initialize_main+00013816
[ 28] 0x00007fffe7cc8604 C:Program FilesMATLABR2023bbinwin64mcr.dll+00099844 mcrFunctionSignature::set_signature+00078996
[ 29] 0x00007fffe7ce61a0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00221600 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00017728
[ 30] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 31] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 32] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 33] 0x00007fffe8dade81 C:Program FilesMATLABR2023bbinwin64iqm.dll+00450177 iqm::Iqm::create+00012385
[ 34] 0x00007fffe8dad5c9 C:Program FilesMATLABR2023bbinwin64iqm.dll+00447945 iqm::Iqm::create+00010153
[ 35] 0x00007fffe7d01c1c C:Program FilesMATLABR2023bbinwin64mcr.dll+00334876 mcrInstantiationError::operator=+00009948
[ 36] 0x00007fffe7d02645 C:Program FilesMATLABR2023bbinwin64mcr.dll+00337477 mcrInstantiationError::operator=+00012549
[ 37] 0x00007fffe7cfffd0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00327632 mcrInstantiationError::operator=+00002704
[ 38] 0x00007ff82b8a92ea C:Program FilesMATLABR2023bbinwin64mwboost_thread-vc142-mt-x64-1_78.dll+00037610 mwboost::detail::win32::handle_manager::swap+00001642
[ 39] 0x00007ff83fd79333 C:WINDOWSSystem32ucrtbase.dll+00168755 recalloc+00000163
[ 40] 0x00007ff840de257d C:WINDOWSSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 41] 0x00007ff8421caf28 C:WINDOWSSYSTEM32ntdll.dll+00372520 RtlUserThreadStart+00000040
Program State:
Most Recent Simulink Activity:
coderGenerateCodeOnlyAction : OK in editor 23 at Mon Sep 9 16:59:47 2024
embeddedCoderAppAction : OK in editor 23 at Mon Sep 9 16:59:45 2024
coderGenerateCodeOnlyAction : OK in editor 22 at Mon Sep 9 16:54:23 2024
embeddedCoderAppAction : OK in editor 22 at Mon Sep 9 16:54:20 2024
saveModelAction : OK in editor 13 at Mon Sep 9 15:32:54 2024
saveModelAction : OK in editor 6 at Mon Sep 9 15:32:50 2024
Delete : OK in editor 6 at Mon Sep 9 15:32:48 2024
coderGenerateCodeOnlyAction : OK in editor 13 at Mon Sep 9 15:32:11 2024
embeddedCoderAppAction : OK in editor 13 at Mon Sep 9 15:32:09 2024
stopSimulationAction : OK in editor 13 at Mon Sep 9 15:32:05 2024
Most Recent Tool Interaction:
Editor 16: tools idle, class GLUE2::PanZoomTool is most recently active tool since Mon Sep 9 16:53:43 2024
Editor 17: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:53:52 2024
Editor 18: tools idle, no most recently active tool Editor 19: tools idle, no most recently active tool Editor 20: tools idle, no most recently active tool Editor 21: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:54:14 2024
Editor 22: tools idle, no most recently active tool The simulink model successfully generates the C code, however as soon as I move around and click on any model reference block, the MATLAB crashes. I am using MATLAB 2023B and Microsoft visual c++ compiler
Attaching the crash dump file.
——————————————————————————–
Access violation detected at 2024-09-09 17:01:05 -0700
——————————————————————————–
Configuration:
Crash Decoding : Disabled – No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 2 : DisplayLink ( 0x0 ) DisplayLink USB Device Version 11.3.5139.0 (2024-2-9)
Graphics card 3 : Intel Corporation ( 0x8086 ) Intel(R) UHD Graphics Version 31.0.101.5388 (2024-4-2)
Graphics card 4 : NVIDIA ( 0x10de ) NVIDIA RTX A4000 Laptop GPU Version 31.0.15.3878 (2024-6-10)
Interpreter 0 : Executing request: 6D61696E2F4173796E63426174636865722E637070
JAWT Patch Status: : Patch applied
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 11829912
MATLAB Root : C:Program FilesMATLABR2023b
MATLAB Version : 23.2.0.2485118 (R2023b) Update 6
OpenGL : hardware
Operating System : Microsoft Windows 11 Pro
Process ID : 10524
Processor ID : x86 Family 6 Model 141 Stepping 1, GenuineIntel
Session Key : a0173aab-8175-4e16-af59-45895ff25504
Window System : Version 10.0 (Build 22631)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: ‘MCR 0 interpreter thread’ id 28828
Register State (from fault):
RAX = 0000000000000000 RBX = 000002723a50d3f0
RCX = 0000000000000000 RDX = 000002723a50d3f0
RSP = 000000d07ddfbcb8 RBP = 0000000000000000
RSI = 00000272275cb370 RDI = 00000272275cb370
R8 = 000000d07ddfbe08 R9 = 0000000000000000
R10 = 00007fff6f7cf828 R11 = 000000d07ddfbd00
R12 = 000000d07ddfbe08 R13 = 0000000000000000
R14 = 000000d07ddfbe08 R15 = 000000d07ddfbdd8
RIP = 00007fff6164dad0 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007fff6164dad0 C:Program FilesMATLABR2023bbinwin64SimulinkBlock.dll+00187088 SLRootBlock::getRootBPI+00000000
[ 1] 0x00007fff69601b05 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429445 SlSSRefWS::getNextParentWorkspace+00000069
[ 2] 0x00007fff696019bb C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+06429115 SlSSRefWS::fullFindVariable+00000203
[ 3] 0x00007fff69472423 C:Program FilesMATLABR2023bbinwin64sl_prm_engine.dll+04793379 ValidateDialogFields::validateFieldForCanvas+00001811
[ 4] 0x00007fff6f055359 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10179417 BlockEditTimeController::findMissingVarHelper+00000281
[ 5] 0x00007fff6f054fe4 C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10178532 BlockEditTimeController::findMissingVar+00001604
[ 6] 0x00007fff6f055daf C:Program FilesMATLABR2023bbinwin64libmwsimulink.dll+10182063 BlockEditTimeController::findMissingVariable+00001119
[ 7] 0x00007ffeff62e123 C:Program FilesMATLABR2023bbinwin64sldiagnostic_edittime.dll+00123171
[ 8] 0x00007ffeff9ed951 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00579921 mwboost::archive::codecvt_null<wchar_t>::do_out+00104625
[ 9] 0x00007ffeff9daab9 C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00502457 mwboost::archive::codecvt_null<wchar_t>::do_out+00027161
[ 10] 0x00007ffeff9bc61a C:Program FilesMATLABR2023bbinwin64edittimecheckengine.dll+00378394 MLTerminate_edittimecheckengine+00166394
[ 11] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 12] 0x00007fff8ca8b7bf C:Program FilesMATLABR2023bbinwin64performance.dll+00309183 Performance::CooperativeTaskManager::OrderedTaskSession::onProcess+00000159
[ 13] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 14] 0x00007fff8ca8b997 C:Program FilesMATLABR2023bbinwin64performance.dll+00309655 Performance::CooperativeTaskManager::RoundRobinTaskSession::onProcess+00000231
[ 15] 0x00007fff8ca8c261 C:Program FilesMATLABR2023bbinwin64performance.dll+00311905 Performance::CooperativeTaskManager::Task::process+00000385
[ 16] 0x00007fff8ca8cbf6 C:Program FilesMATLABR2023bbinwin64performance.dll+00314358 Performance::CooperativeTaskManager::shutDown+00000694
[ 17] 0x00007fff8ca58594 C:Program FilesMATLABR2023bbinwin64performance.dll+00099732 Performance::CooperativeTaskManager::Task::setName+00059796
[ 18] 0x00007fff8ca72150 C:Program FilesMATLABR2023bbinwin64performance.dll+00205136 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00016528
[ 19] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 20] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 21] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 22] 0x00007fffe8dacc61 C:Program FilesMATLABR2023bbinwin64iqm.dll+00445537 iqm::Iqm::create+00007745
[ 23] 0x00007ffffe753f5e C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081758 ioReadLine+00000430
[ 24] 0x00007ffffe753d75 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00081269 ioReadLine+00000165
[ 25] 0x00007ffffe785fb0 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00286640 mnGetCommandLineBuffer+00000288
[ 26] 0x00007ffffe7864b2 C:Program FilesMATLABR2023bbinwin64libmwbridge.dll+00287922 mnParser+00000578
[ 27] 0x00007fffe7d1b398 C:Program FilesMATLABR2023bbinwin64mcr.dll+00439192 mcr_initialize_main+00013816
[ 28] 0x00007fffe7cc8604 C:Program FilesMATLABR2023bbinwin64mcr.dll+00099844 mcrFunctionSignature::set_signature+00078996
[ 29] 0x00007fffe7ce61a0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00221600 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure’+00017728
[ 30] 0x00007fffe8e08c3a C:Program FilesMATLABR2023bbinwin64iqm.dll+00822330 iqm::PackagedTaskPlugin::execute+00000074
[ 31] 0x00007fffe7d158e0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00415968 installMOCmdWinSink+00074384
[ 32] 0x00007fffe8ddcbb7 C:Program FilesMATLABR2023bbinwin64iqm.dll+00641975 iqm::Iqm::setupIqmFcnPtrs+00100471
[ 33] 0x00007fffe8dade81 C:Program FilesMATLABR2023bbinwin64iqm.dll+00450177 iqm::Iqm::create+00012385
[ 34] 0x00007fffe8dad5c9 C:Program FilesMATLABR2023bbinwin64iqm.dll+00447945 iqm::Iqm::create+00010153
[ 35] 0x00007fffe7d01c1c C:Program FilesMATLABR2023bbinwin64mcr.dll+00334876 mcrInstantiationError::operator=+00009948
[ 36] 0x00007fffe7d02645 C:Program FilesMATLABR2023bbinwin64mcr.dll+00337477 mcrInstantiationError::operator=+00012549
[ 37] 0x00007fffe7cfffd0 C:Program FilesMATLABR2023bbinwin64mcr.dll+00327632 mcrInstantiationError::operator=+00002704
[ 38] 0x00007ff82b8a92ea C:Program FilesMATLABR2023bbinwin64mwboost_thread-vc142-mt-x64-1_78.dll+00037610 mwboost::detail::win32::handle_manager::swap+00001642
[ 39] 0x00007ff83fd79333 C:WINDOWSSystem32ucrtbase.dll+00168755 recalloc+00000163
[ 40] 0x00007ff840de257d C:WINDOWSSystem32KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 41] 0x00007ff8421caf28 C:WINDOWSSYSTEM32ntdll.dll+00372520 RtlUserThreadStart+00000040
Program State:
Most Recent Simulink Activity:
coderGenerateCodeOnlyAction : OK in editor 23 at Mon Sep 9 16:59:47 2024
embeddedCoderAppAction : OK in editor 23 at Mon Sep 9 16:59:45 2024
coderGenerateCodeOnlyAction : OK in editor 22 at Mon Sep 9 16:54:23 2024
embeddedCoderAppAction : OK in editor 22 at Mon Sep 9 16:54:20 2024
saveModelAction : OK in editor 13 at Mon Sep 9 15:32:54 2024
saveModelAction : OK in editor 6 at Mon Sep 9 15:32:50 2024
Delete : OK in editor 6 at Mon Sep 9 15:32:48 2024
coderGenerateCodeOnlyAction : OK in editor 13 at Mon Sep 9 15:32:11 2024
embeddedCoderAppAction : OK in editor 13 at Mon Sep 9 15:32:09 2024
stopSimulationAction : OK in editor 13 at Mon Sep 9 15:32:05 2024
Most Recent Tool Interaction:
Editor 16: tools idle, class GLUE2::PanZoomTool is most recently active tool since Mon Sep 9 16:53:43 2024
Editor 17: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:53:52 2024
Editor 18: tools idle, no most recently active tool Editor 19: tools idle, no most recently active tool Editor 20: tools idle, no most recently active tool Editor 21: tools idle, class GLUE2::BadgeTool is most recently active tool since Mon Sep 9 16:54:14 2024
Editor 22: tools idle, no most recently active tool crash, simulink MATLAB Answers — New Questions
Comparing PWM Modulation Techniques for Three-Phase Inverters
Hello MathWorks Community,
I’m interested in comparing various modulation techniques for three-phase inverters, such as SPWM, DPWM, and SVPWM. I want to evaluate their impact on different power electronics criteria, including noise, efficiency, and cost.
However, implementing each modulation technique individually is quite challenging. Does anyone have any ideas or suggestions on how to efficiently compare these modulation methods without having to implement each one from scratch?
I’m particularly looking for:
Efficient ways to compare multiple PWM techniques
Tools or libraries that might simplify this comparison process
Any existing studies or resources that have already done similar comparisons
Any insights or recommendations would be greatly appreciated. Thank you!Hello MathWorks Community,
I’m interested in comparing various modulation techniques for three-phase inverters, such as SPWM, DPWM, and SVPWM. I want to evaluate their impact on different power electronics criteria, including noise, efficiency, and cost.
However, implementing each modulation technique individually is quite challenging. Does anyone have any ideas or suggestions on how to efficiently compare these modulation methods without having to implement each one from scratch?
I’m particularly looking for:
Efficient ways to compare multiple PWM techniques
Tools or libraries that might simplify this comparison process
Any existing studies or resources that have already done similar comparisons
Any insights or recommendations would be greatly appreciated. Thank you! Hello MathWorks Community,
I’m interested in comparing various modulation techniques for three-phase inverters, such as SPWM, DPWM, and SVPWM. I want to evaluate their impact on different power electronics criteria, including noise, efficiency, and cost.
However, implementing each modulation technique individually is quite challenging. Does anyone have any ideas or suggestions on how to efficiently compare these modulation methods without having to implement each one from scratch?
I’m particularly looking for:
Efficient ways to compare multiple PWM techniques
Tools or libraries that might simplify this comparison process
Any existing studies or resources that have already done similar comparisons
Any insights or recommendations would be greatly appreciated. Thank you! power_electronics_control, inverter, pwm, three-phase, modulation-techniques, spwm, dpwm, svpwm, performance-comparison, simulation MATLAB Answers — New Questions
Hi i am a new learner please help me
The smallest number which can be stored by the int type is -2147483648. Check that this value is correct. Is there an equivalent bound for the type real? If so, what is this variable’s name?
What is the value of this variable?The smallest number which can be stored by the int type is -2147483648. Check that this value is correct. Is there an equivalent bound for the type real? If so, what is this variable’s name?
What is the value of this variable? The smallest number which can be stored by the int type is -2147483648. Check that this value is correct. Is there an equivalent bound for the type real? If so, what is this variable’s name?
What is the value of this variable? homework MATLAB Answers — New Questions
Unconstrained minimisation problem with a complicated range
I have 3N objects with properties p1,p2,p3. I need to organise these objects into groups of N objects such that the sum of property p1 is the same. I think I can do with the functional:
f(p1)=(sum(p1,1)-sum(p1,2)).^2+(sum(p1,1)-sum(p1,3)).^2+(sum(p1,3)-sum(p1,2)).^2
|Where sum(p1,i) denotes the sum over the subset of p1’s for N objects. The same for other properties, so the objective functionals will simply add(I think). Is there a way of doing this? I guess, if I can do it for one property, I can do it for three?I have 3N objects with properties p1,p2,p3. I need to organise these objects into groups of N objects such that the sum of property p1 is the same. I think I can do with the functional:
f(p1)=(sum(p1,1)-sum(p1,2)).^2+(sum(p1,1)-sum(p1,3)).^2+(sum(p1,3)-sum(p1,2)).^2
|Where sum(p1,i) denotes the sum over the subset of p1’s for N objects. The same for other properties, so the objective functionals will simply add(I think). Is there a way of doing this? I guess, if I can do it for one property, I can do it for three? I have 3N objects with properties p1,p2,p3. I need to organise these objects into groups of N objects such that the sum of property p1 is the same. I think I can do with the functional:
f(p1)=(sum(p1,1)-sum(p1,2)).^2+(sum(p1,1)-sum(p1,3)).^2+(sum(p1,3)-sum(p1,2)).^2
|Where sum(p1,i) denotes the sum over the subset of p1’s for N objects. The same for other properties, so the objective functionals will simply add(I think). Is there a way of doing this? I guess, if I can do it for one property, I can do it for three? fminunc MATLAB Answers — New Questions
Why is it when I am adding a number to array, the single number overrides array
Currently trying to add a single number to an array, but despite the array initially outputting well, the moment I try to add to it, the entire array is replaced by the number I am adding. This can be best seen by running "lownutant" which outputs a 1×50 array, but adding 1 changes all values to 1.
% Modified Ramberg-Osgood Tension
E=10.3*10^6; %psi
Fty=68000; %psi
Ftu=76000; %psi
fnl=linspace(0,Ftu,250);
e0=0.09;
epu=e0-(Ftu/E);
nt=log(epu/.002)/log(Ftu/Fty);
enl=(fnl./E)+(0.002.*((fnl./Fty).^nt));
% Tangent Modulus
dEtan=linspace(.025,.03,50) %Domain for plotting Etan
lownutant=((.002.*E.*nt./Fty)).*((dEtan./Fty).^(nt-1))
a=1
b= a+lownutantCurrently trying to add a single number to an array, but despite the array initially outputting well, the moment I try to add to it, the entire array is replaced by the number I am adding. This can be best seen by running "lownutant" which outputs a 1×50 array, but adding 1 changes all values to 1.
% Modified Ramberg-Osgood Tension
E=10.3*10^6; %psi
Fty=68000; %psi
Ftu=76000; %psi
fnl=linspace(0,Ftu,250);
e0=0.09;
epu=e0-(Ftu/E);
nt=log(epu/.002)/log(Ftu/Fty);
enl=(fnl./E)+(0.002.*((fnl./Fty).^nt));
% Tangent Modulus
dEtan=linspace(.025,.03,50) %Domain for plotting Etan
lownutant=((.002.*E.*nt./Fty)).*((dEtan./Fty).^(nt-1))
a=1
b= a+lownutant Currently trying to add a single number to an array, but despite the array initially outputting well, the moment I try to add to it, the entire array is replaced by the number I am adding. This can be best seen by running "lownutant" which outputs a 1×50 array, but adding 1 changes all values to 1.
% Modified Ramberg-Osgood Tension
E=10.3*10^6; %psi
Fty=68000; %psi
Ftu=76000; %psi
fnl=linspace(0,Ftu,250);
e0=0.09;
epu=e0-(Ftu/E);
nt=log(epu/.002)/log(Ftu/Fty);
enl=(fnl./E)+(0.002.*((fnl./Fty).^nt));
% Tangent Modulus
dEtan=linspace(.025,.03,50) %Domain for plotting Etan
lownutant=((.002.*E.*nt./Fty)).*((dEtan./Fty).^(nt-1))
a=1
b= a+lownutant limited precision, add big number to extremely small number MATLAB Answers — New Questions
Machine learning onramp, module 3.3, task 3
I am stucked at module 3.3, task 3. This line of code is not working. Kindly help out.
data = readall(preprocds)
plot(data.Time,data.Y)I am stucked at module 3.3, task 3. This line of code is not working. Kindly help out.
data = readall(preprocds)
plot(data.Time,data.Y) I am stucked at module 3.3, task 3. This line of code is not working. Kindly help out.
data = readall(preprocds)
plot(data.Time,data.Y) machine learning onramp, module 3.3, task 3, model, machine learning MATLAB Answers — New Questions