Month: February 2025
nonlinear spline fit with unknown upper bound of interpolation domain
I want to fit the interpolation values of a spline, but I can not provide a good guess for the upper bound of the interpolation domain. That is, x(end) is so to speek an unknown too.
The value of the objective function is a pde residual and to compute it, the spline needs to be evaluated at certain points which can change during iterations. In the toy code below, I mock this by shrinking the interpolation domain over the iterations. For example, when fmincon does the last iteration, the spline was only evaluated at points xq in [0, 6] and the initial guess for the interpolation domain (x = linspace(3, 10, 5)) is not good anymore because the interpolation values defined at x > 6 have not been activated in the forward solve. As a consequence, no meaningful parameters are assigned at points x > 6.
So far, I did a multi-stage optimization: Optimizing with fixed points x, checking the final evaluation points, refining the points, optimizing again, etc. But this is very costly.
My ideas are the following:
Changing the interpolation points in some iterations (if required): At iteration k, the sampled points xq are in [0, 5]. So the initial points (x = linspace(3, 10, 5)) are changed to x = linspace(3, 5, 5)) in the next iteration. With this strategy I am keeping the number of parameters constant (there is probably no chance to dynamically change the number of parameters for any solver?) I am not sure if this violates differentiability assumptions of the solvers.
Since I really know x(end) roughly only, I may treat it as an unknown too. So the new parameter vector represents [y; x(end)]. However, in this strategy I want to guide the optimizer (via a penalty or so) in a way that it moves the current x(end) to the current active region. What I can do for instance is to compute the min/max of the evaluation points in every iteration. But I am not sure how to translate this into a penalty term since the min/max evaluation points are not constants.
Can you think of smarter ways to handle this? Maybe spline fit with unknown domain is a known problem.
% Define initial parameters
x = linspace(3, 10, 5); % Interpolation points
y0 = rand(size(x)); % Initial interpolation values
% Define optimization problem
options = optimoptions(‘fmincon’, ‘OutputFcn’, @output_function); % Track iteration count
% Call fmincon optimizer
global iter_count;
iter_count = 0; % Iteration counter
[y_opt, fval] = fmincon(@objective_func, y0, [], [], [], [], [], [], [], options);
% Display results
fprintf(‘Optimized objective function value: %.4fn’, fval);
fprintf(‘Optimized spline values: [%s]n’, num2str(y_opt, ‘%.2f ‘));
function obj_val = objective_func(y)
global iter_count;
% Re-compute interpolation points
x = linspace(3, 10, numel(y));
% Create spline f
f = spapi(4, x, y);
% Mock shrinking of evaluation domain
shrink_factor = 1 – exp(-0.1 * iter_count); % Exponential decay
shrinked_domain = 5 + (10 – 5) * (1 – shrink_factor); % Starts at 10, slowly shrinks to 5
xq = linspace(3, shrinked_domain, 10); % PDE evaluation points
% Evaluate the spline at xq
spline_values = fnval(f, xq);
% Compute mock PDE residual (sum of squared differences)
obj_val = sum((spline_values – mean(spline_values)).^2);
% Debug print
% fprintf(‘Iter %d – Eval points: [%s]n’, iter_count, num2str(xq, ‘%.2f ‘));
end
function stop = output_function(~, ~, state)
global iter_count;
if strcmp(state, ‘iter’)
iter_count = iter_count + 1; % Update iteration count
end
stop = false; % Continue optimization
endI want to fit the interpolation values of a spline, but I can not provide a good guess for the upper bound of the interpolation domain. That is, x(end) is so to speek an unknown too.
The value of the objective function is a pde residual and to compute it, the spline needs to be evaluated at certain points which can change during iterations. In the toy code below, I mock this by shrinking the interpolation domain over the iterations. For example, when fmincon does the last iteration, the spline was only evaluated at points xq in [0, 6] and the initial guess for the interpolation domain (x = linspace(3, 10, 5)) is not good anymore because the interpolation values defined at x > 6 have not been activated in the forward solve. As a consequence, no meaningful parameters are assigned at points x > 6.
So far, I did a multi-stage optimization: Optimizing with fixed points x, checking the final evaluation points, refining the points, optimizing again, etc. But this is very costly.
My ideas are the following:
Changing the interpolation points in some iterations (if required): At iteration k, the sampled points xq are in [0, 5]. So the initial points (x = linspace(3, 10, 5)) are changed to x = linspace(3, 5, 5)) in the next iteration. With this strategy I am keeping the number of parameters constant (there is probably no chance to dynamically change the number of parameters for any solver?) I am not sure if this violates differentiability assumptions of the solvers.
Since I really know x(end) roughly only, I may treat it as an unknown too. So the new parameter vector represents [y; x(end)]. However, in this strategy I want to guide the optimizer (via a penalty or so) in a way that it moves the current x(end) to the current active region. What I can do for instance is to compute the min/max of the evaluation points in every iteration. But I am not sure how to translate this into a penalty term since the min/max evaluation points are not constants.
Can you think of smarter ways to handle this? Maybe spline fit with unknown domain is a known problem.
% Define initial parameters
x = linspace(3, 10, 5); % Interpolation points
y0 = rand(size(x)); % Initial interpolation values
% Define optimization problem
options = optimoptions(‘fmincon’, ‘OutputFcn’, @output_function); % Track iteration count
% Call fmincon optimizer
global iter_count;
iter_count = 0; % Iteration counter
[y_opt, fval] = fmincon(@objective_func, y0, [], [], [], [], [], [], [], options);
% Display results
fprintf(‘Optimized objective function value: %.4fn’, fval);
fprintf(‘Optimized spline values: [%s]n’, num2str(y_opt, ‘%.2f ‘));
function obj_val = objective_func(y)
global iter_count;
% Re-compute interpolation points
x = linspace(3, 10, numel(y));
% Create spline f
f = spapi(4, x, y);
% Mock shrinking of evaluation domain
shrink_factor = 1 – exp(-0.1 * iter_count); % Exponential decay
shrinked_domain = 5 + (10 – 5) * (1 – shrink_factor); % Starts at 10, slowly shrinks to 5
xq = linspace(3, shrinked_domain, 10); % PDE evaluation points
% Evaluate the spline at xq
spline_values = fnval(f, xq);
% Compute mock PDE residual (sum of squared differences)
obj_val = sum((spline_values – mean(spline_values)).^2);
% Debug print
% fprintf(‘Iter %d – Eval points: [%s]n’, iter_count, num2str(xq, ‘%.2f ‘));
end
function stop = output_function(~, ~, state)
global iter_count;
if strcmp(state, ‘iter’)
iter_count = iter_count + 1; % Update iteration count
end
stop = false; % Continue optimization
end I want to fit the interpolation values of a spline, but I can not provide a good guess for the upper bound of the interpolation domain. That is, x(end) is so to speek an unknown too.
The value of the objective function is a pde residual and to compute it, the spline needs to be evaluated at certain points which can change during iterations. In the toy code below, I mock this by shrinking the interpolation domain over the iterations. For example, when fmincon does the last iteration, the spline was only evaluated at points xq in [0, 6] and the initial guess for the interpolation domain (x = linspace(3, 10, 5)) is not good anymore because the interpolation values defined at x > 6 have not been activated in the forward solve. As a consequence, no meaningful parameters are assigned at points x > 6.
So far, I did a multi-stage optimization: Optimizing with fixed points x, checking the final evaluation points, refining the points, optimizing again, etc. But this is very costly.
My ideas are the following:
Changing the interpolation points in some iterations (if required): At iteration k, the sampled points xq are in [0, 5]. So the initial points (x = linspace(3, 10, 5)) are changed to x = linspace(3, 5, 5)) in the next iteration. With this strategy I am keeping the number of parameters constant (there is probably no chance to dynamically change the number of parameters for any solver?) I am not sure if this violates differentiability assumptions of the solvers.
Since I really know x(end) roughly only, I may treat it as an unknown too. So the new parameter vector represents [y; x(end)]. However, in this strategy I want to guide the optimizer (via a penalty or so) in a way that it moves the current x(end) to the current active region. What I can do for instance is to compute the min/max of the evaluation points in every iteration. But I am not sure how to translate this into a penalty term since the min/max evaluation points are not constants.
Can you think of smarter ways to handle this? Maybe spline fit with unknown domain is a known problem.
% Define initial parameters
x = linspace(3, 10, 5); % Interpolation points
y0 = rand(size(x)); % Initial interpolation values
% Define optimization problem
options = optimoptions(‘fmincon’, ‘OutputFcn’, @output_function); % Track iteration count
% Call fmincon optimizer
global iter_count;
iter_count = 0; % Iteration counter
[y_opt, fval] = fmincon(@objective_func, y0, [], [], [], [], [], [], [], options);
% Display results
fprintf(‘Optimized objective function value: %.4fn’, fval);
fprintf(‘Optimized spline values: [%s]n’, num2str(y_opt, ‘%.2f ‘));
function obj_val = objective_func(y)
global iter_count;
% Re-compute interpolation points
x = linspace(3, 10, numel(y));
% Create spline f
f = spapi(4, x, y);
% Mock shrinking of evaluation domain
shrink_factor = 1 – exp(-0.1 * iter_count); % Exponential decay
shrinked_domain = 5 + (10 – 5) * (1 – shrink_factor); % Starts at 10, slowly shrinks to 5
xq = linspace(3, shrinked_domain, 10); % PDE evaluation points
% Evaluate the spline at xq
spline_values = fnval(f, xq);
% Compute mock PDE residual (sum of squared differences)
obj_val = sum((spline_values – mean(spline_values)).^2);
% Debug print
% fprintf(‘Iter %d – Eval points: [%s]n’, iter_count, num2str(xq, ‘%.2f ‘));
end
function stop = output_function(~, ~, state)
global iter_count;
if strcmp(state, ‘iter’)
iter_count = iter_count + 1; % Update iteration count
end
stop = false; % Continue optimization
end optimization, fmincon, spline, lsqnonlin MATLAB Answers — New Questions
WHY ITS TAKING TIME TO LAUNCH MATLAB EXE FILE IN VISUAL STUDIO C++?
I HAVE CREATED MATLAB EXE FILE TO CONTROL ON VVISUAL STUDIO BUT THE CODE WHICH IS TAKING 8 SEC IS TAKING 20 SEC WHEN WE CALL THROUGH EXE FILE . BUT WHEN WE KEEP THE TIMER IN MATLAB EXE CODE ITS SHOWING 9-10 SEC THAT MEANS ITS TAKING NEARLY 10 SEC TO LAUNCH . IAM GIVING INPUT FROM VISUAL STUDIO TO MATLLAB EXE FILE AND EXTRACTING OUTPUT FROM MATLAB EXE FILE TO VISUAL STUDIO. IS THERE ANY WAY TO SOLVE THIS ISSUSE ? IS THERE ANY WAY TO REDUCE THE LAUNCH TIME BY MATLAB EXE FILEI HAVE CREATED MATLAB EXE FILE TO CONTROL ON VVISUAL STUDIO BUT THE CODE WHICH IS TAKING 8 SEC IS TAKING 20 SEC WHEN WE CALL THROUGH EXE FILE . BUT WHEN WE KEEP THE TIMER IN MATLAB EXE CODE ITS SHOWING 9-10 SEC THAT MEANS ITS TAKING NEARLY 10 SEC TO LAUNCH . IAM GIVING INPUT FROM VISUAL STUDIO TO MATLLAB EXE FILE AND EXTRACTING OUTPUT FROM MATLAB EXE FILE TO VISUAL STUDIO. IS THERE ANY WAY TO SOLVE THIS ISSUSE ? IS THERE ANY WAY TO REDUCE THE LAUNCH TIME BY MATLAB EXE FILE I HAVE CREATED MATLAB EXE FILE TO CONTROL ON VVISUAL STUDIO BUT THE CODE WHICH IS TAKING 8 SEC IS TAKING 20 SEC WHEN WE CALL THROUGH EXE FILE . BUT WHEN WE KEEP THE TIMER IN MATLAB EXE CODE ITS SHOWING 9-10 SEC THAT MEANS ITS TAKING NEARLY 10 SEC TO LAUNCH . IAM GIVING INPUT FROM VISUAL STUDIO TO MATLLAB EXE FILE AND EXTRACTING OUTPUT FROM MATLAB EXE FILE TO VISUAL STUDIO. IS THERE ANY WAY TO SOLVE THIS ISSUSE ? IS THERE ANY WAY TO REDUCE THE LAUNCH TIME BY MATLAB EXE FILE application compiler, matlab compiler, c++ MATLAB Answers — New Questions
Plot multiple values in a single bar in bar plot
Lets say I have an array y1 = [1,3,5,7,9] and y2 = [2,4,6,8,10]. I want to make a barplot between these two where its a single bar for each. So bar for y1 goes to max value 9 but in the same bar i can see values 1,3,5 and 7 and similarily y2 bar goes to max value 10 but can see values 2,4,6 and 8. And they are both shown in the same position for x axis that is x = 1. How can I do this. It has to be a bar plot and not normal plot. Thank you.Lets say I have an array y1 = [1,3,5,7,9] and y2 = [2,4,6,8,10]. I want to make a barplot between these two where its a single bar for each. So bar for y1 goes to max value 9 but in the same bar i can see values 1,3,5 and 7 and similarily y2 bar goes to max value 10 but can see values 2,4,6 and 8. And they are both shown in the same position for x axis that is x = 1. How can I do this. It has to be a bar plot and not normal plot. Thank you. Lets say I have an array y1 = [1,3,5,7,9] and y2 = [2,4,6,8,10]. I want to make a barplot between these two where its a single bar for each. So bar for y1 goes to max value 9 but in the same bar i can see values 1,3,5 and 7 and similarily y2 bar goes to max value 10 but can see values 2,4,6 and 8. And they are both shown in the same position for x axis that is x = 1. How can I do this. It has to be a bar plot and not normal plot. Thank you. matlab MATLAB Answers — New Questions
Avoid negative sign with compose() when output is zero, e.g. ‘-0’ or ‘-0.0’
When compose outputs zero, it includes a negative sign if the number was negative, giving, e.g. -0 or -0.0. How can I avoid this? (Other than writing another function that does a string compare for every element output by compose and removes the negative sign if there are only zeros.)
num = -0.04;
compose(‘%.1f’, num)When compose outputs zero, it includes a negative sign if the number was negative, giving, e.g. -0 or -0.0. How can I avoid this? (Other than writing another function that does a string compare for every element output by compose and removes the negative sign if there are only zeros.)
num = -0.04;
compose(‘%.1f’, num) When compose outputs zero, it includes a negative sign if the number was negative, giving, e.g. -0 or -0.0. How can I avoid this? (Other than writing another function that does a string compare for every element output by compose and removes the negative sign if there are only zeros.)
num = -0.04;
compose(‘%.1f’, num) compose, round, rounding, negative, zero MATLAB Answers — New Questions
Is an SGP4 propagator provided with “Orbit Propagator” block in Simulink (Aerospace Blockset)
Hi All;
This question may be quite obvious (or perhaps trivial) but I am unable to find a standard SGP4 propagator offered by Orbit Propagator block in Aerospace Blockset. It seems there are commands that can be used in MATLAB, however I am trying to use the Simulink / Orbit Propagator. One would expect to see this option in the drop down menu "Main –> Propagation Methood" and then in the drop down (among "Numerical", "Kepler") select "SGP4" (which is not there) followed by a TLE entry box.
Can you let me know, if "SGP4" propagation is possible with this block?
Thanks
GökhanHi All;
This question may be quite obvious (or perhaps trivial) but I am unable to find a standard SGP4 propagator offered by Orbit Propagator block in Aerospace Blockset. It seems there are commands that can be used in MATLAB, however I am trying to use the Simulink / Orbit Propagator. One would expect to see this option in the drop down menu "Main –> Propagation Methood" and then in the drop down (among "Numerical", "Kepler") select "SGP4" (which is not there) followed by a TLE entry box.
Can you let me know, if "SGP4" propagation is possible with this block?
Thanks
Gökhan Hi All;
This question may be quite obvious (or perhaps trivial) but I am unable to find a standard SGP4 propagator offered by Orbit Propagator block in Aerospace Blockset. It seems there are commands that can be used in MATLAB, however I am trying to use the Simulink / Orbit Propagator. One would expect to see this option in the drop down menu "Main –> Propagation Methood" and then in the drop down (among "Numerical", "Kepler") select "SGP4" (which is not there) followed by a TLE entry box.
Can you let me know, if "SGP4" propagation is possible with this block?
Thanks
Gökhan sgp4, propagator, simulink MATLAB Answers — New Questions
Homework help.
You are given a data set (data2.mat) that must be fit to an equation for your lab assignment. You know that the data has the form y = a *e^bx^c . Find the coefficients a, b and c using a MATLAB function that you have written. Display a plot with a logarithmic y scale that shows the data as points and the line as a fit.
Can anyone help me figure this out. I tried using an exponential function program that used linear regression program in it but that didn’t work because it didn’t deal with the double power factor. So I really don’t know how to go about solving this. I’m in a matlab class for the first time and it’s week 3 and he’s dropping these sort of things on after not really teaching us how to do this. He clearly knows his stuff but he’s very bad at reiterating it to his students so we end up lost all the time. Any help would be great!
here’s the data
5.1000000e+001 -9.8614120e+000
4.0800000e+002 -9.3766162e+000
1.3770000e+003 -9.4949558e+000
3.2640000e+003 -9.2442098e+000
6.3750000e+003 -9.0007595e+000
1.1016000e+004 -8.8766913e+000
1.7493000e+004 -9.0074649e+000
2.6112000e+004 -8.9332435e+000
3.7179000e+004 -8.8126032e+000
5.1000000e+004 -8.8844865e+000
6.7881000e+004 -8.7144287e+000
8.8128000e+004 -8.3825442e+000
1.1204700e+005 -8.4576726e+000
1.3994400e+005 -8.5157210e+000
1.7212500e+005 -8.4781113e+000
2.0889600e+005 -8.2878923e+000
2.5056300e+005 -8.3766055e+000
2.9743200e+005 -8.2561491e+000
3.4980900e+005 -8.2137268e+000
4.0800000e+005 -8.0925150e+000
4.7231100e+005 -7.9257422e+000
5.4304800e+005 -7.9381544e+000
6.2051700e+005 -7.9537322e+000
7.0502400e+005 -7.8015010e+000
7.9687500e+005 -7.8356798e+000
8.9637600e+005 -7.6697667e+000
1.0038330e+006 -7.5605739e+000
1.1195520e+006 -7.8521843e+000
1.2438390e+006 -7.6577670e+000
1.3770000e+006 -7.6843260e+000
1.5193410e+006 -7.4819766e+000
1.6711680e+006 -7.4679223e+000
1.8327870e+006 -7.3088850e+000
2.0045040e+006 -7.3311661e+000
2.1866250e+006 -7.2934343e+000
2.3794560e+006 -7.1592624e+000
2.5833030e+006 -7.2461091e+000
2.7984720e+006 -7.0129888e+000
3.0252690e+006 -7.0599327e+000
3.2640000e+006 -6.9684428e+000
3.5149710e+006 -6.7472645e+000
3.7784880e+006 -6.8237334e+000
4.0548570e+006 -6.9460063e+000
4.3443840e+006 -6.8844682e+000
4.6473750e+006 -6.8276870e+000
4.9641360e+006 -6.7922145e+000
5.2949730e+006 -6.8443137e+000
5.6401920e+006 -6.7642609e+000
6.0000990e+006 -6.7283737e+000
6.3750000e+006 -6.5985129e+000
6.7652010e+006 -6.8035724e+000
7.1710080e+006 -6.6019244e+000
7.5927270e+006 -6.5038275e+000
8.0306640e+006 -6.5811262e+000
8.4851250e+006 -6.3259601e+000
8.9564160e+006 -6.6594903e+000
9.4448430e+006 -6.2945521e+000
9.9507120e+006 -6.3241126e+000
1.0474329e+007 -6.2211186e+000
1.1016000e+007 -6.2944763e+000
1.1576031e+007 -6.1571240e+000
1.2154728e+007 -6.0425808e+000
1.2752397e+007 -6.2450068e+000
1.3369344e+007 -6.0584327e+000
1.4005875e+007 -6.0119037e+000
1.4662296e+007 -5.9192135e+000
1.5338913e+007 -6.0227574e+000
1.6036032e+007 -5.9185951e+000
1.6753959e+007 -6.0416041e+000
1.7493000e+007 -5.8492313e+000
1.8253461e+007 -6.0539742e+000
1.9035648e+007 -5.8733411e+000
1.9839867e+007 -5.8752898e+000
2.0666424e+007 -5.7343361e+000
2.1515625e+007 -5.8322730e+000
2.2387776e+007 -5.7831574e+000
2.3283183e+007 -5.5679345e+000
2.4202152e+007 -5.6356530e+000
2.5144989e+007 -5.7559464e+000
2.6112000e+007 -5.7025321e+000
2.7103491e+007 -5.6388418e+000
2.8119768e+007 -5.6041841e+000
2.9161137e+007 -5.4867117e+000
3.0227904e+007 -5.4993242e+000
3.1320375e+007 -5.6516519e+000
3.2438856e+007 -5.4882504e+000
3.3583653e+007 -5.5297368e+000
3.4755072e+007 -5.3379112e+000
3.5953419e+007 -5.2417512e+000
3.7179000e+007 -5.1143483e+000
3.8432121e+007 -5.2538556e+000
3.9713088e+007 -5.2262771e+000
4.1022207e+007 -5.1662034e+000
4.2359784e+007 -5.2907350e+000
4.3726125e+007 -5.1033225e+000
4.5121536e+007 -5.0992933e+000
4.6546323e+007 -5.2062895e+000
4.8000792e+007 -5.1410342e+000
4.9485249e+007 -5.0594874e+000
5.1000000e+007 -5.1098396e+000You are given a data set (data2.mat) that must be fit to an equation for your lab assignment. You know that the data has the form y = a *e^bx^c . Find the coefficients a, b and c using a MATLAB function that you have written. Display a plot with a logarithmic y scale that shows the data as points and the line as a fit.
Can anyone help me figure this out. I tried using an exponential function program that used linear regression program in it but that didn’t work because it didn’t deal with the double power factor. So I really don’t know how to go about solving this. I’m in a matlab class for the first time and it’s week 3 and he’s dropping these sort of things on after not really teaching us how to do this. He clearly knows his stuff but he’s very bad at reiterating it to his students so we end up lost all the time. Any help would be great!
here’s the data
5.1000000e+001 -9.8614120e+000
4.0800000e+002 -9.3766162e+000
1.3770000e+003 -9.4949558e+000
3.2640000e+003 -9.2442098e+000
6.3750000e+003 -9.0007595e+000
1.1016000e+004 -8.8766913e+000
1.7493000e+004 -9.0074649e+000
2.6112000e+004 -8.9332435e+000
3.7179000e+004 -8.8126032e+000
5.1000000e+004 -8.8844865e+000
6.7881000e+004 -8.7144287e+000
8.8128000e+004 -8.3825442e+000
1.1204700e+005 -8.4576726e+000
1.3994400e+005 -8.5157210e+000
1.7212500e+005 -8.4781113e+000
2.0889600e+005 -8.2878923e+000
2.5056300e+005 -8.3766055e+000
2.9743200e+005 -8.2561491e+000
3.4980900e+005 -8.2137268e+000
4.0800000e+005 -8.0925150e+000
4.7231100e+005 -7.9257422e+000
5.4304800e+005 -7.9381544e+000
6.2051700e+005 -7.9537322e+000
7.0502400e+005 -7.8015010e+000
7.9687500e+005 -7.8356798e+000
8.9637600e+005 -7.6697667e+000
1.0038330e+006 -7.5605739e+000
1.1195520e+006 -7.8521843e+000
1.2438390e+006 -7.6577670e+000
1.3770000e+006 -7.6843260e+000
1.5193410e+006 -7.4819766e+000
1.6711680e+006 -7.4679223e+000
1.8327870e+006 -7.3088850e+000
2.0045040e+006 -7.3311661e+000
2.1866250e+006 -7.2934343e+000
2.3794560e+006 -7.1592624e+000
2.5833030e+006 -7.2461091e+000
2.7984720e+006 -7.0129888e+000
3.0252690e+006 -7.0599327e+000
3.2640000e+006 -6.9684428e+000
3.5149710e+006 -6.7472645e+000
3.7784880e+006 -6.8237334e+000
4.0548570e+006 -6.9460063e+000
4.3443840e+006 -6.8844682e+000
4.6473750e+006 -6.8276870e+000
4.9641360e+006 -6.7922145e+000
5.2949730e+006 -6.8443137e+000
5.6401920e+006 -6.7642609e+000
6.0000990e+006 -6.7283737e+000
6.3750000e+006 -6.5985129e+000
6.7652010e+006 -6.8035724e+000
7.1710080e+006 -6.6019244e+000
7.5927270e+006 -6.5038275e+000
8.0306640e+006 -6.5811262e+000
8.4851250e+006 -6.3259601e+000
8.9564160e+006 -6.6594903e+000
9.4448430e+006 -6.2945521e+000
9.9507120e+006 -6.3241126e+000
1.0474329e+007 -6.2211186e+000
1.1016000e+007 -6.2944763e+000
1.1576031e+007 -6.1571240e+000
1.2154728e+007 -6.0425808e+000
1.2752397e+007 -6.2450068e+000
1.3369344e+007 -6.0584327e+000
1.4005875e+007 -6.0119037e+000
1.4662296e+007 -5.9192135e+000
1.5338913e+007 -6.0227574e+000
1.6036032e+007 -5.9185951e+000
1.6753959e+007 -6.0416041e+000
1.7493000e+007 -5.8492313e+000
1.8253461e+007 -6.0539742e+000
1.9035648e+007 -5.8733411e+000
1.9839867e+007 -5.8752898e+000
2.0666424e+007 -5.7343361e+000
2.1515625e+007 -5.8322730e+000
2.2387776e+007 -5.7831574e+000
2.3283183e+007 -5.5679345e+000
2.4202152e+007 -5.6356530e+000
2.5144989e+007 -5.7559464e+000
2.6112000e+007 -5.7025321e+000
2.7103491e+007 -5.6388418e+000
2.8119768e+007 -5.6041841e+000
2.9161137e+007 -5.4867117e+000
3.0227904e+007 -5.4993242e+000
3.1320375e+007 -5.6516519e+000
3.2438856e+007 -5.4882504e+000
3.3583653e+007 -5.5297368e+000
3.4755072e+007 -5.3379112e+000
3.5953419e+007 -5.2417512e+000
3.7179000e+007 -5.1143483e+000
3.8432121e+007 -5.2538556e+000
3.9713088e+007 -5.2262771e+000
4.1022207e+007 -5.1662034e+000
4.2359784e+007 -5.2907350e+000
4.3726125e+007 -5.1033225e+000
4.5121536e+007 -5.0992933e+000
4.6546323e+007 -5.2062895e+000
4.8000792e+007 -5.1410342e+000
4.9485249e+007 -5.0594874e+000
5.1000000e+007 -5.1098396e+000 You are given a data set (data2.mat) that must be fit to an equation for your lab assignment. You know that the data has the form y = a *e^bx^c . Find the coefficients a, b and c using a MATLAB function that you have written. Display a plot with a logarithmic y scale that shows the data as points and the line as a fit.
Can anyone help me figure this out. I tried using an exponential function program that used linear regression program in it but that didn’t work because it didn’t deal with the double power factor. So I really don’t know how to go about solving this. I’m in a matlab class for the first time and it’s week 3 and he’s dropping these sort of things on after not really teaching us how to do this. He clearly knows his stuff but he’s very bad at reiterating it to his students so we end up lost all the time. Any help would be great!
here’s the data
5.1000000e+001 -9.8614120e+000
4.0800000e+002 -9.3766162e+000
1.3770000e+003 -9.4949558e+000
3.2640000e+003 -9.2442098e+000
6.3750000e+003 -9.0007595e+000
1.1016000e+004 -8.8766913e+000
1.7493000e+004 -9.0074649e+000
2.6112000e+004 -8.9332435e+000
3.7179000e+004 -8.8126032e+000
5.1000000e+004 -8.8844865e+000
6.7881000e+004 -8.7144287e+000
8.8128000e+004 -8.3825442e+000
1.1204700e+005 -8.4576726e+000
1.3994400e+005 -8.5157210e+000
1.7212500e+005 -8.4781113e+000
2.0889600e+005 -8.2878923e+000
2.5056300e+005 -8.3766055e+000
2.9743200e+005 -8.2561491e+000
3.4980900e+005 -8.2137268e+000
4.0800000e+005 -8.0925150e+000
4.7231100e+005 -7.9257422e+000
5.4304800e+005 -7.9381544e+000
6.2051700e+005 -7.9537322e+000
7.0502400e+005 -7.8015010e+000
7.9687500e+005 -7.8356798e+000
8.9637600e+005 -7.6697667e+000
1.0038330e+006 -7.5605739e+000
1.1195520e+006 -7.8521843e+000
1.2438390e+006 -7.6577670e+000
1.3770000e+006 -7.6843260e+000
1.5193410e+006 -7.4819766e+000
1.6711680e+006 -7.4679223e+000
1.8327870e+006 -7.3088850e+000
2.0045040e+006 -7.3311661e+000
2.1866250e+006 -7.2934343e+000
2.3794560e+006 -7.1592624e+000
2.5833030e+006 -7.2461091e+000
2.7984720e+006 -7.0129888e+000
3.0252690e+006 -7.0599327e+000
3.2640000e+006 -6.9684428e+000
3.5149710e+006 -6.7472645e+000
3.7784880e+006 -6.8237334e+000
4.0548570e+006 -6.9460063e+000
4.3443840e+006 -6.8844682e+000
4.6473750e+006 -6.8276870e+000
4.9641360e+006 -6.7922145e+000
5.2949730e+006 -6.8443137e+000
5.6401920e+006 -6.7642609e+000
6.0000990e+006 -6.7283737e+000
6.3750000e+006 -6.5985129e+000
6.7652010e+006 -6.8035724e+000
7.1710080e+006 -6.6019244e+000
7.5927270e+006 -6.5038275e+000
8.0306640e+006 -6.5811262e+000
8.4851250e+006 -6.3259601e+000
8.9564160e+006 -6.6594903e+000
9.4448430e+006 -6.2945521e+000
9.9507120e+006 -6.3241126e+000
1.0474329e+007 -6.2211186e+000
1.1016000e+007 -6.2944763e+000
1.1576031e+007 -6.1571240e+000
1.2154728e+007 -6.0425808e+000
1.2752397e+007 -6.2450068e+000
1.3369344e+007 -6.0584327e+000
1.4005875e+007 -6.0119037e+000
1.4662296e+007 -5.9192135e+000
1.5338913e+007 -6.0227574e+000
1.6036032e+007 -5.9185951e+000
1.6753959e+007 -6.0416041e+000
1.7493000e+007 -5.8492313e+000
1.8253461e+007 -6.0539742e+000
1.9035648e+007 -5.8733411e+000
1.9839867e+007 -5.8752898e+000
2.0666424e+007 -5.7343361e+000
2.1515625e+007 -5.8322730e+000
2.2387776e+007 -5.7831574e+000
2.3283183e+007 -5.5679345e+000
2.4202152e+007 -5.6356530e+000
2.5144989e+007 -5.7559464e+000
2.6112000e+007 -5.7025321e+000
2.7103491e+007 -5.6388418e+000
2.8119768e+007 -5.6041841e+000
2.9161137e+007 -5.4867117e+000
3.0227904e+007 -5.4993242e+000
3.1320375e+007 -5.6516519e+000
3.2438856e+007 -5.4882504e+000
3.3583653e+007 -5.5297368e+000
3.4755072e+007 -5.3379112e+000
3.5953419e+007 -5.2417512e+000
3.7179000e+007 -5.1143483e+000
3.8432121e+007 -5.2538556e+000
3.9713088e+007 -5.2262771e+000
4.1022207e+007 -5.1662034e+000
4.2359784e+007 -5.2907350e+000
4.3726125e+007 -5.1033225e+000
4.5121536e+007 -5.0992933e+000
4.6546323e+007 -5.2062895e+000
4.8000792e+007 -5.1410342e+000
4.9485249e+007 -5.0594874e+000
5.1000000e+007 -5.1098396e+000 linear regression, exponential, homework MATLAB Answers — New Questions
Another Nail in the Exchange Web Services Coffin
Microsoft Clamps Down on EWSEnabled Tenant Setting to Enable Exchange Web Services
Exchange Web Services (EWS) is scheduled for retirement on October 1, 2026. Although October 2026 is still 19 months away, retiring an API that was heavily used at one time requires time and patience to expunge every trace of the API. Microsoft has already removed EWS from clients like Outlook for Mac and is working through the steps to remove EWS from its other applications.
Independent software developers have received clear directions that they should replace EWS with the Microsoft Graph. The acknowledged gaps in functionality that currently exist in the Microsoft Graph are being closed, with the latest example being the introduction of the Exchange mailbox import-export API (see MVP Glen Scales’ commentary on the new API).
Now Microsoft is preparing for the final removal by clamping down on the organization setting which controls whether EWS is enabled or disabled within a tenant. In a February 20, 2025 post, Microsoft says that the organization-level EWSEnabled flag will play a more significant role than it has done in the past. The change is being made to make it easier for Microsoft to disable EWS across Microsoft 365.
Enabling EWS for a Mailbox
In the past, it was sufficient for administrators to set the EWSEnabled flag for a mailbox to $true to allow the mailbox to use EWS in apps and clients. This condition existed because the mailbox setting has precedence over the setting in the Exchange Online organization configuration and, by default, the organization setting is null.
Get-OrganizationConfig | Select-Object EWSEnabled EwsConfig ---------
The only time administrators set the organization-level EWSEnabled setting is if they wanted to block EWS throughout the tenant. Usually, this need didn’t arise because it was sufficient to set EWSEnabled to $true on the mailboxes that needed access to EWS. For instance, because EWSEnabled is $true for the James Ryan mailbox, that mailbox can use EWS even though the organization setting is null.
Get-CasMailbox -Identity James.Ryan | Select-Object EWSEnabled EwsEnabled ---------- True
The Big Change
What’s changing is that Exchange Online will only permit a mailbox to use EWS if both the organization and mailbox settings are $true. The old situation where the default null value at the organization level is sufficient to allow access is no longer in force. Tenants that want to use EWS to the bitter end must now explicitly enable EWS in the Exchange Online organization configuration:
Set-OrganizationConfig -EWSEnabled $true
You can see where Microsoft is going. By forcing the relatively small number of tenants to explicitly allow EWS by updating the organization configuration, Microsoft is preparing for the big turn-off when they will update the organization configuration to set EWSEnabled to $False and block any further changes to the setting. It’s an elegant and effective way of making sure that the turnoff happens on October 1, 2026.
Problems might arise for tenants that have the organization configuration set to $false already and still have a small number of mailboxes enabled for EWS. The precedence enjoyed by the mailbox setting allows these mailboxes to access EWS, but once Microsoft removes the precedence, those mailboxes will lose the ability to use EWS.
The solution is to update the organizational setting back to $true. It might seem counterintuitive to allow EWS for the tenant, but the existing access setting for mailboxes will then kick in and only those mailboxes enabled for EWS can continue making EWS API requests.
Check Mailboxes Enabled for EWS
Given that we’re on the final glidepath to the retirement of EWS, it’s a good idea to validate that the set of mailboxes enabled for EWS declines over time. That way you’ll know if the dependency on EWS within the organization is reducing and understand why some mailboxes continue to need EWS. To help, I put together an Azure automation runbook that looks for EWS-enabled mailboxes and emails the details using Exchange High Volume Email (HVE). The email (Figure 1) serves as a nagging reminder for tenant administrators to minimize the set of mailboxes enabled for EWS. Using Azure Automation means that it’s easy to schedule the job to run weekly (or whatever period makes sense) as the clock ticks down to October 1, 2026.

