Month: September 2024
What is Sikkim Invite Code 2024? 667811500744
Sikkim Invite code is 667811500744, use this code at the time of sign up to get a free bonus of Rs.52 on. Sikkim colour prediction app lets you have fun guessing the next winning colour for a chance to earn rewards.The Sikkim is quite a fresh website, which is why, in the starting, you can get many bonuses on the Sikkim app. So, don’t hold up for long and register on the Sikkim app.
Sikkim Invite Code
Sikkim Invitation Code
667811500744
Signup Bonus
Rs. 1500
Sikkim Invite Code
667811500744
Sikkim Invitation Code 667811500744
667811500744 is a Sikkim app invite code. You will get a sign up bonus upto Rs.52 on using the code at the time of registration. You can also earn by sharing your invite code with your friends.
Sikkim offers you Daily Bonus, Weekly Bonus, Monthly Bonus, Rebate, Referral Bonus and many more advantages. Here you can easily do the Agent work also and make daily huge profits just by giving predictions to there team and make them play the games.
Sikkim Colour Prediction Game
On Sikkim Games you can play the Sikkim Colour Prediction Games in which you can either predict the Colours or the numbers as you can easily make your money 2X by predicting colours and 9X by predicting the numbers in less than 30 sec. Here, you can play Wingo, Trx Wingo, K3, 5D. On Sikkim App you can play many other games also like Aviator, Casino and many more games through which you can make daily huge money by investing your few seconds only.
About Sikkim
The Sikkim Colour Prediction app is an entertaining platform where users can predict the next winning colour or numbers. It is easy to play- simply choose a color you think will be selected, and if you are right you can easily double your money or even 10X in just 30sec. This app offers a simple way to pass the time while testing your luck. It is a popular way for those who enjoy casual games with a chance to win.
Sikkim Invite code is 667811500744, use this code at the time of sign up to get a free bonus of Rs.52 on. Sikkim colour prediction app lets you have fun guessing the next winning colour for a chance to earn rewards.The Sikkim is quite a fresh website, which is why, in the starting, you can get many bonuses on the Sikkim app. So, don’t hold up for long and register on the Sikkim app.Sikkim Invite Code Sikkim Invitation Code667811500744Signup BonusRs. 1500Sikkim Invite Code667811500744Sikkim Invitation Code 667811500744667811500744 is a Sikkim app invite code. You will get a sign up bonus upto Rs.52 on using the code at the time of registration. You can also earn by sharing your invite code with your friends.Sikkim offers you Daily Bonus, Weekly Bonus, Monthly Bonus, Rebate, Referral Bonus and many more advantages. Here you can easily do the Agent work also and make daily huge profits just by giving predictions to there team and make them play the games. Sikkim Colour Prediction Game On Sikkim Games you can play the Sikkim Colour Prediction Games in which you can either predict the Colours or the numbers as you can easily make your money 2X by predicting colours and 9X by predicting the numbers in less than 30 sec. Here, you can play Wingo, Trx Wingo, K3, 5D. On Sikkim App you can play many other games also like Aviator, Casino and many more games through which you can make daily huge money by investing your few seconds only. About SikkimThe Sikkim Colour Prediction app is an entertaining platform where users can predict the next winning colour or numbers. It is easy to play- simply choose a color you think will be selected, and if you are right you can easily double your money or even 10X in just 30sec. This app offers a simple way to pass the time while testing your luck. It is a popular way for those who enjoy casual games with a chance to win. Read More
YOU’RE INVITED: Microsoft Nonprofit Virtual Partner Summit | September 30th
Join us for the Microsoft Nonprofit Virtual Partner Summit on September 30th, 7:30am – 9:30am PST where you’ll have the opportunity to hear directly from Microsoft nonprofit industry leaders about the latest updates in the nonprofit sector.
Open to all partners, this is your opportunity to:
Hear about nonprofit sector updates directly from Microsoft nonprofit industry leaders.
Gain insights into advancements across Azure, Dynamics 365, and Microsoft 365, including Security, Copilot and AI.
Learn strategies for collaboration and growth.
Join us for the Microsoft Nonprofit Virtual Partner Summit on September 30th, 7:30am – 9:30am PST where you’ll have the opportunity to hear directly from Microsoft nonprofit industry leaders about the latest updates in the nonprofit sector.
Open to all partners, this is your opportunity to:
Hear about nonprofit sector updates directly from Microsoft nonprofit industry leaders.
Gain insights into advancements across Azure, Dynamics 365, and Microsoft 365, including Security, Copilot and AI.
Learn strategies for collaboration and growth.
REGISTER TODAY Read More
Simulink crashes when running MEX functions created with Visual Studio 2022 17.10.4
We have been running MATLAB R2023B Update 7 with Simulink models using S-Functions built with VS 2022 17.9.0. When we updated to VS 2022 17.10.4 we starting having MATLAB crashes as soon as Simulink starts executing models with these MEX functions. Is this a known issue, and do we know if moving to Update 8 or 9 will fix it?We have been running MATLAB R2023B Update 7 with Simulink models using S-Functions built with VS 2022 17.9.0. When we updated to VS 2022 17.10.4 we starting having MATLAB crashes as soon as Simulink starts executing models with these MEX functions. Is this a known issue, and do we know if moving to Update 8 or 9 will fix it? We have been running MATLAB R2023B Update 7 with Simulink models using S-Functions built with VS 2022 17.9.0. When we updated to VS 2022 17.10.4 we starting having MATLAB crashes as soon as Simulink starts executing models with these MEX functions. Is this a known issue, and do we know if moving to Update 8 or 9 will fix it? mex, simulink MATLAB Answers — New Questions
“timeout” setting not work in webread function
Hi:
I use parallel loop to grab data using "webread" , I set up the timeout option to be 10 seconds,
options = weboptions;
options.Timeout = 10;
then use command like below:
timeCost=[];
parfor i=1:1:1e4
tic
webReadTmp=webread(command,options);
timeCost(i)=toc;
end
I use "timeCost" variable to record the time needed for each webread operation. however I notice there are some webread cost more than 30 second, which means the "timeout" setting is not working here.
is there any mistake with my command?
Thanks!
YuHi:
I use parallel loop to grab data using "webread" , I set up the timeout option to be 10 seconds,
options = weboptions;
options.Timeout = 10;
then use command like below:
timeCost=[];
parfor i=1:1:1e4
tic
webReadTmp=webread(command,options);
timeCost(i)=toc;
end
I use "timeCost" variable to record the time needed for each webread operation. however I notice there are some webread cost more than 30 second, which means the "timeout" setting is not working here.
is there any mistake with my command?
Thanks!
Yu Hi:
I use parallel loop to grab data using "webread" , I set up the timeout option to be 10 seconds,
options = weboptions;
options.Timeout = 10;
then use command like below:
timeCost=[];
parfor i=1:1:1e4
tic
webReadTmp=webread(command,options);
timeCost(i)=toc;
end
I use "timeCost" variable to record the time needed for each webread operation. however I notice there are some webread cost more than 30 second, which means the "timeout" setting is not working here.
is there any mistake with my command?
Thanks!
Yu "timeout" setting not work in webread function MATLAB Answers — New Questions
Integral2 seems to substitute non-scalar values of variable into integrand. Why?
Dear community,
I am struggling with an error that my code produces. I am trying to do a maximum-likelihood estimation (MLE). I am importing CSV data; each row is an observation and an observation is four-dimensional with column names "bad_bought", "good_bought", "bad_notbought", "good_notbought".
Each observation is assumed to have latent variables and that are drawn from a joint-normal distribution with mean and variance and and correlation . An observation’s numeric values for the four columns are given by
"bad_bought":
"good_bought":
"bad_notbought":
"good_notbought":
where the error terms are iid, normal, and have variance .
I understand that I can calculate the joint distribution of the four answers (for given ) directly. However, I want to use numerical integration, as in the code below, because the model will eventually become more complicated necessitating it.
I receive two type of error messages:
First, and this is copy-pasted below, MATLAB tells me my mvnpdf arguments do not have the right dimensions. I do not understand that. [t1, t2], mu_vec are both of dimensions 1×2, i.e., they have the same number of columns. This error disappears if I replace the first argument of mvnpdf with [20, 20] (or some other numbers). I do not understand why; should integral2 not substitute scalar values for t1 and t2?
Second, and this appears if I replace [t1,t2] with [20,20] in the argument of mvnpdf, I receive the error message telling me I cannot use "*" to multiply the normpdf values together. This suggests to me that again t1 and t2 are not scalars.
Could you help? Thank you!
% Load necessary data
data = readtable(‘df_restricted.csv’);
% Select relevant columns and convert to matrix
data_matrix = table2array(data(:, {‘bad_bought’, ‘good_bought’, ‘bad_notbought’, ‘good_notbought’}));
% Define the negative log-likelihood function
function neg_log_lik = neg_log_lik_real(params, data_matrix)
% Extract parameters
mu1 = params(1);
mu2 = params(2);
v1 = params(3);
v2 = params(4);
rho = params(5);
v = params(6);
% Mean vector
mu_vec = [mu1, mu2];
disp(size(mu_vec))
% Covariance matrix
cov_matrix = [v1, rho * sqrt(v1 * v2); rho * sqrt(v1 * v2), v2];
disp(size(cov_matrix))
log_sum = 0;
% Loop through each data point
for i = 1:size(data_matrix, 1)
% Define the integrand for 2-dimensional integration
f = @(t1, t2) ( …
mvnpdf([t1, t2], mu_vec, cov_matrix) …
* normpdf(data_matrix(i, 1) – (t1 – t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 3) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 4) – (t1 – t2), 0, sqrt(v)) …
);
% Before integral2 call
% Perform 2-dimensional numerical integration using integral2
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
% Take log of the result and accumulate
log_value = log(pdf_value);
log_sum = log_sum + log_value;
end
% Return negative log-likelihood
neg_log_lik = -log_sum;
end
% Set initial parameters
initial_params = [56, 11, 119, 131, -0.36, 419];
% Define the function handle for optimization
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
% Use fminunc to minimize the negative log-likelihood
options = optimoptions(‘fminunc’, ‘Algorithm’, ‘quasi-newton’, ‘MaxIterations’, 500, ‘TolFun’, 1e-8);
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
% Display the results
disp(‘Estimated parameters:’);
disp(estimated_params);
disp(‘Final log-likelihood value:’);
disp(-fval);
First error:
Error using mvnpdf (line 67)
X and MU must have the same number of columns.
Error in
Structural_Estimation>@(t1,t2)(mvnpdf([t1,t2],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v)))
(line 34)
mvnpdf([t1, t2], mu_vec, cov_matrix) …
First error:
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in
integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions)
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in
integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x))
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
—-
Second error:
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To operate on each element of the matrix
individually, use TIMES (.*) for elementwise multiplication.
Error in Structural_Estimation>@(t1,t2)(mvnpdf([20,20],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v))) (line 36)
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
^
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x)) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
Related documentationDear community,
I am struggling with an error that my code produces. I am trying to do a maximum-likelihood estimation (MLE). I am importing CSV data; each row is an observation and an observation is four-dimensional with column names "bad_bought", "good_bought", "bad_notbought", "good_notbought".
Each observation is assumed to have latent variables and that are drawn from a joint-normal distribution with mean and variance and and correlation . An observation’s numeric values for the four columns are given by
"bad_bought":
"good_bought":
"bad_notbought":
"good_notbought":
where the error terms are iid, normal, and have variance .
I understand that I can calculate the joint distribution of the four answers (for given ) directly. However, I want to use numerical integration, as in the code below, because the model will eventually become more complicated necessitating it.
I receive two type of error messages:
First, and this is copy-pasted below, MATLAB tells me my mvnpdf arguments do not have the right dimensions. I do not understand that. [t1, t2], mu_vec are both of dimensions 1×2, i.e., they have the same number of columns. This error disappears if I replace the first argument of mvnpdf with [20, 20] (or some other numbers). I do not understand why; should integral2 not substitute scalar values for t1 and t2?
Second, and this appears if I replace [t1,t2] with [20,20] in the argument of mvnpdf, I receive the error message telling me I cannot use "*" to multiply the normpdf values together. This suggests to me that again t1 and t2 are not scalars.
Could you help? Thank you!
% Load necessary data
data = readtable(‘df_restricted.csv’);
% Select relevant columns and convert to matrix
data_matrix = table2array(data(:, {‘bad_bought’, ‘good_bought’, ‘bad_notbought’, ‘good_notbought’}));
% Define the negative log-likelihood function
function neg_log_lik = neg_log_lik_real(params, data_matrix)
% Extract parameters
mu1 = params(1);
mu2 = params(2);
v1 = params(3);
v2 = params(4);
rho = params(5);
v = params(6);
% Mean vector
mu_vec = [mu1, mu2];
disp(size(mu_vec))
% Covariance matrix
cov_matrix = [v1, rho * sqrt(v1 * v2); rho * sqrt(v1 * v2), v2];
disp(size(cov_matrix))
log_sum = 0;
% Loop through each data point
for i = 1:size(data_matrix, 1)
% Define the integrand for 2-dimensional integration
f = @(t1, t2) ( …
mvnpdf([t1, t2], mu_vec, cov_matrix) …
* normpdf(data_matrix(i, 1) – (t1 – t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 3) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 4) – (t1 – t2), 0, sqrt(v)) …
);
% Before integral2 call
% Perform 2-dimensional numerical integration using integral2
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
% Take log of the result and accumulate
log_value = log(pdf_value);
log_sum = log_sum + log_value;
end
% Return negative log-likelihood
neg_log_lik = -log_sum;
end
% Set initial parameters
initial_params = [56, 11, 119, 131, -0.36, 419];
% Define the function handle for optimization
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
% Use fminunc to minimize the negative log-likelihood
options = optimoptions(‘fminunc’, ‘Algorithm’, ‘quasi-newton’, ‘MaxIterations’, 500, ‘TolFun’, 1e-8);
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
% Display the results
disp(‘Estimated parameters:’);
disp(estimated_params);
disp(‘Final log-likelihood value:’);
disp(-fval);
First error:
Error using mvnpdf (line 67)
X and MU must have the same number of columns.
Error in
Structural_Estimation>@(t1,t2)(mvnpdf([t1,t2],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v)))
(line 34)
mvnpdf([t1, t2], mu_vec, cov_matrix) …
First error:
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in
integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions)
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in
integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x))
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
—-
Second error:
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To operate on each element of the matrix
individually, use TIMES (.*) for elementwise multiplication.
Error in Structural_Estimation>@(t1,t2)(mvnpdf([20,20],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v))) (line 36)
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
^
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x)) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
Related documentation Dear community,
I am struggling with an error that my code produces. I am trying to do a maximum-likelihood estimation (MLE). I am importing CSV data; each row is an observation and an observation is four-dimensional with column names "bad_bought", "good_bought", "bad_notbought", "good_notbought".
Each observation is assumed to have latent variables and that are drawn from a joint-normal distribution with mean and variance and and correlation . An observation’s numeric values for the four columns are given by
"bad_bought":
"good_bought":
"bad_notbought":
"good_notbought":
where the error terms are iid, normal, and have variance .
I understand that I can calculate the joint distribution of the four answers (for given ) directly. However, I want to use numerical integration, as in the code below, because the model will eventually become more complicated necessitating it.
I receive two type of error messages:
First, and this is copy-pasted below, MATLAB tells me my mvnpdf arguments do not have the right dimensions. I do not understand that. [t1, t2], mu_vec are both of dimensions 1×2, i.e., they have the same number of columns. This error disappears if I replace the first argument of mvnpdf with [20, 20] (or some other numbers). I do not understand why; should integral2 not substitute scalar values for t1 and t2?
Second, and this appears if I replace [t1,t2] with [20,20] in the argument of mvnpdf, I receive the error message telling me I cannot use "*" to multiply the normpdf values together. This suggests to me that again t1 and t2 are not scalars.
Could you help? Thank you!
% Load necessary data
data = readtable(‘df_restricted.csv’);
% Select relevant columns and convert to matrix
data_matrix = table2array(data(:, {‘bad_bought’, ‘good_bought’, ‘bad_notbought’, ‘good_notbought’}));
% Define the negative log-likelihood function
function neg_log_lik = neg_log_lik_real(params, data_matrix)
% Extract parameters
mu1 = params(1);
mu2 = params(2);
v1 = params(3);
v2 = params(4);
rho = params(5);
v = params(6);
% Mean vector
mu_vec = [mu1, mu2];
disp(size(mu_vec))
% Covariance matrix
cov_matrix = [v1, rho * sqrt(v1 * v2); rho * sqrt(v1 * v2), v2];
disp(size(cov_matrix))
log_sum = 0;
% Loop through each data point
for i = 1:size(data_matrix, 1)
% Define the integrand for 2-dimensional integration
f = @(t1, t2) ( …
mvnpdf([t1, t2], mu_vec, cov_matrix) …
* normpdf(data_matrix(i, 1) – (t1 – t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 3) – (t1 + t2), 0, sqrt(v)) …
* normpdf(data_matrix(i, 4) – (t1 – t2), 0, sqrt(v)) …
);
% Before integral2 call
% Perform 2-dimensional numerical integration using integral2
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
% Take log of the result and accumulate
log_value = log(pdf_value);
log_sum = log_sum + log_value;
end
% Return negative log-likelihood
neg_log_lik = -log_sum;
end
% Set initial parameters
initial_params = [56, 11, 119, 131, -0.36, 419];
% Define the function handle for optimization
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
% Use fminunc to minimize the negative log-likelihood
options = optimoptions(‘fminunc’, ‘Algorithm’, ‘quasi-newton’, ‘MaxIterations’, 500, ‘TolFun’, 1e-8);
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
% Display the results
disp(‘Estimated parameters:’);
disp(estimated_params);
disp(‘Final log-likelihood value:’);
disp(-fval);
First error:
Error using mvnpdf (line 67)
X and MU must have the same number of columns.
Error in
Structural_Estimation>@(t1,t2)(mvnpdf([t1,t2],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v)))
(line 34)
mvnpdf([t1, t2], mu_vec, cov_matrix) …
First error:
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in
integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions)
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in
integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x))
(line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
—-
Second error:
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To operate on each element of the matrix
individually, use TIMES (.*) for elementwise multiplication.
Error in Structural_Estimation>@(t1,t2)(mvnpdf([20,20],mu_vec,cov_matrix)*normpdf(data_matrix(i,1)-(t1-t2),0,sqrt(v))*normpdf(data_matrix(i,2)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,3)-(t1+t2),0,sqrt(v))*normpdf(data_matrix(i,4)-(t1-t2),0,sqrt(v))) (line 36)
* normpdf(data_matrix(i, 2) – (t1 + t2), 0, sqrt(v)) …
^
Error in integral2Calc>@(y)fun(xi*ones(size(y)),y) (line 18)
@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions), …
^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^
Error in integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x)) (line 17)
innerintegral = @(x)arrayfun(@(xi,y1i,y2i)integralCalc( …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
^^^^^^
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integralCalc (line 113)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval, …
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc>integral2i (line 20)
[q,errbnd] = integralCalc(innerintegral,xmin,xmax,opstruct.integralOptions);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2Calc (line 7)
[q,errbnd] = integral2i(fun,xmin,xmax,ymin,ymax,optionstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in integral2 (line 105)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>neg_log_lik_real (line 43)
pdf_value = integral2(f, -Inf, Inf, -Inf, Inf, ‘AbsTol’, 1e-6, ‘RelTol’, 1e-6);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation>@(params)neg_log_lik_real(params,data_matrix) (line 58)
neg_log_lik_handle = @(params) neg_log_lik_real(params, data_matrix);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Structural_Estimation (line 62)
[estimated_params, fval, exitflag, output] = fminunc(neg_log_lik_handle, initial_params, options);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
Related documentation optimization, integral2, integral, mle MATLAB Answers — New Questions
How can I save a figure (in jpeg and pdf) from this code?
Display a geographic globe in a figure created using the uifigure function.
uif = uifigure;
g = geoglobe(uif);Display a geographic globe in a figure created using the uifigure function.
uif = uifigure;
g = geoglobe(uif); Display a geographic globe in a figure created using the uifigure function.
uif = uifigure;
g = geoglobe(uif); figure, save, pdf, jpeg, saving, globe, earth, help MATLAB Answers — New Questions
Optimize your Azure costs with our expert guidance, pricing tools, and resources
Efficient management of cloud resources is pivotal for controlling costs and building resilient infrastructure. Taking a strategic approach not only maximizes return on investment but also positions your organization to innovate and manage risk. Recognizing the needs of our customers to bolster their cloud management practices, Microsoft recently launched Azure Essentials as an all-in-one showcase for prescriptive guidance, expert training, and AI-assisted solutions.
To help you optimize your cloud and AI spending, this blog aims to pinpoint the most critical Azure Pricing resources for your needs—including pricing models and calculators—and advocate our Azure Essentials best practices. We hope you’ll walk away with a solid plan for keeping your cloud environments scalable and secure without exceeding your budget.
Enhancing cloud and AI efficiency and cost awareness with Azure Essentials
As cloud environments grow more complex, effective management becomes crucial to prevent escalating costs. Azure Essentials addresses this challenge by offering Microsoft’s best practices and skilling opportunities for cloud and AI adoption. It aims to foster cost awareness, enabling organizations to make informed decisions tailored to their needs and integrate cost management into their ongoing operations.
The Azure Essentials approach enhances platform resilience, prevents cost overruns, and ensures a more efficient cloud journey, helping companies harness cloud and AI technologies with a strong foundation.
We’ve written before about the pricing options for our Azure services, which you can read here, but basically the journey comprises four important steps:
Find guidance and resources to navigate Azure pricing options: If you’re new to Azure, it’s important to understand the basics of cloud service pricing, which includes options like the free tier for exploration, and pay-as-you-go for flexible, usage-based payments.
Estimate Azure project costs: When planning a new project in Azure, it’s crucial to estimate costs accurately, and Azure provides tools like the Total Cost of Ownership (TCO) calculator, Azure Migrate, and the Azure Architecture Center to help assess, plan, and optimize your migration and architecture with detailed cost comparisons.
Calculate costs of Azure products and services: When budgeting for specific Azure services, consider the various pricing resources like the Azure pricing calculator, product pricing details, savings plans, reservations, and Azure Hybrid Benefit, which offer significant cost savings and flexibility depending on your needs and commitment level.
Manage and optimize your Azure investments: To optimize your Azure spend, review your usage and costs using tools like Microsoft Cost Management, Azure Advisor, and FinOps on Azure, which offer insights, recommendations, and best practices for maximizing your cloud investments.
Integrating OpenAI cost planning with Azure budgeting tools
Effective cloud expenditure planning is crucial for aligning cloud investments with budget constraints, ensuring that businesses can scale and innovate without overspending. Azure has recently unveiled innovative features for Azure OpenAI Service, designed to empower your team with greater control and flexibility over their AI investments.
The cornerstone of this update is the ability to self-manage your AI resources — which means faster deployment and scaling of AI applications. Azure also introduced the ability to purchase Provisioned Throughput Units (PTUs) on an hourly basis for those workloads with lower-volume workloads or through a 1-month and 1-year reservation commitment for production workloads with high-volume.
To help forecast PTUs needed to for your workloads you can leverage the capacity calculator in the Azure OpenAI Studio. It is important to follow the guidance on how best to estimate, deploy, and optimize your PTUs outlined here. This approach ensures optimal alignment between your business objectives and AI capabilities, maximizing the return on your cloud investment while maintaining the agility to adapt to market changes.
Strategizing your cloud resource management with Azure tools
Maximizing the value of your cloud and AI investments requires a focus on enhancing reliability, security, and ongoing performance. Our Azure Essentials best practices aim to ensure your resources are optimized not just for cost efficiency, but also for robust security and consistent, high-level performance. Let’s explore some of the Azure offerings and tools geared toward helping you achieve that goal:
Azure strategic pricing offers
Azure savings plan for compute offers a flexible way to save on select services by committing to a fixed hourly spend for one or three years, enabling you to reduce costs while scaling your cloud workloads.
Azure Reservations allow you to save compared to pay-as-you-go pricing when you commit to using an Azure service for one or three years.
With Azure Hybrid Benefit you can save up to 85% over standard pay-as-you-go rate for Windows Server and SQL Server licenses and up to 76% for Linux RHEL and SLES subscriptions, offering an efficient path for transitioning from on-premises to cloud environments.
Azure tools
Azure Advisor delivers personalized, actionable recommendations to improve performance, security, reliability, and cost-effectiveness. By analyzing your cloud environment, Azure Advisor provides guidance to enhance efficiency, helping optimize resources while maintaining high-level performance and reducing operational costs.
Microsoft Cost Management offers real-time insights into Azure expenditures, enabling businesses to monitor spending, manage budgets, and forecast costs. With features like cost analysis and actionable recommendations, it empowers organizations to make informed financial decisions, identify savings opportunities, and ensure that cloud investments align with their financial objectives.
Unlocking Azure’s full potential with comprehensive learning resources
To demonstrate the full range of Azure Essentials resources, we’ve introduced a complimentary online learning program to equip you with practical skills and insights crucial for enhancing the reliability, security, and performance of your cloud and AI environments. Our comprehensive Microsoft Learn curriculum for Azure Essentials delves into key frameworks such as , the Microsoft Cloud Adoption Framework, and the Azure Well-Architected Framework, alongside Azure products and tools.
These resources are designed to help you improve your cloud environment’s performance, security, and reliability while maximizing the value of your Azure investment. By offering hands-on experience and industry-leading practices, we provide an in-depth exploration of Azure Essentials, enabling you to confidently navigate the complexities of cloud and AI technology management.
Achieving more sustainable cloud growth with Azure Essentials
Preventing ballooning costs in cloud and AI expenditures is essential to maintaining financial control and ensuring sustainable growth. By consolidating our expert guidance, best practices, tools, and free training in one place, we hope Azure Essentials will set you on the path to successful cloud and AI adoption that meets your business needs.
Our Azure Essentials resources provide the knowledge and strategies needed to streamline your cloud operations, manage your investment, and avoid common pitfalls. Improve the reliability, security, and performance of your cloud and AI investments today by visiting the Azure Essentials homepage to get started.
Microsoft Tech Community – Latest Blogs –Read More
STOCK HISTORY FUNCTION OPEN PRICE FOR ONE DATE IN ONE CELL ONLY NO ARRAY
HOW DO I GET THE STOCK PRICE FOR MICROSOFT MSFT 5 YEARS AGO @ OPEN OR CLOSE IN ONE CELL ONLY WITHOUT THE OBNOXIOUS ARRAY.
HOW IS ONE OF THE LARGEST MARKET CAPS ON EARTH NOT SO USER FRIENDLY ?
HOW DO I GET THE STOCK PRICE FOR MICROSOFT MSFT 5 YEARS AGO @ OPEN OR CLOSE IN ONE CELL ONLY WITHOUT THE OBNOXIOUS ARRAY. HOW IS ONE OF THE LARGEST MARKET CAPS ON EARTH NOT SO USER FRIENDLY ? Read More
Filter design differences between DSP System and Signal Processing toolboxes (fdesign/design)
The following two lines have different behavior depending on installed toolboxes:
d = fdesign.highpass(‘N,F3db’,3,1,1000);
Hd = design(d);
Normally, I have BOTH DSP System and Signal Processing toolboxes installed. When I run these lines with both toolboxes installed I get the following error:
Error using fdesign.abstracttype/superdesign (line 90)
For symmetric FIR filters, only even orders are allowed.
Now, if I uninstall DSP System toolbox this pair of lines runs as I expect, and makes a 1Hz highpass filter through which I can run my data in lines following the fdesign/design pair of statements. I presume this means that fdesign/design are available in both toolboxes but for some reason only the one in the Signal Processing toolbox works as I expect, meanwhile if I have DSP System installed that version takes precedence and gives me errors.
Is this behavior correct or is it a bug to be reported to Mathworks? I inherited the code from which these lines are excerpted. I also inherited a Matlab license with several toolboxes I know little about (such as DSP System). Though I’ve been working with Matlab on and off for decades I’ve never encountered a case of a function with a "split personality" such as I’m describing with fdesign/design. So from my point of view (limited DSP knowledge) this looks like a bug, but it is possible in my lack of understanding these functions are working correctly with both toolboxes, and therefore I need to learn what I have done (or not done) to cause my errors.The following two lines have different behavior depending on installed toolboxes:
d = fdesign.highpass(‘N,F3db’,3,1,1000);
Hd = design(d);
Normally, I have BOTH DSP System and Signal Processing toolboxes installed. When I run these lines with both toolboxes installed I get the following error:
Error using fdesign.abstracttype/superdesign (line 90)
For symmetric FIR filters, only even orders are allowed.
Now, if I uninstall DSP System toolbox this pair of lines runs as I expect, and makes a 1Hz highpass filter through which I can run my data in lines following the fdesign/design pair of statements. I presume this means that fdesign/design are available in both toolboxes but for some reason only the one in the Signal Processing toolbox works as I expect, meanwhile if I have DSP System installed that version takes precedence and gives me errors.
Is this behavior correct or is it a bug to be reported to Mathworks? I inherited the code from which these lines are excerpted. I also inherited a Matlab license with several toolboxes I know little about (such as DSP System). Though I’ve been working with Matlab on and off for decades I’ve never encountered a case of a function with a "split personality" such as I’m describing with fdesign/design. So from my point of view (limited DSP knowledge) this looks like a bug, but it is possible in my lack of understanding these functions are working correctly with both toolboxes, and therefore I need to learn what I have done (or not done) to cause my errors. The following two lines have different behavior depending on installed toolboxes:
d = fdesign.highpass(‘N,F3db’,3,1,1000);
Hd = design(d);
Normally, I have BOTH DSP System and Signal Processing toolboxes installed. When I run these lines with both toolboxes installed I get the following error:
Error using fdesign.abstracttype/superdesign (line 90)
For symmetric FIR filters, only even orders are allowed.
Now, if I uninstall DSP System toolbox this pair of lines runs as I expect, and makes a 1Hz highpass filter through which I can run my data in lines following the fdesign/design pair of statements. I presume this means that fdesign/design are available in both toolboxes but for some reason only the one in the Signal Processing toolbox works as I expect, meanwhile if I have DSP System installed that version takes precedence and gives me errors.
Is this behavior correct or is it a bug to be reported to Mathworks? I inherited the code from which these lines are excerpted. I also inherited a Matlab license with several toolboxes I know little about (such as DSP System). Though I’ve been working with Matlab on and off for decades I’ve never encountered a case of a function with a "split personality" such as I’m describing with fdesign/design. So from my point of view (limited DSP knowledge) this looks like a bug, but it is possible in my lack of understanding these functions are working correctly with both toolboxes, and therefore I need to learn what I have done (or not done) to cause my errors. fdesign, dsp system toolbox MATLAB Answers — New Questions
stream3 returns error: Sample points must be unique
Hello, I searched the community forum and tried my best to resolve the issue myself, but I could not do it.
Here is my code:
clc; close; clear all;
format compact
%% Cylindrical Coordinates
% Generate cylindrical coordinates
phi = [0 pi/2 pi 3*pi/2];
rho = [0.25 2];
z = [1 2];
% Create a meshgrid for theta, r, and z
[Phi, Rho, Z] = meshgrid(phi, rho, z);
% Convert cylindrical coordinates to Cartesian coordinates
[X, Y, Z] = pol2cart(Phi, Rho, Z);
% Combine X, Y, Z into a single matrix
points = [X(:), Y(:), Z(:)];
% Find unique rows and their indices
[unique_points, ~, ~] = unique(points, ‘rows’);
% Check for duplicates (optional)
num_duplicates = size(points, 1) – size(unique_points, 1);
if num_duplicates > 0
fprintf(‘There are %d duplicate points.n’, num_duplicates);
else
fprintf(‘All points are unique.n’);
end
% Plot the points in 3D space (optional)
figure;
% plot3(X, Y, Z, ‘o’,’DisplayName’,’Sample Points’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
title(‘3D Cylindrical Coordinates’);
grid on; axis equal; hold on;
%% Circular magnetic field
% Current in negative z-direction (negative values mean the current
% direction is in positive z-direction)
I = 1;
% Absolute Value of the cylindrical H-field at corresponding positions of
% the radius in phi-direction (all other components are zero)
Hc_phi = 1/(2*pi*Rho);
% Calculate the x-, y- and z-components of the cylindrical field
Hc_x = Hc_phi .* sin(Phi);
Hc_y = -Hc_phi .* cos(Phi);
Hc_z = zeros(size(Z));
% Draw the vector-arrows of the cylindrical field
quiver3(X,Y,Z,Hc_x,Hc_y,Hc_z,’AutoScale’,’off’);
%% Longitudinal magnetic field
Hl = 0.4; % Absolute field strength (+ = neg. z-direction)
Hl_x = zeros(size(X));
Hl_y = zeros(size(Y));
Hl_z = -Hl .* ones(size(Z));
% Draw the vector-arrows of the longitudinal field
quiver3(X,Y,Z,Hl_x,Hl_y,Hl_z,’AutoScale’,’off’);
%% Helical magnetic field (sum of cylindrical and longitudinal field)
H_x = Hc_x + Hl_x;
H_y = Hc_y + Hl_y;
H_z = Hc_z + Hl_z;
% Draw the vector arrows of the helical field
quiver3(X,Y,Z,H_x,H_y,H_z,’AutoScale’,’off’,’LineWidth’,1.5)
% Draw the fieldlines of the helical field
[startX,startY,startZ] = meshgrid([-1 1],[-1 1],1);
% startpoints = [startX(:), startY(:), startZ(:)]; % unique, manually checked
% samplepoints = [X(:), Y(:), Z(:)]; % unique, manually checked
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
lineobj = streamline(verts);
view(3)
Sorry, it might be a bit overwhelming. Ultimately, I just want to get streamlines of H_x, H_y and H_z on the X, Y, Z grid. But I get the following output of the script:
All points are unique.
Error using matlab.internal.math.interp1
Sample points must be unique.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in stream3 (line 66)
syi=interp1(yy(:),1:szu(1),sy(k));
Error in test (line 62)
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
What is the Problem here? Is my check for unique points wrong?
Thank you very much in advance!Hello, I searched the community forum and tried my best to resolve the issue myself, but I could not do it.
Here is my code:
clc; close; clear all;
format compact
%% Cylindrical Coordinates
% Generate cylindrical coordinates
phi = [0 pi/2 pi 3*pi/2];
rho = [0.25 2];
z = [1 2];
% Create a meshgrid for theta, r, and z
[Phi, Rho, Z] = meshgrid(phi, rho, z);
% Convert cylindrical coordinates to Cartesian coordinates
[X, Y, Z] = pol2cart(Phi, Rho, Z);
% Combine X, Y, Z into a single matrix
points = [X(:), Y(:), Z(:)];
% Find unique rows and their indices
[unique_points, ~, ~] = unique(points, ‘rows’);
% Check for duplicates (optional)
num_duplicates = size(points, 1) – size(unique_points, 1);
if num_duplicates > 0
fprintf(‘There are %d duplicate points.n’, num_duplicates);
else
fprintf(‘All points are unique.n’);
end
% Plot the points in 3D space (optional)
figure;
% plot3(X, Y, Z, ‘o’,’DisplayName’,’Sample Points’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
title(‘3D Cylindrical Coordinates’);
grid on; axis equal; hold on;
%% Circular magnetic field
% Current in negative z-direction (negative values mean the current
% direction is in positive z-direction)
I = 1;
% Absolute Value of the cylindrical H-field at corresponding positions of
% the radius in phi-direction (all other components are zero)
Hc_phi = 1/(2*pi*Rho);
% Calculate the x-, y- and z-components of the cylindrical field
Hc_x = Hc_phi .* sin(Phi);
Hc_y = -Hc_phi .* cos(Phi);
Hc_z = zeros(size(Z));
% Draw the vector-arrows of the cylindrical field
quiver3(X,Y,Z,Hc_x,Hc_y,Hc_z,’AutoScale’,’off’);
%% Longitudinal magnetic field
Hl = 0.4; % Absolute field strength (+ = neg. z-direction)
Hl_x = zeros(size(X));
Hl_y = zeros(size(Y));
Hl_z = -Hl .* ones(size(Z));
% Draw the vector-arrows of the longitudinal field
quiver3(X,Y,Z,Hl_x,Hl_y,Hl_z,’AutoScale’,’off’);
%% Helical magnetic field (sum of cylindrical and longitudinal field)
H_x = Hc_x + Hl_x;
H_y = Hc_y + Hl_y;
H_z = Hc_z + Hl_z;
% Draw the vector arrows of the helical field
quiver3(X,Y,Z,H_x,H_y,H_z,’AutoScale’,’off’,’LineWidth’,1.5)
% Draw the fieldlines of the helical field
[startX,startY,startZ] = meshgrid([-1 1],[-1 1],1);
% startpoints = [startX(:), startY(:), startZ(:)]; % unique, manually checked
% samplepoints = [X(:), Y(:), Z(:)]; % unique, manually checked
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
lineobj = streamline(verts);
view(3)
Sorry, it might be a bit overwhelming. Ultimately, I just want to get streamlines of H_x, H_y and H_z on the X, Y, Z grid. But I get the following output of the script:
All points are unique.
Error using matlab.internal.math.interp1
Sample points must be unique.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in stream3 (line 66)
syi=interp1(yy(:),1:szu(1),sy(k));
Error in test (line 62)
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
What is the Problem here? Is my check for unique points wrong?
Thank you very much in advance! Hello, I searched the community forum and tried my best to resolve the issue myself, but I could not do it.
Here is my code:
clc; close; clear all;
format compact
%% Cylindrical Coordinates
% Generate cylindrical coordinates
phi = [0 pi/2 pi 3*pi/2];
rho = [0.25 2];
z = [1 2];
% Create a meshgrid for theta, r, and z
[Phi, Rho, Z] = meshgrid(phi, rho, z);
% Convert cylindrical coordinates to Cartesian coordinates
[X, Y, Z] = pol2cart(Phi, Rho, Z);
% Combine X, Y, Z into a single matrix
points = [X(:), Y(:), Z(:)];
% Find unique rows and their indices
[unique_points, ~, ~] = unique(points, ‘rows’);
% Check for duplicates (optional)
num_duplicates = size(points, 1) – size(unique_points, 1);
if num_duplicates > 0
fprintf(‘There are %d duplicate points.n’, num_duplicates);
else
fprintf(‘All points are unique.n’);
end
% Plot the points in 3D space (optional)
figure;
% plot3(X, Y, Z, ‘o’,’DisplayName’,’Sample Points’);
xlabel(‘X’);
ylabel(‘Y’);
zlabel(‘Z’);
title(‘3D Cylindrical Coordinates’);
grid on; axis equal; hold on;
%% Circular magnetic field
% Current in negative z-direction (negative values mean the current
% direction is in positive z-direction)
I = 1;
% Absolute Value of the cylindrical H-field at corresponding positions of
% the radius in phi-direction (all other components are zero)
Hc_phi = 1/(2*pi*Rho);
% Calculate the x-, y- and z-components of the cylindrical field
Hc_x = Hc_phi .* sin(Phi);
Hc_y = -Hc_phi .* cos(Phi);
Hc_z = zeros(size(Z));
% Draw the vector-arrows of the cylindrical field
quiver3(X,Y,Z,Hc_x,Hc_y,Hc_z,’AutoScale’,’off’);
%% Longitudinal magnetic field
Hl = 0.4; % Absolute field strength (+ = neg. z-direction)
Hl_x = zeros(size(X));
Hl_y = zeros(size(Y));
Hl_z = -Hl .* ones(size(Z));
% Draw the vector-arrows of the longitudinal field
quiver3(X,Y,Z,Hl_x,Hl_y,Hl_z,’AutoScale’,’off’);
%% Helical magnetic field (sum of cylindrical and longitudinal field)
H_x = Hc_x + Hl_x;
H_y = Hc_y + Hl_y;
H_z = Hc_z + Hl_z;
% Draw the vector arrows of the helical field
quiver3(X,Y,Z,H_x,H_y,H_z,’AutoScale’,’off’,’LineWidth’,1.5)
% Draw the fieldlines of the helical field
[startX,startY,startZ] = meshgrid([-1 1],[-1 1],1);
% startpoints = [startX(:), startY(:), startZ(:)]; % unique, manually checked
% samplepoints = [X(:), Y(:), Z(:)]; % unique, manually checked
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
lineobj = streamline(verts);
view(3)
Sorry, it might be a bit overwhelming. Ultimately, I just want to get streamlines of H_x, H_y and H_z on the X, Y, Z grid. But I get the following output of the script:
All points are unique.
Error using matlab.internal.math.interp1
Sample points must be unique.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in stream3 (line 66)
syi=interp1(yy(:),1:szu(1),sy(k));
Error in test (line 62)
verts = stream3(X,Y,Z,H_x,H_y,H_z,startX,startY,startZ);
What is the Problem here? Is my check for unique points wrong?
Thank you very much in advance! stream3 MATLAB Answers — New Questions
How to convert a series of x,y,z points to the appropriate format for isosurface?
Hello,
I have a series of points X,Y,Z and I need to plot the isosurface describing these points.
The number of uniques X values is not equal to the unique numbers of the Y values.
Not sure how to produce the X abd Y vexros an the coirresponding Z vector.
Thak youHello,
I have a series of points X,Y,Z and I need to plot the isosurface describing these points.
The number of uniques X values is not equal to the unique numbers of the Y values.
Not sure how to produce the X abd Y vexros an the coirresponding Z vector.
Thak you Hello,
I have a series of points X,Y,Z and I need to plot the isosurface describing these points.
The number of uniques X values is not equal to the unique numbers of the Y values.
Not sure how to produce the X abd Y vexros an the coirresponding Z vector.
Thak you isosurface, plot, colormap MATLAB Answers — New Questions
Personal HP Devices Bypassing Platform Enrollment Restriction
I’m witnessing personal Windows devices bypassing our enrollment restriction. They all appear to be HP devices, couple different models,
Windows 10.0.19044.2251
I’m witnessing personal Windows devices bypassing our enrollment restriction. They all appear to be HP devices, couple different models, Windows 10.0.19044.2251HP ENVY x360 Convertible 15m-dr0xxx Windows 10.0.19044.2006HP ENVY x360 Convertible 15m-ed0xxx Windows 10.0.18362.1256HP Stream Laptop 11-ak1xxx Windows 10.0.19045.2728HP Laptop 14-dk0xxx Windows 10.0.19044.1889HP ENVY Laptop 13-ah1xxx My policy is:MDMAllowMin VersionNo Min VersionMax VersionNo Max VersionPersonally owned devicesBlock Assigned to all users. Couple other notices: -Intune Device ID and Microsoft Entra Device ID are identical.-The enrollment tab is blank, 0 entries.-Management name is blank. Anyone have any insight? TIA Read More
I Can’t Get the LET Function to Work in Microsoft Office Professional Plus 2021!
For the life of me, I can’t get the LET function to work in Microsoft Office Professional Plus 2021.
Is this a case where it’s simply not available in this version of Office!? Because that would be tragic since I just purchased it this year! 😲
I have to use my company laptop which has Microsoft Office 365 Pro Plus installed in order to use the LET function, which is inconvenient, because I only need it with my personal project.
For the life of me, I can’t get the LET function to work in Microsoft Office Professional Plus 2021. Is this a case where it’s simply not available in this version of Office!? Because that would be tragic since I just purchased it this year! 😲 I have to use my company laptop which has Microsoft Office 365 Pro Plus installed in order to use the LET function, which is inconvenient, because I only need it with my personal project. Read More
New Blog | Omdia’s perspective on Microsoft’s SSE solution
By Ngoyal
n July, we announced the general availability of the Microsoft Entra Suite and Microsoft’s Security Service Edge (SSE) solution which includes Microsoft Entra Internet Access and Microsoft Entra Private Access.
Microsoft’s vision for SSE
Microsoft’s SSE solution aims to revolutionize the way organizations secure access to any cloud or on-premises applications. It unifies identity and network access through Conditional Access, the Zero Trust policy engine, helping to eliminate security loopholes and bolster your organization’s security stance against threats. Delivered from one of the largest global private networks, the solution ensures a fast and consistent hybrid work experience. With flexible deployment options across other SSE and networking solutions, you can choose to route specific traffic profiles through Microsoft’s SSE solution.
Omdia’s perspective
According to Omdia, a leading research and consulting firm, Microsoft’s entry into the SASE/SSE space is poised to disrupt the market. Omdia highlights that Microsoft’s focus is on an identity-centric SASE framework, which helps consolidate technologies from different vendors by extending identity controls to your network and enhancing team collaboration. A key strength for Microsoft, according to Omdia, is its ability to introduce Microsoft Entra Internet Access and Microsoft Entra Private Access seamlessly into existing identity management conversations—a strength that could lead to broader adoption of network access services as part of the same platform.
Read the full post here: Omdia’s perspective on Microsoft’s SSE solution
By Ngoyal
n July, we announced the general availability of the Microsoft Entra Suite and Microsoft’s Security Service Edge (SSE) solution which includes Microsoft Entra Internet Access and Microsoft Entra Private Access.
Microsoft’s vision for SSE
Microsoft’s SSE solution aims to revolutionize the way organizations secure access to any cloud or on-premises applications. It unifies identity and network access through Conditional Access, the Zero Trust policy engine, helping to eliminate security loopholes and bolster your organization’s security stance against threats. Delivered from one of the largest global private networks, the solution ensures a fast and consistent hybrid work experience. With flexible deployment options across other SSE and networking solutions, you can choose to route specific traffic profiles through Microsoft’s SSE solution.
Omdia’s perspective
According to Omdia, a leading research and consulting firm, Microsoft’s entry into the SASE/SSE space is poised to disrupt the market. Omdia highlights that Microsoft’s focus is on an identity-centric SASE framework, which helps consolidate technologies from different vendors by extending identity controls to your network and enhancing team collaboration. A key strength for Microsoft, according to Omdia, is its ability to introduce Microsoft Entra Internet Access and Microsoft Entra Private Access seamlessly into existing identity management conversations—a strength that could lead to broader adoption of network access services as part of the same platform.
Read the full post here: Omdia’s perspective on Microsoft’s SSE solution Read More
Consultation with an Microsoft Azure OpenAI Expert from Microsoft?
Hi all, I am wondering if there is an option to speak with a consultant from Microsoft for advice regarding the construction of an AI system which utilizes the Azure OpenAI service? Any pertinent information would be greatly appreciated.
Hi all, I am wondering if there is an option to speak with a consultant from Microsoft for advice regarding the construction of an AI system which utilizes the Azure OpenAI service? Any pertinent information would be greatly appreciated. Read More
How to give “Site Members” visibility on all projects in Project Online
I believe I have the project permissions understood well. The last hurdle I can’t seem to figure out is the SharePoint permissions. When assigning the roles in project I have made the below permission groups each with the Prefix of “PUBMID –“ and their role along with a description of what each role gives. These have worked as expected giving the appropriate permissions depending on which role they were assigned.
The issue I am having with the SharePoint permissions is that when the users are not set as a “Site owner” they lose visibility on all projects. I have tried setting the permission level to “Site member” and this results in a loss of visibility on the projects. I believe if we can figure out this last piece, we will have the permissions to Project Online figured out.
I believe I have the project permissions understood well. The last hurdle I can’t seem to figure out is the SharePoint permissions. When assigning the roles in project I have made the below permission groups each with the Prefix of “PUBMID –“ and their role along with a description of what each role gives. These have worked as expected giving the appropriate permissions depending on which role they were assigned. The issue I am having with the SharePoint permissions is that when the users are not set as a “Site owner” they lose visibility on all projects. I have tried setting the permission level to “Site member” and this results in a loss of visibility on the projects. I believe if we can figure out this last piece, we will have the permissions to Project Online figured out. Read More
MICROSOST EXCEL STOCK HISTORY FUNCTION OPEN PRICE FOR ONE DATE IN ONE CELL ONLY NO ARRAY
HOW DO I GET THE STOCK PRICE FOR MICROSOFT MSFT 5 YEARS AGO AT OPEN IN ONE CELL ONLY WITHOUT THE OBNOXIOUS ARRAY THATS A WASTE OF SPACE. ALL I CARE FOR IS OPEN OR CLOSE. ITS RIDICULOUS TO ME THAT ONE OF THE LARGEST STOCK MARKET CAPS ON EARTH ISNT USER FRIENDLY WHEN IT COMES TO SUCH A SIMPLE ASSIGNMENT. ITS STUPID. IM STUPID. WTF.
HOW DO I GET THE STOCK PRICE FOR MICROSOFT MSFT 5 YEARS AGO AT OPEN IN ONE CELL ONLY WITHOUT THE OBNOXIOUS ARRAY THATS A WASTE OF SPACE. ALL I CARE FOR IS OPEN OR CLOSE. ITS RIDICULOUS TO ME THAT ONE OF THE LARGEST STOCK MARKET CAPS ON EARTH ISNT USER FRIENDLY WHEN IT COMES TO SUCH A SIMPLE ASSIGNMENT. ITS STUPID. IM STUPID. WTF. Read More
Truncated VideoReader width value when reading .mov files
I am getting a consistently truncated video pixel width value when reading in my .mov files into my script using VideoReader(). This is a new issue that showed up when i started using a macbook with M3 chip (this was not an issue on my intel chip mac). The video file info description says that the dimensions are 720×480, however the return dimensions from VideoReader() say the dimensions are 640×480. Displaying a video frame confirms that part of my image is cut off on the right side.
Any help or explanation is appreciated, thanks!I am getting a consistently truncated video pixel width value when reading in my .mov files into my script using VideoReader(). This is a new issue that showed up when i started using a macbook with M3 chip (this was not an issue on my intel chip mac). The video file info description says that the dimensions are 720×480, however the return dimensions from VideoReader() say the dimensions are 640×480. Displaying a video frame confirms that part of my image is cut off on the right side.
Any help or explanation is appreciated, thanks! I am getting a consistently truncated video pixel width value when reading in my .mov files into my script using VideoReader(). This is a new issue that showed up when i started using a macbook with M3 chip (this was not an issue on my intel chip mac). The video file info description says that the dimensions are 720×480, however the return dimensions from VideoReader() say the dimensions are 640×480. Displaying a video frame confirms that part of my image is cut off on the right side.
Any help or explanation is appreciated, thanks! video processing MATLAB Answers — New Questions
Is there a meaningful guideline on when to use parentheses vs square brackets vs curly brackets in writing MatLab code?
Is there a meaningful guideline on when to use parentheses vs square brackets vs curly brackets in writing MatLab code? I looked in the FAQ and did not see answers. After completing a handful of MatLab courses I thought I had some understanding, but I also see code that convinces me that I do not know the answer. (Use square brackets for concatination of strings…..but not always? Defining a vector can use parentheses OR square brackets? but not always? Indexing can use parentheses OR square brackets? …but not always? To pass a value to a function use parentheses? Matrix concatenation use square brackets? To construct matrix use square brackets? Plot functions use parentheses?Is there a meaningful guideline on when to use parentheses vs square brackets vs curly brackets in writing MatLab code? I looked in the FAQ and did not see answers. After completing a handful of MatLab courses I thought I had some understanding, but I also see code that convinces me that I do not know the answer. (Use square brackets for concatination of strings…..but not always? Defining a vector can use parentheses OR square brackets? but not always? Indexing can use parentheses OR square brackets? …but not always? To pass a value to a function use parentheses? Matrix concatenation use square brackets? To construct matrix use square brackets? Plot functions use parentheses? Is there a meaningful guideline on when to use parentheses vs square brackets vs curly brackets in writing MatLab code? I looked in the FAQ and did not see answers. After completing a handful of MatLab courses I thought I had some understanding, but I also see code that convinces me that I do not know the answer. (Use square brackets for concatination of strings…..but not always? Defining a vector can use parentheses OR square brackets? but not always? Indexing can use parentheses OR square brackets? …but not always? To pass a value to a function use parentheses? Matrix concatenation use square brackets? To construct matrix use square brackets? Plot functions use parentheses? use parentheses, use square brackets, use curly brackets MATLAB Answers — New Questions
How can I install specific products within the MATLAB Runtime to save space?
The MATLAB Runtime installer provided on the MathWorks Website is monolithic, offering no options for selective installation and requiring several gigabytes of space. Is it possible to create a custom installer for the MATLAB Runtime that includes only the components necessary for my compiled MATLAB application(s), resulting in a smaller installation size?The MATLAB Runtime installer provided on the MathWorks Website is monolithic, offering no options for selective installation and requiring several gigabytes of space. Is it possible to create a custom installer for the MATLAB Runtime that includes only the components necessary for my compiled MATLAB application(s), resulting in a smaller installation size? The MATLAB Runtime installer provided on the MathWorks Website is monolithic, offering no options for selective installation and requiring several gigabytes of space. Is it possible to create a custom installer for the MATLAB Runtime that includes only the components necessary for my compiled MATLAB application(s), resulting in a smaller installation size? mcr, monolithic, slim, installer, selective, space, efficient, requiredmcrproducts.txt, customize, custom MATLAB Answers — New Questions