You can download the code from the Office 365 for IT Pros GitHub repository. See this article for more details about running Exchange Online PowerShell in Azure Automation, and this article about using HVE in Azure Automation.
I chose HVE rather than using the Send-MgUserMail cmdlet from the Microsoft Graph PowerShell SDK because there’s an odd bug that stops the latest version of Exchange Online PowerShell module working in version 7.2 runbooks. My Graph setup is based on PowerShell 7, so mixing and matching Exchange Online and the Graph SDK doesn’t work as smoothly as it should for now. Microsoft is aware of the issue. I believe it will be fixed in the next release.
You don’t need to use Azure Automation as a standard script will do the job too. It just seems to make sense to me to have Azure Automation run the job without human intervention. After all, I might forget to check…
A new level unlocked
Today Microsoft released Muse, a first-of-its-kind generative AI model that we are applying to gaming. But it’s so much more than that. What we’re sharing today is a huge step forward for gameplay ideation. And what’s even more exciting is what this breakthrough represents in our journey of building and using generative AI, and what industries, developers and creators of all interests will be enabled to do next.
The impressive abilities we first witnessed with ChatGPT and GPT-4 to learn human language are now being matched by AI’s abilities to learn the mechanics of how things work, in effect developing a practical understanding of interactions in the world. As a computer scientist, this ability to understand and model a 3D world is something I and many other great researchers have pursued for over 10 years and, personally, I was not sure that it could be made possible with such speed and quality.
In the case of Muse, just from observing human gameplay, this model develops a deep understanding of the environment, including its dynamics and how it evolves over time in response to actions. This unlocks the ability to rapidly iterate, remix and create in video games so developers can eventually create immersive environments and unleash their full creativity.
Beyond gaming, I’m excited by the potential of this capability to enable AI assistants that understand and help visualize things, from reconfiguring the kitchen in your home to redesigning a retail space to building a digital twin of a factory floor to test and explore different scenarios. All these things are just now becoming possible with AI. From the perspective of computer science research, it’s pretty amazing, and the future applications of this are likely to be transformative for creators.
—
At Microsoft, we have a long history of collaboration between research and engineering. Today, as we release Muse, we are also announcing Azure AI Foundry Labs, where the AI community can explore the latest from Microsoft Research. Azure AI Foundry Labs will help accelerate the transition from research to solutions, bringing new ideas to the broader community to help shape the future of AI. Learn more.
The post A new level unlocked appeared first on The Official Microsoft Blog.
Today Microsoft released Muse, a first-of-its-kind generative AI model that we are applying to gaming. But it’s so much more than that. What we’re sharing today is a huge step forward for gameplay ideation. And what’s even more exciting is what this breakthrough represents in our journey of building and using generative AI, and what industries,…
The post A new level unlocked appeared first on The Official Microsoft Blog.Read More
Microsoft unveils Majorana 1
Satya Nadella, Chairman and CEO, shared the below communication on social media this morning.
The post Microsoft unveils Majorana 1 appeared first on The Official Microsoft Blog.
Satya Nadella, Chairman and CEO, shared the below communication on social media this morning. Click here to load media
The post Microsoft unveils Majorana 1 appeared first on The Official Microsoft Blog.Read More
3-phase inverter thermal modeling
All,
I’m looking for some regarding inverter thermal modeling with matlab/simulink/simcape – I just found pmsm with thermal model but not inverter thermally modelled, or ThreePhaseDiodeRectifierModel – is there any resources on two level 3-phase inverter modelling?All,
I’m looking for some regarding inverter thermal modeling with matlab/simulink/simcape – I just found pmsm with thermal model but not inverter thermally modelled, or ThreePhaseDiodeRectifierModel – is there any resources on two level 3-phase inverter modelling? All,
I’m looking for some regarding inverter thermal modeling with matlab/simulink/simcape – I just found pmsm with thermal model but not inverter thermally modelled, or ThreePhaseDiodeRectifierModel – is there any resources on two level 3-phase inverter modelling? inverter thermal modeling MATLAB Answers — New Questions
I am looking the instructions page for Online installation.
Hi
Where can I find instructions for online installation, hoping the installation nightmare ends ?
Please consider that I have already purchased the tool.
Thanks in advance.
ManolisHi
Where can I find instructions for online installation, hoping the installation nightmare ends ?
Please consider that I have already purchased the tool.
Thanks in advance.
Manolis Hi
Where can I find instructions for online installation, hoping the installation nightmare ends ?
Please consider that I have already purchased the tool.
Thanks in advance.
Manolis online installation. MATLAB Answers — New Questions
PLEASE HELP!! Matlab AppDesigner Putting a certain number of panels
Hello,
I have a problem with matlab app designer. I want to do something; when I select the amount in the list box and then click the button, that amount of panels are shown. How can I do that? I wrote function to get able to visibility of panel after push the button. But I cannot define the number of panels.
Thanks for help!
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
app.Panel.Visible = "off";
end
% Callback function
function ButtonGroupSelectionChange(app, event)
end
% Button pushed function: Button
function ButtonPushed(app, event)
app.Panel.Visible="on";
end
endHello,
I have a problem with matlab app designer. I want to do something; when I select the amount in the list box and then click the button, that amount of panels are shown. How can I do that? I wrote function to get able to visibility of panel after push the button. But I cannot define the number of panels.
Thanks for help!
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
app.Panel.Visible = "off";
end
% Callback function
function ButtonGroupSelectionChange(app, event)
end
% Button pushed function: Button
function ButtonPushed(app, event)
app.Panel.Visible="on";
end
end Hello,
I have a problem with matlab app designer. I want to do something; when I select the amount in the list box and then click the button, that amount of panels are shown. How can I do that? I wrote function to get able to visibility of panel after push the button. But I cannot define the number of panels.
Thanks for help!
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
app.Panel.Visible = "off";
end
% Callback function
function ButtonGroupSelectionChange(app, event)
end
% Button pushed function: Button
function ButtonPushed(app, event)
app.Panel.Visible="on";
end
end matlab app designer, app, button, push, panel, list, design, visibility MATLAB Answers — New Questions
Unsolved external symbol in C++ interface build
I have a C++ function which I can load on MATLAB with
loadlibrary(‘nc_driver_x64’)
and this works without problem using calllib.
On the other hand, if I try to create interface of the same function like this
clibgen.generateLibraryDefinition(fullfile(workPath,’nc_driver_x64.h’),…
"IncludePath", workPath,…
"Libraries", {fullfile(workPath,’nc_driver_x64.lib’), fullfile(workPath,’nc_driver_x64.dll’)},…
"Verbose",true)
It generates definenc_driver_x64.m and definenc_driver_x64.mlx, but then
build(definenc_driver_x64)
returns nc_driver_x64Interface.obj : error LNK2019: on all functions in this file.
.h, .lib and .dll files are all in the same folder and running on R2021b
I really appreciate if you could point out what I should check to make this work!I have a C++ function which I can load on MATLAB with
loadlibrary(‘nc_driver_x64’)
and this works without problem using calllib.
On the other hand, if I try to create interface of the same function like this
clibgen.generateLibraryDefinition(fullfile(workPath,’nc_driver_x64.h’),…
"IncludePath", workPath,…
"Libraries", {fullfile(workPath,’nc_driver_x64.lib’), fullfile(workPath,’nc_driver_x64.dll’)},…
"Verbose",true)
It generates definenc_driver_x64.m and definenc_driver_x64.mlx, but then
build(definenc_driver_x64)
returns nc_driver_x64Interface.obj : error LNK2019: on all functions in this file.
.h, .lib and .dll files are all in the same folder and running on R2021b
I really appreciate if you could point out what I should check to make this work! I have a C++ function which I can load on MATLAB with
loadlibrary(‘nc_driver_x64’)
and this works without problem using calllib.
On the other hand, if I try to create interface of the same function like this
clibgen.generateLibraryDefinition(fullfile(workPath,’nc_driver_x64.h’),…
"IncludePath", workPath,…
"Libraries", {fullfile(workPath,’nc_driver_x64.lib’), fullfile(workPath,’nc_driver_x64.dll’)},…
"Verbose",true)
It generates definenc_driver_x64.m and definenc_driver_x64.mlx, but then
build(definenc_driver_x64)
returns nc_driver_x64Interface.obj : error LNK2019: on all functions in this file.
.h, .lib and .dll files are all in the same folder and running on R2021b
I really appreciate if you could point out what I should check to make this work! clibgen MATLAB Answers — New Questions
Too many input arguments
clear all; close all;
syms k
z0=2; r=0.01; K=100;
t=0:20:500;
u=0.75; B=1;
H=@(r) B+r*(1+z0./K)*(u-1);
F=@(t) r*(1-z0./K)*u*t.^u;
z=(B*z0/H(r))* symsum((F(t)./H(r)).^k/gamma(k*u+1),k,0,20);
zfcn = matlabFunction(z);
figure
semilogy(zfcn(t))
grid onclear all; close all;
syms k
z0=2; r=0.01; K=100;
t=0:20:500;
u=0.75; B=1;
H=@(r) B+r*(1+z0./K)*(u-1);
F=@(t) r*(1-z0./K)*u*t.^u;
z=(B*z0/H(r))* symsum((F(t)./H(r)).^k/gamma(k*u+1),k,0,20);
zfcn = matlabFunction(z);
figure
semilogy(zfcn(t))
grid on clear all; close all;
syms k
z0=2; r=0.01; K=100;
t=0:20:500;
u=0.75; B=1;
H=@(r) B+r*(1+z0./K)*(u-1);
F=@(t) r*(1-z0./K)*u*t.^u;
z=(B*z0/H(r))* symsum((F(t)./H(r)).^k/gamma(k*u+1),k,0,20);
zfcn = matlabFunction(z);
figure
semilogy(zfcn(t))
grid on input MATLAB Answers — New Questions
Why Microsoft 365 Copilot Works for Some and Not for Others
I Can’t Wait for Agentic Experiences to Make Copilot Useful
We’re all on a journey to understand how to use artificial intelligence effectively to improve systems, lives, and human existence. If you pay for the necessary licenses, Copilot is everywhere within the Microsoft 365 ecosystem, both as helpers deployed in desktop apps like Word, Teams, and PowerPoint, and the possibility of custom agents for tenants to develop and deploy, albeit without the necessary tools to manage potentially thousands of agents created by citizen developers.
According to Microsoft CEO Satya Nadella, Microsoft wants to make it as simple for people to create agents than it is to create an Excel worksheet, which might mean the creation of the “highly customized agentic experiences” referred to in Microsoft 365 center notification MC985480 (January 22). I don’t quite know that phrase means, and the clarifying text that said it “means you can design unique prompts, connect to any LLM, and integrate these custom agents with Microsoft 365 Copilot” wasn’t much help either. When I asked Copilot, it struggled with the concept too (Figure 1). In any case, I’m sure that we’ll all be happy in our highly customized agentic world when it arrives.

Why Today’s AI Falls Short of its Hype
All of which brings me to a thoughtful article in the Tomorrow’s Blueprint blog entitled “Why Others Think AI Is a Miracle But You Think It’s Useless.” The author is Microsoft product manager Abram Jackson, now deeply involved in the development of Microsoft 365 Copilot. The core of the article is an assertion that:
“Today’s AI falls short of its hype for many due to three big reasons:
- It often doesn’t have the data it needs to work with
- Defining tasks precisely is very difficult
- There’s little AI can do other than give you text or images.”
Abram knows much more about AI than I do. I reckon that he has captured the problems faced by many organizations as they consider how to extract value from a potentially massive investment in Copilot licenses.
Without access to data, Copilot can do nothing. The magic of Microsoft 365 Copilot, if some exists, is the Microsoft Graph, or access to the documents, emails, and Teams messages stored within Microsoft 365. Yet the legacy of some older Microsoft decisions around collaboration strategy forced organizations to restrict SharePoint Search to stop Copilot revealing information to anyone who asked. As it turns out, it is hard to stop Copilot using data because even document metadata can reveal secrets.
I like the way Abram discusses the issue of defining tasks. Math works because the answer is either right or wrong. Copilot works very well when given well-defined tasks to do, like summarizing a meeting transcript or extracting tasks for people to consider. The same goes for scanning an email thread or summarizing a Word document. Generating text is less satisfactory unless the user is very precise in their prompt and grounds Copilot with some suitable input, like documents to work from. The promise of early demos where Copilot generated project reports and other material in the blink of an eye is never attained where loose prompting gives the AI free rein to indulge itself.
How People Need to Use AI
The summary is that to extract value from AI (and Microsoft 365 Copilot in particular), users must:
Understand if a task is valuable and not prone to hallucinations. Asking Copilot for Word to scan a document and decide if it is well-structured and how make improvements is valuable for many people who aren’t natural writers. Asking Copilot for Word to generate the initial document introduces the possibility of hallucinations.
Work to define the task precisely: Asking Copilot to do something very precisely with clear boundaries and guidelines will generate much better results than dashing off a quick prompt.
Translate the result generated by the AI into the form you need it to be. For chat, the introduction of Copilot pages has proven useful because it allows users to easily capture the output generated by Copilot for reuse. But will the slides generated by Copilot for PowerPoint be the type you need? Or can Copilot for Excel really perform the computations you want? Of course, they can, but only with practice and perseverance on the part of the human.
As Abram says, this approach “isn’t natural and it is time-consuming.” It comes about because Copilot is essentially an eager assistant that wants to work but will do stupid things unless you tell it precisely what to do and how to do it. Expanding on the example shown in Figure 1, adding context and direction to the prompt gives Copilot the chance to deliver a much better answer. Prompts can now be up to 128,000 characters, so there’s lots of room for comprehensive instructions.

The Bing Conundrum
One last point about data being available for Copilot to work with. I’m not sure about Abram’s statement that “hallucination is largely a solved problem for Microsoft Copilot.” I see odd stuff generated all the time. Abram justifies his claim by saying that “Copilot is trained to only respond with information it has been able to find through search.”
Copilot depends on Bing and Bing isn’t very good at searching. Take this website. Despite the ease in which Google has indexed and searched all my articles for years, Bing stubbornly refused to touch the site. I only discovered this fact when creating some declarative agents that used office365itpros.com as a source. Since then, the best efforts of WordPress support and my own attempts to navigate the online Bing webmaster advice have only just persuaded Bing to start indexing some pages. Some of the blocks are quite silly. One problem that caused Bing to refuse to index pages was the lack of an alt tag for a graphic in a sidebar.
If Copilot had better search facilities, it could generate better answers because it has better data to work with.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive monthly insights into what happens, why it happens, and what new features and capabilities mean for your tenant.
GigaOm Radar: Aqua Leads in Container Security
Securing containerized applications demands a multi-layered strategy that spans the entire lifecycle from development to production, a challenge Aqua has spent nearly a decade mastering. Aqua’s Container Security solution provides full lifecycle protection by identifying vulnerabilities early in the build phase, integrating acceptance gates in the CI/CD pipeline to minimize risks, and offering real-time runtime protection in production environments. With the Aqua Platform, organizations can secure container workloads across hybrid and multi-cloud environments, stop attacks as they happen, and maintain compliance, all without slowing development.
Securing containerized applications demands a multi-layered strategy that spans the entire lifecycle from development to production, a challenge Aqua has spent nearly a decade mastering. Aqua’s Container Security solution provides full lifecycle protection by identifying vulnerabilities early in the build phase, integrating acceptance gates in the CI/CD pipeline to minimize risks, and offering real-time runtime protection in production environments. With the Aqua Platform, organizations can secure container workloads across hybrid and multi-cloud environments, stop attacks as they happen, and maintain compliance, all without slowing development.
Read More
How to run .net app with using matlab dll?
Hi, I’m using the matlab interface for .net 6, so I tried to do everything as stated here
https://www.mathworks.com/help/matlab/matlab_external/requirements-to-build-net-engine-programs.html#mw_bb950ae5-3428-44db-8556-ff6bad52f1ef
My project file:
My Program.cs file:
When I run application an error pops up:
So I added to my project file this:
and this happening:
What did I do wrong?Hi, I’m using the matlab interface for .net 6, so I tried to do everything as stated here
https://www.mathworks.com/help/matlab/matlab_external/requirements-to-build-net-engine-programs.html#mw_bb950ae5-3428-44db-8556-ff6bad52f1ef
My project file:
My Program.cs file:
When I run application an error pops up:
So I added to my project file this:
and this happening:
What did I do wrong? Hi, I’m using the matlab interface for .net 6, so I tried to do everything as stated here
https://www.mathworks.com/help/matlab/matlab_external/requirements-to-build-net-engine-programs.html#mw_bb950ae5-3428-44db-8556-ff6bad52f1ef
My project file:
My Program.cs file:
When I run application an error pops up:
So I added to my project file this:
and this happening:
What did I do wrong? .net, matlab, dll, path, c#, workspace MATLAB Answers — New Questions
I use MATLAB 2013a because of some specific set of programs used in office only works on this version — wont work in any other version
So the issue is, MATLAB 2013a is bit old, and there many functions/arguments that wont spport this version. So is there any way to update the MATLAB to a latest version without losing the support of tools that only works in 2013a? Hope you understood my question. Thanks.So the issue is, MATLAB 2013a is bit old, and there many functions/arguments that wont spport this version. So is there any way to update the MATLAB to a latest version without losing the support of tools that only works in 2013a? Hope you understood my question. Thanks. So the issue is, MATLAB 2013a is bit old, and there many functions/arguments that wont spport this version. So is there any way to update the MATLAB to a latest version without losing the support of tools that only works in 2013a? Hope you understood my question. Thanks. version support, 2013a, updates MATLAB Answers — New Questions
Can I install Matlab 2013a on Windows 10 64 bits machine?
Matlab version that I can install on windows 10 64 bits and what software I need also to installMatlab version that I can install on windows 10 64 bits and what software I need also to install Matlab version that I can install on windows 10 64 bits and what software I need also to install matlab installation MATLAB Answers — New Questions
TMM Multilayer structure Transmission
% Define constants
c0 = 3e8; % Speed of light in vacuum (m/s)
dA = 30e-6; % Thickness of SiO2 layer in meters
dB = 7e-6; % Thickness of Si layer in meters
dD1 = 2e-6; % Thickness of D1 layer in meters
dD0 = 12e-6; % Thickness of D0 layer in meters
dD2 = 2e-6; % Thickness of D2 layer in meters
N = 5; % Number of SiO2 and Si periods
nA = 2.1; % Refractive index of SiO2
nB = 3.4; % Refractive index of Si
% Define frequency range
frequencies = linspace(1, 2.5, 1000); % Frequency range from 1 THz to 2.5 THz
% Define refractive index (n) and absorption coefficient (alpha) for 0% PG (water)
n_water = -0.07042 * frequencies.^3 + 0.4293 * frequencies.^2 – 0.9245 * frequencies + 2.744;
alpha_water = -17.0559 * frequencies.^2 + 151.258 * frequencies + 81.2348;
% Compute complex refractive index for defect layer (D0)
n_complex_water = n_water + 1i * (c0 * alpha_water) ./ (4 * pi * frequencies * 1e12);
% Define other refractive indices for layers
nD1 = nA; % Refractive index of D1 (SiO2)
nD2 = nA; % Refractive index of D2 (SiO2)
nS = nA; % Refractive index of substrate (SiO2)
n0 = 1; % Refractive index of ambient medium
theta0 = 0; % Angle of incidence in air (normal incidence)
% Calculate f_PBG using Equation 26
f_PBG = (c0 * (nA + nB)) / (4 * (dA + dB) * (nA * nB));
% Display f_PBG result
fprintf(‘The photonic bandgap frequency (f_PBG) is %.2f THzn’, f_PBG / 1e12);
% Calculate f_R using Equation 27
m = 1; % Order
f_R = m * c0 / (2 * dD0 * mean(real(n_complex_water)));
% Display f_R result
fprintf(‘The resonance frequency (f_R) is %.2f THzn’, f_R / 1e12);
% Initialize results
transmittance = zeros(length(frequencies), 1);
% Loop over each frequency
for j = 1:length(frequencies)
f = frequencies(j) * 1e12; % Convert frequency to Hz
omega = 2 * pi * f;
lambda = c0 / f;
% Calculate incident angles using Snell’s Law
thetaA = asin(n0 / nA * sin(theta0)); % Angle in SiO2 layer
thetaB = asin(n0 / nB * sin(theta0)); % Angle in Si layer
thetaD1 = asin(n0 / nD1 * sin(theta0)); % Angle in D1 layer
thetaD0 = asin(n0 / real(n_complex_water(j)) * sin(theta0)); % Angle in D0 layer (using real part)
thetaD2 = asin(n0 / nD2 * sin(theta0)); % Angle in D2 layer
% Calculate Sigma using Equation 20
sigmaA = (2 * pi * dA * nA * cos(thetaA)) / lambda;
sigmaB = (2 * pi * dB * nB * cos(thetaB)) / lambda;
sigmaD1 = (2 * pi * dD1 * nD1 * cos(thetaD1)) / lambda;
sigmaD0 = (2 * pi * dD0 * real(n_complex_water(j)) * cos(thetaD0)) / lambda; % Using real part of refractive index
sigmaD2 = (2 * pi * dD2 * nD2 * cos(thetaD2)) / lambda;
phiA = nA * cos(thetaA);
phiB = nB * cos(thetaB);
phiD1 = nD1 * cos(thetaD1);
phiD0 = real(n_complex_water(j)) * cos(thetaD0); % Using real part of refractive index
phiD2 = nD2 * cos(thetaD2);
% Transfer matrices
aA = [cos(sigmaA), -1i / phiA * sin(sigmaA); -1i * phiA * sin(sigmaA), cos(sigmaA)];
aB = [cos(sigmaB), -1i / phiB * sin(sigmaB); -1i * phiB * sin(sigmaB), cos(sigmaB)];
aD1 = [cos(sigmaD1), -1i / phiD1 * sin(sigmaD1); -1i * phiD1 * sin(sigmaD1), cos(sigmaD1)];
aD0 = [cos(sigmaD0), -1i / phiD0 * sin(sigmaD0); -1i * phiD0 * sin(sigmaD0), cos(sigmaD0)];
aD2 = [cos(sigmaD2), -1i / phiD2 * sin(sigmaD2); -1i * phiD2 * sin(sigmaD2), cos(sigmaD2)];
% Total matrix
M_total = (aA * aB)^N * aD1 * aD0 * aD2 * (aA * aB)^N;
% Calculate admittance values
phi0 = n0 * cos(theta0);
phis = nS * cos(thetaA);
% Calculate transmittance using the provided formula
t = (2 * phi0) / ((M_total(1,1) + M_total(1,2) * phis) * phi0 + (M_total(2,1) + M_total(2,2) * phis));
T = phis / phi0 * abs(t)^2 * 100;
transmittance(j) = T;
end
% Plot results
figure;
plot(frequencies, transmittance); % Already in percentage
xlabel(‘Frequency (THz)’);
ylabel(‘Transmittance (%)’);
title(‘Transmittance of THz PG Sensor vs. Frequency’);
The output should look like the uploaded image. Check the code for mistakes. The amplitude of T (in %) at the cental frequency doesn’t match with the image.% Define constants
c0 = 3e8; % Speed of light in vacuum (m/s)
dA = 30e-6; % Thickness of SiO2 layer in meters
dB = 7e-6; % Thickness of Si layer in meters
dD1 = 2e-6; % Thickness of D1 layer in meters
dD0 = 12e-6; % Thickness of D0 layer in meters
dD2 = 2e-6; % Thickness of D2 layer in meters
N = 5; % Number of SiO2 and Si periods
nA = 2.1; % Refractive index of SiO2
nB = 3.4; % Refractive index of Si
% Define frequency range
frequencies = linspace(1, 2.5, 1000); % Frequency range from 1 THz to 2.5 THz
% Define refractive index (n) and absorption coefficient (alpha) for 0% PG (water)
n_water = -0.07042 * frequencies.^3 + 0.4293 * frequencies.^2 – 0.9245 * frequencies + 2.744;
alpha_water = -17.0559 * frequencies.^2 + 151.258 * frequencies + 81.2348;
% Compute complex refractive index for defect layer (D0)
n_complex_water = n_water + 1i * (c0 * alpha_water) ./ (4 * pi * frequencies * 1e12);
% Define other refractive indices for layers
nD1 = nA; % Refractive index of D1 (SiO2)
nD2 = nA; % Refractive index of D2 (SiO2)
nS = nA; % Refractive index of substrate (SiO2)
n0 = 1; % Refractive index of ambient medium
theta0 = 0; % Angle of incidence in air (normal incidence)
% Calculate f_PBG using Equation 26
f_PBG = (c0 * (nA + nB)) / (4 * (dA + dB) * (nA * nB));
% Display f_PBG result
fprintf(‘The photonic bandgap frequency (f_PBG) is %.2f THzn’, f_PBG / 1e12);
% Calculate f_R using Equation 27
m = 1; % Order
f_R = m * c0 / (2 * dD0 * mean(real(n_complex_water)));
% Display f_R result
fprintf(‘The resonance frequency (f_R) is %.2f THzn’, f_R / 1e12);
% Initialize results
transmittance = zeros(length(frequencies), 1);
% Loop over each frequency
for j = 1:length(frequencies)
f = frequencies(j) * 1e12; % Convert frequency to Hz
omega = 2 * pi * f;
lambda = c0 / f;
% Calculate incident angles using Snell’s Law
thetaA = asin(n0 / nA * sin(theta0)); % Angle in SiO2 layer
thetaB = asin(n0 / nB * sin(theta0)); % Angle in Si layer
thetaD1 = asin(n0 / nD1 * sin(theta0)); % Angle in D1 layer
thetaD0 = asin(n0 / real(n_complex_water(j)) * sin(theta0)); % Angle in D0 layer (using real part)
thetaD2 = asin(n0 / nD2 * sin(theta0)); % Angle in D2 layer
% Calculate Sigma using Equation 20
sigmaA = (2 * pi * dA * nA * cos(thetaA)) / lambda;
sigmaB = (2 * pi * dB * nB * cos(thetaB)) / lambda;
sigmaD1 = (2 * pi * dD1 * nD1 * cos(thetaD1)) / lambda;
sigmaD0 = (2 * pi * dD0 * real(n_complex_water(j)) * cos(thetaD0)) / lambda; % Using real part of refractive index
sigmaD2 = (2 * pi * dD2 * nD2 * cos(thetaD2)) / lambda;
phiA = nA * cos(thetaA);
phiB = nB * cos(thetaB);
phiD1 = nD1 * cos(thetaD1);
phiD0 = real(n_complex_water(j)) * cos(thetaD0); % Using real part of refractive index
phiD2 = nD2 * cos(thetaD2);
% Transfer matrices
aA = [cos(sigmaA), -1i / phiA * sin(sigmaA); -1i * phiA * sin(sigmaA), cos(sigmaA)];
aB = [cos(sigmaB), -1i / phiB * sin(sigmaB); -1i * phiB * sin(sigmaB), cos(sigmaB)];
aD1 = [cos(sigmaD1), -1i / phiD1 * sin(sigmaD1); -1i * phiD1 * sin(sigmaD1), cos(sigmaD1)];
aD0 = [cos(sigmaD0), -1i / phiD0 * sin(sigmaD0); -1i * phiD0 * sin(sigmaD0), cos(sigmaD0)];
aD2 = [cos(sigmaD2), -1i / phiD2 * sin(sigmaD2); -1i * phiD2 * sin(sigmaD2), cos(sigmaD2)];
% Total matrix
M_total = (aA * aB)^N * aD1 * aD0 * aD2 * (aA * aB)^N;
% Calculate admittance values
phi0 = n0 * cos(theta0);
phis = nS * cos(thetaA);
% Calculate transmittance using the provided formula
t = (2 * phi0) / ((M_total(1,1) + M_total(1,2) * phis) * phi0 + (M_total(2,1) + M_total(2,2) * phis));
T = phis / phi0 * abs(t)^2 * 100;
transmittance(j) = T;
end
% Plot results
figure;
plot(frequencies, transmittance); % Already in percentage
xlabel(‘Frequency (THz)’);
ylabel(‘Transmittance (%)’);
title(‘Transmittance of THz PG Sensor vs. Frequency’);
The output should look like the uploaded image. Check the code for mistakes. The amplitude of T (in %) at the cental frequency doesn’t match with the image. % Define constants
c0 = 3e8; % Speed of light in vacuum (m/s)
dA = 30e-6; % Thickness of SiO2 layer in meters
dB = 7e-6; % Thickness of Si layer in meters
dD1 = 2e-6; % Thickness of D1 layer in meters
dD0 = 12e-6; % Thickness of D0 layer in meters
dD2 = 2e-6; % Thickness of D2 layer in meters
N = 5; % Number of SiO2 and Si periods
nA = 2.1; % Refractive index of SiO2
nB = 3.4; % Refractive index of Si
% Define frequency range
frequencies = linspace(1, 2.5, 1000); % Frequency range from 1 THz to 2.5 THz
% Define refractive index (n) and absorption coefficient (alpha) for 0% PG (water)
n_water = -0.07042 * frequencies.^3 + 0.4293 * frequencies.^2 – 0.9245 * frequencies + 2.744;
alpha_water = -17.0559 * frequencies.^2 + 151.258 * frequencies + 81.2348;
% Compute complex refractive index for defect layer (D0)
n_complex_water = n_water + 1i * (c0 * alpha_water) ./ (4 * pi * frequencies * 1e12);
% Define other refractive indices for layers
nD1 = nA; % Refractive index of D1 (SiO2)
nD2 = nA; % Refractive index of D2 (SiO2)
nS = nA; % Refractive index of substrate (SiO2)
n0 = 1; % Refractive index of ambient medium
theta0 = 0; % Angle of incidence in air (normal incidence)
% Calculate f_PBG using Equation 26
f_PBG = (c0 * (nA + nB)) / (4 * (dA + dB) * (nA * nB));
% Display f_PBG result
fprintf(‘The photonic bandgap frequency (f_PBG) is %.2f THzn’, f_PBG / 1e12);
% Calculate f_R using Equation 27
m = 1; % Order
f_R = m * c0 / (2 * dD0 * mean(real(n_complex_water)));
% Display f_R result
fprintf(‘The resonance frequency (f_R) is %.2f THzn’, f_R / 1e12);
% Initialize results
transmittance = zeros(length(frequencies), 1);
% Loop over each frequency
for j = 1:length(frequencies)
f = frequencies(j) * 1e12; % Convert frequency to Hz
omega = 2 * pi * f;
lambda = c0 / f;
% Calculate incident angles using Snell’s Law
thetaA = asin(n0 / nA * sin(theta0)); % Angle in SiO2 layer
thetaB = asin(n0 / nB * sin(theta0)); % Angle in Si layer
thetaD1 = asin(n0 / nD1 * sin(theta0)); % Angle in D1 layer
thetaD0 = asin(n0 / real(n_complex_water(j)) * sin(theta0)); % Angle in D0 layer (using real part)
thetaD2 = asin(n0 / nD2 * sin(theta0)); % Angle in D2 layer
% Calculate Sigma using Equation 20
sigmaA = (2 * pi * dA * nA * cos(thetaA)) / lambda;
sigmaB = (2 * pi * dB * nB * cos(thetaB)) / lambda;
sigmaD1 = (2 * pi * dD1 * nD1 * cos(thetaD1)) / lambda;
sigmaD0 = (2 * pi * dD0 * real(n_complex_water(j)) * cos(thetaD0)) / lambda; % Using real part of refractive index
sigmaD2 = (2 * pi * dD2 * nD2 * cos(thetaD2)) / lambda;
phiA = nA * cos(thetaA);
phiB = nB * cos(thetaB);
phiD1 = nD1 * cos(thetaD1);
phiD0 = real(n_complex_water(j)) * cos(thetaD0); % Using real part of refractive index
phiD2 = nD2 * cos(thetaD2);
% Transfer matrices
aA = [cos(sigmaA), -1i / phiA * sin(sigmaA); -1i * phiA * sin(sigmaA), cos(sigmaA)];
aB = [cos(sigmaB), -1i / phiB * sin(sigmaB); -1i * phiB * sin(sigmaB), cos(sigmaB)];
aD1 = [cos(sigmaD1), -1i / phiD1 * sin(sigmaD1); -1i * phiD1 * sin(sigmaD1), cos(sigmaD1)];
aD0 = [cos(sigmaD0), -1i / phiD0 * sin(sigmaD0); -1i * phiD0 * sin(sigmaD0), cos(sigmaD0)];
aD2 = [cos(sigmaD2), -1i / phiD2 * sin(sigmaD2); -1i * phiD2 * sin(sigmaD2), cos(sigmaD2)];
% Total matrix
M_total = (aA * aB)^N * aD1 * aD0 * aD2 * (aA * aB)^N;
% Calculate admittance values
phi0 = n0 * cos(theta0);
phis = nS * cos(thetaA);
% Calculate transmittance using the provided formula
t = (2 * phi0) / ((M_total(1,1) + M_total(1,2) * phis) * phi0 + (M_total(2,1) + M_total(2,2) * phis));
T = phis / phi0 * abs(t)^2 * 100;
transmittance(j) = T;
end
% Plot results
figure;
plot(frequencies, transmittance); % Already in percentage
xlabel(‘Frequency (THz)’);
ylabel(‘Transmittance (%)’);
title(‘Transmittance of THz PG Sensor vs. Frequency’);
The output should look like the uploaded image. Check the code for mistakes. The amplitude of T (in %) at the cental frequency doesn’t match with the image. tmm MATLAB Answers — New Questions