Month: June 2024
How to interprete an analytical eigendecomposition for a polynomial matrix with size nxn > 4×4 using the Symbolic Math Toolbox.
Hi,
I am using the Symbolic Math Toolbox to calculate the analytical eigenvalues of a polynomial matrix A(z), that is generated in my physical use-case. Depending on the input parameters, the matrix can scale in size from 1×1 to any nxn.
If I configure my matrix to have a size nxn > 4×4, the symbolic math toolbox still produces analytical eigenvalues (i.e. a polynomials without the "root" expression). How does Matlab calculate the analytical Eigenvalues in this particular case?
According to an answer to my previous question: https://www.mathworks.com/matlabcentral/answers/2132636-how-does-matlabs-symbolic-math-toolbox-always-finds-an-analytical-eigendecomposition-for-arbitrary-p#answer_1478061, Matlab uses numerical methods to find the roots of the characteristic polynomial.
However, from my experience the symbolic toolbox does not provide an analytic expression (i.e. a polynomial), if numerical methods where used and the solution is purely numerical. So my question is how Matlab arrives at this result?
Does Matlab indeed use a numerical approximation?
Does Matlab do some "tricks" in the background to reformulate my matrix into some analytically solvable matrix?
I also have attached a copy of my Matrix in a 6×6 configuration and the corresponding result.
Note: the variable "y" in my matrix represents 1/z, but this shouldn’t make a difference.
My code does the following:
syms z y
A = A;
A_roots = eig(A);Hi,
I am using the Symbolic Math Toolbox to calculate the analytical eigenvalues of a polynomial matrix A(z), that is generated in my physical use-case. Depending on the input parameters, the matrix can scale in size from 1×1 to any nxn.
If I configure my matrix to have a size nxn > 4×4, the symbolic math toolbox still produces analytical eigenvalues (i.e. a polynomials without the "root" expression). How does Matlab calculate the analytical Eigenvalues in this particular case?
According to an answer to my previous question: https://www.mathworks.com/matlabcentral/answers/2132636-how-does-matlabs-symbolic-math-toolbox-always-finds-an-analytical-eigendecomposition-for-arbitrary-p#answer_1478061, Matlab uses numerical methods to find the roots of the characteristic polynomial.
However, from my experience the symbolic toolbox does not provide an analytic expression (i.e. a polynomial), if numerical methods where used and the solution is purely numerical. So my question is how Matlab arrives at this result?
Does Matlab indeed use a numerical approximation?
Does Matlab do some "tricks" in the background to reformulate my matrix into some analytically solvable matrix?
I also have attached a copy of my Matrix in a 6×6 configuration and the corresponding result.
Note: the variable "y" in my matrix represents 1/z, but this shouldn’t make a difference.
My code does the following:
syms z y
A = A;
A_roots = eig(A); Hi,
I am using the Symbolic Math Toolbox to calculate the analytical eigenvalues of a polynomial matrix A(z), that is generated in my physical use-case. Depending on the input parameters, the matrix can scale in size from 1×1 to any nxn.
If I configure my matrix to have a size nxn > 4×4, the symbolic math toolbox still produces analytical eigenvalues (i.e. a polynomials without the "root" expression). How does Matlab calculate the analytical Eigenvalues in this particular case?
According to an answer to my previous question: https://www.mathworks.com/matlabcentral/answers/2132636-how-does-matlabs-symbolic-math-toolbox-always-finds-an-analytical-eigendecomposition-for-arbitrary-p#answer_1478061, Matlab uses numerical methods to find the roots of the characteristic polynomial.
However, from my experience the symbolic toolbox does not provide an analytic expression (i.e. a polynomial), if numerical methods where used and the solution is purely numerical. So my question is how Matlab arrives at this result?
Does Matlab indeed use a numerical approximation?
Does Matlab do some "tricks" in the background to reformulate my matrix into some analytically solvable matrix?
I also have attached a copy of my Matrix in a 6×6 configuration and the corresponding result.
Note: the variable "y" in my matrix represents 1/z, but this shouldn’t make a difference.
My code does the following:
syms z y
A = A;
A_roots = eig(A); symbolic-math, polynomial-matrices, eigenvalues MATLAB Answers — New Questions
Microsoft Classic Teams Still Showing as exposed After Updating to Latest New Teams
Hi,
Teams classic is showing as exposed in the Microsoft 365 defender Admin portal. But we have already updated to New teams in our environment.Intune report says its updated to latest version. Pls let us know how to fix this issue.
Does this New teams is showing in defender. Pls suggest…
Or is this a known issue
Can you anybody suggest how we can fix the devices vulnerability list
Thanks in Advance…
Karimulla
Hi, Teams classic is showing as exposed in the Microsoft 365 defender Admin portal. But we have already updated to New teams in our environment.Intune report says its updated to latest version. Pls let us know how to fix this issue.Does this New teams is showing in defender. Pls suggest… Or is this a known issue Can you anybody suggest how we can fix the devices vulnerability list Thanks in Advance… Karimulla Read More
Microsoft Classic Teams Still Showing as exposed Devices on M365Defender Admin Center After Updating
Hi Everyone,
Good day..
Teams classic is showing as exposed in the Microsoft 365 defender Admin portal. But we have already updated to New teams in our environment.Intune report says its updated to latest version. Pls let us know how to fix this issue.
Does this New teams is showing in defender. Pls suggest…
Or is this a known issue
Can you anybody suggest how we can fix the devices vulnerability list
Thanks in Advance…
Karimulla
Hi Everyone,Good day.. Teams classic is showing as exposed in the Microsoft 365 defender Admin portal. But we have already updated to New teams in our environment.Intune report says its updated to latest version. Pls let us know how to fix this issue.Does this New teams is showing in defender. Pls suggest… Or is this a known issue Can you anybody suggest how we can fix the devices vulnerability list Thanks in Advance…Karimulla Read More
Why does eig return different eigen values depending on whether eigen vector outputs are specified ?
I have the below 11×11 matrix (it is stored in P_sym.mat file attached). I get different eigen values from eig depenind on how I call it. If it computes eigen vectors it returns different eigen values than if I call eig with just eigen values specified as outputs.
For the following code, where i = 4
[v, d] = eig(P_sym,’vector’);
[dxx] = eig(P_sym);
p_sym_ispostitive_definate(i) = issymmetric(P_sym) && all(d > 0.0);
if(min(d) > 0 && min(dxx) < 0)
save(‘P_sym.mat’,’P_sym’);
fprintf(1,’P_sym : %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8en’,squeeze(P_sym));
fprintf(1,’n’);
p_sym_ispostitive_definateXX = issymmetric(P_sym) && all(dxx > 0.0);
fprintf(1,[‘ P_sym(%d) SPD %d, symmetric %d, min_eig %15.8e, eig: ‘ repmat(‘ %15.8e’,1,length(dxx)) ‘n’],i,p_sym_ispostitive_definateXX, issymmetric(P_sym), min(dxx), dxx);
fprintf(1,’n’);
keyboard
end
I get the folllowing results:
P_sym(1) SPD 1, symmetric 1, min_eig 8.90819724e-23, eig: 8.90819724e-23 8.01292127e-16 7.71071265e-12 1.83508980e-11 2.71554045e-09 3.24460252e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
P_sym : 2.86443726e-01 1.25605442e-01 -3.05677616e-02 3.17320309e-05 -1.41410366e-07 1.37827270e-05 0.00000000e+00 0.00000000e+00 -1.93544065e-02 -4.36768322e-07 -3.54926546e-12
P_sym : 1.25605442e-01 7.12565604e+00 -4.08080640e+00 4.76436787e-04 8.15871206e-04 -2.98861979e-04 0.00000000e+00 0.00000000e+00 -7.64780930e-02 -5.97081660e-07 -2.54538005e-12
P_sym : -3.05677616e-02 -4.08080640e+00 2.38619512e+00 -2.69887758e-04 -4.67183802e-04 1.83109375e-04 0.00000000e+00 0.00000000e+00 2.29324963e-02 -4.59895084e-07 -6.02605228e-12
P_sym : 3.17320309e-05 4.76436787e-04 -2.69887758e-04 3.61675592e-08 5.22270400e-08 -1.98733607e-08 0.00000000e+00 0.00000000e+00 -8.24258261e-06 -2.22346600e-10 -1.93099984e-15
P_sym : -1.41410366e-07 8.15871206e-04 -4.67183802e-04 5.22270400e-08 9.67373610e-08 -3.56665330e-08 0.00000000e+00 0.00000000e+00 -8.10157851e-06 -2.75926708e-11 -5.27412767e-17
P_sym : 1.37827270e-05 -2.98861979e-04 1.83109375e-04 -1.98733607e-08 -3.56665330e-08 1.78452469e-08 0.00000000e+00 0.00000000e+00 -6.41479546e-07 -6.32077553e-11 -5.51581323e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -1.93544065e-02 -7.64780930e-02 2.29324963e-02 -8.24258261e-06 -8.10157851e-06 -6.41479546e-07 0.00000000e+00 0.00000000e+00 1.51994891e-02 6.47038249e-07 6.14697206e-12
P_sym : -4.36768322e-07 -5.97081660e-07 -4.59895084e-07 -2.22346600e-10 -2.75926708e-11 -6.32077553e-11 0.00000000e+00 0.00000000e+00 6.47038249e-07 4.01852424e-11 4.26210532e-16
P_sym : -3.54926546e-12 -2.54538005e-12 -6.02605228e-12 -1.93099984e-15 -5.27412767e-17 -5.51581323e-16 0.00000000e+00 0.00000000e+00 6.14697206e-12 4.26210532e-16 4.76317051e-21
P_sym(1) SPD 0, symmetric 1, min_eig -3.56878675e-17, eig: -3.56878675e-17 8.91986312e-23 7.71020397e-12 1.83488208e-11 2.71554106e-09 3.24460241e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
This is rather perplexing, because the minimum eigen value in the first call is positive, whereas in the 2nd call it is negative. This defines whether the matrix is positive definate or not. The difference that causes the output change is not the "vector" output option for eig, but rather whether eigen vectors are requested in the return.
Why the differing values? Which eig can be used with assurance to determine SPD (symmetric positive definate) matrices??
P_sym : 3.91971950e-01 -1.84707196e-02 9.64010847e-02 1.49471956e-05 -2.95043186e-05 8.41762906e-06 0.00000000e+00 0.00000000e+00 -2.63518244e-02 -8.89506787e-07 -7.63950369e-12
P_sym : -1.84707196e-02 1.10109548e+01 -5.54536247e+00 7.12947029e-04 5.49185331e-04 9.97089694e-06 0.00000000e+00 0.00000000e+00 -1.00683513e-01 -8.04754882e-07 -3.84179497e-12
P_sym : 9.64010847e-02 -5.54536247e+00 2.97740884e+00 -3.66348740e-04 -2.70925828e-04 2.66675852e-05 0.00000000e+00 0.00000000e+00 1.37117248e-02 -7.52066065e-07 -8.08110708e-12
P_sym : 1.49471956e-05 7.12947029e-04 -3.66348740e-04 4.89069796e-08 3.30828980e-08 -1.44659120e-09 0.00000000e+00 0.00000000e+00 -8.18935868e-06 -1.82559412e-10 -1.48511352e-15
P_sym : -2.95043186e-05 5.49185331e-04 -2.70925828e-04 3.30828980e-08 3.19074916e-08 1.18059503e-09 0.00000000e+00 0.00000000e+00 -4.85944277e-06 -1.22536049e-11 -4.65286216e-17
P_sym : 8.41762906e-06 9.97089694e-06 2.66675852e-05 -1.44659120e-09 1.18059503e-09 6.54728043e-09 0.00000000e+00 0.00000000e+00 -4.94291834e-06 -1.19356169e-10 -9.10766108e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -2.63518244e-02 -1.00683513e-01 1.37117248e-02 -8.18935868e-06 -4.85944277e-06 -4.94291834e-06 0.00000000e+00 0.00000000e+00 1.90931002e-02 7.98240784e-07 7.33246401e-12
P_sym : -8.89506787e-07 -8.04754882e-07 -7.52066065e-07 -1.82559412e-10 -1.22536049e-11 -1.19356169e-10 0.00000000e+00 0.00000000e+00 7.98240784e-07 4.49272102e-11 4.51931653e-16
P_sym : -7.63950369e-12 -3.84179497e-12 -8.08110708e-12 -1.48511352e-15 -4.65286216e-17 -9.10766108e-16 0.00000000e+00 0.00000000e+00 7.33246401e-12 4.51931653e-16 4.76317051e-21I have the below 11×11 matrix (it is stored in P_sym.mat file attached). I get different eigen values from eig depenind on how I call it. If it computes eigen vectors it returns different eigen values than if I call eig with just eigen values specified as outputs.
For the following code, where i = 4
[v, d] = eig(P_sym,’vector’);
[dxx] = eig(P_sym);
p_sym_ispostitive_definate(i) = issymmetric(P_sym) && all(d > 0.0);
if(min(d) > 0 && min(dxx) < 0)
save(‘P_sym.mat’,’P_sym’);
fprintf(1,’P_sym : %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8en’,squeeze(P_sym));
fprintf(1,’n’);
p_sym_ispostitive_definateXX = issymmetric(P_sym) && all(dxx > 0.0);
fprintf(1,[‘ P_sym(%d) SPD %d, symmetric %d, min_eig %15.8e, eig: ‘ repmat(‘ %15.8e’,1,length(dxx)) ‘n’],i,p_sym_ispostitive_definateXX, issymmetric(P_sym), min(dxx), dxx);
fprintf(1,’n’);
keyboard
end
I get the folllowing results:
P_sym(1) SPD 1, symmetric 1, min_eig 8.90819724e-23, eig: 8.90819724e-23 8.01292127e-16 7.71071265e-12 1.83508980e-11 2.71554045e-09 3.24460252e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
P_sym : 2.86443726e-01 1.25605442e-01 -3.05677616e-02 3.17320309e-05 -1.41410366e-07 1.37827270e-05 0.00000000e+00 0.00000000e+00 -1.93544065e-02 -4.36768322e-07 -3.54926546e-12
P_sym : 1.25605442e-01 7.12565604e+00 -4.08080640e+00 4.76436787e-04 8.15871206e-04 -2.98861979e-04 0.00000000e+00 0.00000000e+00 -7.64780930e-02 -5.97081660e-07 -2.54538005e-12
P_sym : -3.05677616e-02 -4.08080640e+00 2.38619512e+00 -2.69887758e-04 -4.67183802e-04 1.83109375e-04 0.00000000e+00 0.00000000e+00 2.29324963e-02 -4.59895084e-07 -6.02605228e-12
P_sym : 3.17320309e-05 4.76436787e-04 -2.69887758e-04 3.61675592e-08 5.22270400e-08 -1.98733607e-08 0.00000000e+00 0.00000000e+00 -8.24258261e-06 -2.22346600e-10 -1.93099984e-15
P_sym : -1.41410366e-07 8.15871206e-04 -4.67183802e-04 5.22270400e-08 9.67373610e-08 -3.56665330e-08 0.00000000e+00 0.00000000e+00 -8.10157851e-06 -2.75926708e-11 -5.27412767e-17
P_sym : 1.37827270e-05 -2.98861979e-04 1.83109375e-04 -1.98733607e-08 -3.56665330e-08 1.78452469e-08 0.00000000e+00 0.00000000e+00 -6.41479546e-07 -6.32077553e-11 -5.51581323e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -1.93544065e-02 -7.64780930e-02 2.29324963e-02 -8.24258261e-06 -8.10157851e-06 -6.41479546e-07 0.00000000e+00 0.00000000e+00 1.51994891e-02 6.47038249e-07 6.14697206e-12
P_sym : -4.36768322e-07 -5.97081660e-07 -4.59895084e-07 -2.22346600e-10 -2.75926708e-11 -6.32077553e-11 0.00000000e+00 0.00000000e+00 6.47038249e-07 4.01852424e-11 4.26210532e-16
P_sym : -3.54926546e-12 -2.54538005e-12 -6.02605228e-12 -1.93099984e-15 -5.27412767e-17 -5.51581323e-16 0.00000000e+00 0.00000000e+00 6.14697206e-12 4.26210532e-16 4.76317051e-21
P_sym(1) SPD 0, symmetric 1, min_eig -3.56878675e-17, eig: -3.56878675e-17 8.91986312e-23 7.71020397e-12 1.83488208e-11 2.71554106e-09 3.24460241e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
This is rather perplexing, because the minimum eigen value in the first call is positive, whereas in the 2nd call it is negative. This defines whether the matrix is positive definate or not. The difference that causes the output change is not the "vector" output option for eig, but rather whether eigen vectors are requested in the return.
Why the differing values? Which eig can be used with assurance to determine SPD (symmetric positive definate) matrices??
P_sym : 3.91971950e-01 -1.84707196e-02 9.64010847e-02 1.49471956e-05 -2.95043186e-05 8.41762906e-06 0.00000000e+00 0.00000000e+00 -2.63518244e-02 -8.89506787e-07 -7.63950369e-12
P_sym : -1.84707196e-02 1.10109548e+01 -5.54536247e+00 7.12947029e-04 5.49185331e-04 9.97089694e-06 0.00000000e+00 0.00000000e+00 -1.00683513e-01 -8.04754882e-07 -3.84179497e-12
P_sym : 9.64010847e-02 -5.54536247e+00 2.97740884e+00 -3.66348740e-04 -2.70925828e-04 2.66675852e-05 0.00000000e+00 0.00000000e+00 1.37117248e-02 -7.52066065e-07 -8.08110708e-12
P_sym : 1.49471956e-05 7.12947029e-04 -3.66348740e-04 4.89069796e-08 3.30828980e-08 -1.44659120e-09 0.00000000e+00 0.00000000e+00 -8.18935868e-06 -1.82559412e-10 -1.48511352e-15
P_sym : -2.95043186e-05 5.49185331e-04 -2.70925828e-04 3.30828980e-08 3.19074916e-08 1.18059503e-09 0.00000000e+00 0.00000000e+00 -4.85944277e-06 -1.22536049e-11 -4.65286216e-17
P_sym : 8.41762906e-06 9.97089694e-06 2.66675852e-05 -1.44659120e-09 1.18059503e-09 6.54728043e-09 0.00000000e+00 0.00000000e+00 -4.94291834e-06 -1.19356169e-10 -9.10766108e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -2.63518244e-02 -1.00683513e-01 1.37117248e-02 -8.18935868e-06 -4.85944277e-06 -4.94291834e-06 0.00000000e+00 0.00000000e+00 1.90931002e-02 7.98240784e-07 7.33246401e-12
P_sym : -8.89506787e-07 -8.04754882e-07 -7.52066065e-07 -1.82559412e-10 -1.22536049e-11 -1.19356169e-10 0.00000000e+00 0.00000000e+00 7.98240784e-07 4.49272102e-11 4.51931653e-16
P_sym : -7.63950369e-12 -3.84179497e-12 -8.08110708e-12 -1.48511352e-15 -4.65286216e-17 -9.10766108e-16 0.00000000e+00 0.00000000e+00 7.33246401e-12 4.51931653e-16 4.76317051e-21 I have the below 11×11 matrix (it is stored in P_sym.mat file attached). I get different eigen values from eig depenind on how I call it. If it computes eigen vectors it returns different eigen values than if I call eig with just eigen values specified as outputs.
For the following code, where i = 4
[v, d] = eig(P_sym,’vector’);
[dxx] = eig(P_sym);
p_sym_ispostitive_definate(i) = issymmetric(P_sym) && all(d > 0.0);
if(min(d) > 0 && min(dxx) < 0)
save(‘P_sym.mat’,’P_sym’);
fprintf(1,’P_sym : %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8e %15.8en’,squeeze(P_sym));
fprintf(1,’n’);
p_sym_ispostitive_definateXX = issymmetric(P_sym) && all(dxx > 0.0);
fprintf(1,[‘ P_sym(%d) SPD %d, symmetric %d, min_eig %15.8e, eig: ‘ repmat(‘ %15.8e’,1,length(dxx)) ‘n’],i,p_sym_ispostitive_definateXX, issymmetric(P_sym), min(dxx), dxx);
fprintf(1,’n’);
keyboard
end
I get the folllowing results:
P_sym(1) SPD 1, symmetric 1, min_eig 8.90819724e-23, eig: 8.90819724e-23 8.01292127e-16 7.71071265e-12 1.83508980e-11 2.71554045e-09 3.24460252e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
P_sym : 2.86443726e-01 1.25605442e-01 -3.05677616e-02 3.17320309e-05 -1.41410366e-07 1.37827270e-05 0.00000000e+00 0.00000000e+00 -1.93544065e-02 -4.36768322e-07 -3.54926546e-12
P_sym : 1.25605442e-01 7.12565604e+00 -4.08080640e+00 4.76436787e-04 8.15871206e-04 -2.98861979e-04 0.00000000e+00 0.00000000e+00 -7.64780930e-02 -5.97081660e-07 -2.54538005e-12
P_sym : -3.05677616e-02 -4.08080640e+00 2.38619512e+00 -2.69887758e-04 -4.67183802e-04 1.83109375e-04 0.00000000e+00 0.00000000e+00 2.29324963e-02 -4.59895084e-07 -6.02605228e-12
P_sym : 3.17320309e-05 4.76436787e-04 -2.69887758e-04 3.61675592e-08 5.22270400e-08 -1.98733607e-08 0.00000000e+00 0.00000000e+00 -8.24258261e-06 -2.22346600e-10 -1.93099984e-15
P_sym : -1.41410366e-07 8.15871206e-04 -4.67183802e-04 5.22270400e-08 9.67373610e-08 -3.56665330e-08 0.00000000e+00 0.00000000e+00 -8.10157851e-06 -2.75926708e-11 -5.27412767e-17
P_sym : 1.37827270e-05 -2.98861979e-04 1.83109375e-04 -1.98733607e-08 -3.56665330e-08 1.78452469e-08 0.00000000e+00 0.00000000e+00 -6.41479546e-07 -6.32077553e-11 -5.51581323e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -1.93544065e-02 -7.64780930e-02 2.29324963e-02 -8.24258261e-06 -8.10157851e-06 -6.41479546e-07 0.00000000e+00 0.00000000e+00 1.51994891e-02 6.47038249e-07 6.14697206e-12
P_sym : -4.36768322e-07 -5.97081660e-07 -4.59895084e-07 -2.22346600e-10 -2.75926708e-11 -6.32077553e-11 0.00000000e+00 0.00000000e+00 6.47038249e-07 4.01852424e-11 4.26210532e-16
P_sym : -3.54926546e-12 -2.54538005e-12 -6.02605228e-12 -1.93099984e-15 -5.27412767e-17 -5.51581323e-16 0.00000000e+00 0.00000000e+00 6.14697206e-12 4.26210532e-16 4.76317051e-21
P_sym(1) SPD 0, symmetric 1, min_eig -3.56878675e-17, eig: -3.56878675e-17 8.91986312e-23 7.71020397e-12 1.83488208e-11 2.71554106e-09 3.24460241e-09 4.31101082e-03 4.04842334e-02 2.91492831e-01 1.00000000e+00 9.47720644e+00
This is rather perplexing, because the minimum eigen value in the first call is positive, whereas in the 2nd call it is negative. This defines whether the matrix is positive definate or not. The difference that causes the output change is not the "vector" output option for eig, but rather whether eigen vectors are requested in the return.
Why the differing values? Which eig can be used with assurance to determine SPD (symmetric positive definate) matrices??
P_sym : 3.91971950e-01 -1.84707196e-02 9.64010847e-02 1.49471956e-05 -2.95043186e-05 8.41762906e-06 0.00000000e+00 0.00000000e+00 -2.63518244e-02 -8.89506787e-07 -7.63950369e-12
P_sym : -1.84707196e-02 1.10109548e+01 -5.54536247e+00 7.12947029e-04 5.49185331e-04 9.97089694e-06 0.00000000e+00 0.00000000e+00 -1.00683513e-01 -8.04754882e-07 -3.84179497e-12
P_sym : 9.64010847e-02 -5.54536247e+00 2.97740884e+00 -3.66348740e-04 -2.70925828e-04 2.66675852e-05 0.00000000e+00 0.00000000e+00 1.37117248e-02 -7.52066065e-07 -8.08110708e-12
P_sym : 1.49471956e-05 7.12947029e-04 -3.66348740e-04 4.89069796e-08 3.30828980e-08 -1.44659120e-09 0.00000000e+00 0.00000000e+00 -8.18935868e-06 -1.82559412e-10 -1.48511352e-15
P_sym : -2.95043186e-05 5.49185331e-04 -2.70925828e-04 3.30828980e-08 3.19074916e-08 1.18059503e-09 0.00000000e+00 0.00000000e+00 -4.85944277e-06 -1.22536049e-11 -4.65286216e-17
P_sym : 8.41762906e-06 9.97089694e-06 2.66675852e-05 -1.44659120e-09 1.18059503e-09 6.54728043e-09 0.00000000e+00 0.00000000e+00 -4.94291834e-06 -1.19356169e-10 -9.10766108e-16
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e-18 0.00000000e+00 0.00000000e+00 0.00000000e+00
P_sym : -2.63518244e-02 -1.00683513e-01 1.37117248e-02 -8.18935868e-06 -4.85944277e-06 -4.94291834e-06 0.00000000e+00 0.00000000e+00 1.90931002e-02 7.98240784e-07 7.33246401e-12
P_sym : -8.89506787e-07 -8.04754882e-07 -7.52066065e-07 -1.82559412e-10 -1.22536049e-11 -1.19356169e-10 0.00000000e+00 0.00000000e+00 7.98240784e-07 4.49272102e-11 4.51931653e-16
P_sym : -7.63950369e-12 -3.84179497e-12 -8.08110708e-12 -1.48511352e-15 -4.65286216e-17 -9.10766108e-16 0.00000000e+00 0.00000000e+00 7.33246401e-12 4.51931653e-16 4.76317051e-21 eig, symmetric positive definite MATLAB Answers — New Questions
Calling subclass functions to manipulate inputs for superclass constructor?
I have a user-created subclass Domain2d < fegeometry. The fegeometry class is a default class in MATLAB, and the inputs for the fegeometry constructor are not user-friendly. Part of the idea of the Domain2d subclass is that its constructor should take user-friendly inputs, translate them into the complex inputs needed for the fegeometry constructor, then call the fegeometry constructor. The way the code is currently written, the task of manipulating the simple inputs into complex inputs is like:
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
% manipulate simple_inputs to complex_inputs
…(code here)
% call superclass constructor
self@fegeometry(complex_inputs);
end
end
end
This is kludge-y, but it works, and substantial code has been written that uses the bar object. But now I have a good reason to want to rewrite the bar object like
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
complex_inputs = translateSimpleToComplex(self,simple_inputs);
self@fegeometry(complex_inputs);
end
function complex_inputs = translateSimpleToComplex(self,simple_inputs)
…
end
end
end
The above produces the error "Calling the superclass constructor ‘fegeometry’ after an object use or after a return statement is not supported."
How should I proceed?I have a user-created subclass Domain2d < fegeometry. The fegeometry class is a default class in MATLAB, and the inputs for the fegeometry constructor are not user-friendly. Part of the idea of the Domain2d subclass is that its constructor should take user-friendly inputs, translate them into the complex inputs needed for the fegeometry constructor, then call the fegeometry constructor. The way the code is currently written, the task of manipulating the simple inputs into complex inputs is like:
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
% manipulate simple_inputs to complex_inputs
…(code here)
% call superclass constructor
self@fegeometry(complex_inputs);
end
end
end
This is kludge-y, but it works, and substantial code has been written that uses the bar object. But now I have a good reason to want to rewrite the bar object like
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
complex_inputs = translateSimpleToComplex(self,simple_inputs);
self@fegeometry(complex_inputs);
end
function complex_inputs = translateSimpleToComplex(self,simple_inputs)
…
end
end
end
The above produces the error "Calling the superclass constructor ‘fegeometry’ after an object use or after a return statement is not supported."
How should I proceed? I have a user-created subclass Domain2d < fegeometry. The fegeometry class is a default class in MATLAB, and the inputs for the fegeometry constructor are not user-friendly. Part of the idea of the Domain2d subclass is that its constructor should take user-friendly inputs, translate them into the complex inputs needed for the fegeometry constructor, then call the fegeometry constructor. The way the code is currently written, the task of manipulating the simple inputs into complex inputs is like:
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
% manipulate simple_inputs to complex_inputs
…(code here)
% call superclass constructor
self@fegeometry(complex_inputs);
end
end
end
This is kludge-y, but it works, and substantial code has been written that uses the bar object. But now I have a good reason to want to rewrite the bar object like
classdef Domain2d < fegeometry
properties
end
methods
function self = Domain2d(simple_inputs)
complex_inputs = translateSimpleToComplex(self,simple_inputs);
self@fegeometry(complex_inputs);
end
function complex_inputs = translateSimpleToComplex(self,simple_inputs)
…
end
end
end
The above produces the error "Calling the superclass constructor ‘fegeometry’ after an object use or after a return statement is not supported."
How should I proceed? classes, inheritance, constructors MATLAB Answers — New Questions
macOS onboard
Our macOS device is enrolled in Intune. which onboarding mechanism supports onboarding macOS for Purview?
Our macOS device is enrolled in Intune. which onboarding mechanism supports onboarding macOS for Purview? Read More
How to Include Custom Details from an Alert in Email Generated by a Playbook
I have created an analytics rule that queries Sentinel for security events pertaining to group membership additions, and triggers an alert for each event found. The rule does not create an incident. Within the rule logic, I have created three “custom details” for specific fields within the event (TargetAccount, MemberName, SubjectAccount). I have also created a corresponding playbook for the purpose of sending an email to me when an alert is triggered. The associated automation rule has been configured and is triggered in the analytics rule. All of this is working as expected. When a member is added to a security group, I receive an email.
The one remaining piece is to populate the email message with the custom details that I’ve identified in the rule. However, I’m not sure how to do this. Essentially, I would like the values of the three custom details shown in the first screenshot below to show up in the body of the email, shown in the second screenshot, next to their corresponding names.
So, for example, say Joe Smith is added to the group “Admin” by Tom Jones. These are the fields and values in the event that I want to pull out.
TargetAccount = AdminMemberName = Joe SmithSubject Account = Tom Jones
The custom details would then be populated as such:
Security_Group = AdminMember_Added = Joe SmithAdded_By = Tom Jones
and then, the body of the email would contain:
Group: AdminMember Added: Joe SmithAdded By: Tom Jones
I have created an analytics rule that queries Sentinel for security events pertaining to group membership additions, and triggers an alert for each event found. The rule does not create an incident. Within the rule logic, I have created three “custom details” for specific fields within the event (TargetAccount, MemberName, SubjectAccount). I have also created a corresponding playbook for the purpose of sending an email to me when an alert is triggered. The associated automation rule has been configured and is triggered in the analytics rule. All of this is working as expected. When a member is added to a security group, I receive an email. The one remaining piece is to populate the email message with the custom details that I’ve identified in the rule. However, I’m not sure how to do this. Essentially, I would like the values of the three custom details shown in the first screenshot below to show up in the body of the email, shown in the second screenshot, next to their corresponding names. So, for example, say Joe Smith is added to the group “Admin” by Tom Jones. These are the fields and values in the event that I want to pull out.TargetAccount = AdminMemberName = Joe SmithSubject Account = Tom JonesThe custom details would then be populated as such:Security_Group = AdminMember_Added = Joe SmithAdded_By = Tom Jonesand then, the body of the email would contain:Group: AdminMember Added: Joe SmithAdded By: Tom Jones Read More
GPU node health checks integrated into Azure Kubernetes service via node problem detector
Introduction
Large AI model training can take months to complete on very large AI supercomputers. These AI supercomputers consist of many high-end GPU’s (e.g NVIDIA A100 or H100) all connected with InfiniBand. The Azure NDv5 has 8 H100 GPU’s, each connected directly by NVlink 4 (on a node) and each GPU has a 400 Gbps IB link that enables it to communicate with all the other GPU’s on the AI Supercomputer.
AI model training workloads are tightly coupled, at regular intervals all the gradients need to be updated using NCCL collective communication. If any of the gpus or InfiniBand links fail (e.g. dropped GPU, InfiniBand link flap etc) this can cause the complete job to terminate (and require it to be restarted from the last checkpoint). It is imperative that any unhealthy nodes/IB fabric be identified to prevent them being included in any of the nodes used in the training job.
The Azurehpc node health repository provides a suite of recommended node health checks for all Azure specialized SKU’s (including GPU’s). In this blog post we will show how to integrate a few of the GPU node health checks into AKS (Azure kubernetes service) in such a way that
GPU node health checks are run at regular intervals.
Nodes which fail any of the GPU tests will be automatically cordoned off (to prevent any jobs being scheduled on them) and optionally drained (all pods removed from node)
We will be leveraging Node problem detector (NPD) to run the specific GPU node health checks and draino to cordon/drain any nodes that fail any of the GPU node health checks.
GPU node health check integration into NPD
NPD is commonly used in K8s environments to run various k8s cluster health checks and report any issues via k8s events/conditions to k8s api server. The k8s cluster can then take some action depending on how serious the condition is (e.g. for some permanent conditions, the node may be cordoned off and drained). We will leverage the NPD custom plugin
Note: GPU count, GPU NVlink, GPU XID and GPU ECC health checks are included (other GPU node health checks can also be easily included).
Get the NPD github repository
git clone http://github.com/kubernetes/node-proble-detector.git
Edit the NPD Makefile (get modified file here)
Build for linux_amd64 only (not ARM)
LINUX_PLATFORMS=linux_amd64
DOCKER_PLATFORMS=linux/amd64
Provide a unique tag
TAG?=$(VERSION)_<UNIQUE NUMBER>
Change registry to Azure ACR
REGISTRY?=<YOUR ACR>.azurecr.io/k8s-staging-npd
Change the BASEIMAGE
BASEIMAGE:=nvcr.io/nvidia/pytorch:23.03-py3
Edit NPD Dockerfile (get modified file here)
Change base container
FROM nvcr.io/nvidia/pytorch:23.03-py3 as builder-base
Install golang in container
COPY go1.22.4.linux-amd64.tar.gz .
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz
Remove unnecessary ARM packaged
#RUN clean-install util-linux bash libsystemd-dev
Edit entrypoint
ENTRYPOINT [“/node-problem-detector”, “–config.custom-plugin-monitor=/config/custom-plugin-gpu-count.json”]
Note: You can get the golang tarball here, go1.22.4.linux-amd64.tar.gz
Build NPD without SystemLogMonitor and SystemStatsMonitor. AKS has its own NPD which will run complete monitoring, we only want our NPD to just run the GPU node tests.
BUILD_TAGS=”disable_system_log_monitor disable_system_stats_monitor” make 2>&1 | tee make.out
Push the container image to ACR
make push 2>&1 make_push.out
You could add all the GPU node health check plugins and scripts to the NPD container, but it’s much more flexible to use a k8s configMap to inject them directly into the container at runtime.
Edit deployment/node-problem-detector-config.yaml add the GPU custom plugin (yaml file) and gpu health check scripts (bash scripts) to the k8s ConfigMap yaml file. (get modified file here)
Note: You can control the frequency in which the tests are run, there are parameters in the custom plugin yaml files.
Edit deployment/node-problem-detector.yaml. (get modified file here)
NPD command line
– –config.custom-plugin-monitor=/config/custom-plugin-gpu-count.json,/config/custom-plugin-gpu-nvlink.json,/config/custom-plugin-gpu-xid.json, ,/config/custom-plugin-gpu-ecc.json
Which image/container to use
image: <YOUR ACR>.azurecr.io/k8s-staging-npd/node-problem-detector:<YOUR TAG>
Container limits
cpu: 240m
memory: 2048Mi
Bash script permissions
defaultMode: 0777
Which files to inject into the container.
– key: kernel-monitor.json
path: kernel-monitor.json
– key: docker-monitor.json
path: docker-monitor.json
– key: custom-plugin-monitor.json
path: custom-plugin-monitor.json
– key: check_ntp.sh
path: plugin/check_ntp.sh
– key: custom-plugin-gpu-count.json
path: custom-plugin-gpu-count.json
– key: check_gpu_count.sh
path: plugin/check_gpu_count.sh
– key: custom-plugin-gpu-nvlink.json
path: custom-plugin-gpu-nvlink.json
– key: check_gpu_nvlink.sh
path: plugin/check_gpu_nvlink.sh
– key: custom-plugin-gpu-xid.json
path: custom-plugin-gpu-xid.json
– key: check_gpu_xid.sh
path: plugin/check_gpu_xid.sh
Note: I have shown how to integrate 4 GPU node health checks, other GPU health checks can be easily added.
Note: You will probably need to modify the container limits (cpu/memory) depending on how many and what GPU tests you are running.
Draino set-up
The draino set-up is easy, we just need to tell draino which GPU node health check events/conditions to act on (e.g. cordon/drain).
Get the draino repository
git clone https://github.com/planetlabs/draino.git
Build and push draino image/container to your ACR
docker build -t <YOUR ACR>.azurecr.io/draino .
docker push <YOUR ACR>.azurecr.io/draino
Edit the drain manifest yaml file (get modified file here)
Add correct service account permission/rules so draino can access the k8s service
rules:
– apiGroups: [”]
resources: [events]
verbs: [create, patch, update]
– apiGroups: [”]
resources: [nodes]
verbs: [get, watch, list, update, patch]
– apiGroups: [”]
resources: [nodes/status]
verbs: [patch, watch, list, update, patch]
– apiGroups: [”]
resources: [endpoints]
verbs: [get,watch, list, create, patch, update]
– apiGroups: [”]
resources: [pods]
verbs: [get, watch, list]
– apiGroups: [”]
resources: [pods/eviction]
verbs: [create]
– apiGroups:
– extensions
– apps
resources: [daemonsets]
verbs: [get, watch, list]
Draino command line (Only cordon GPU nodes with these GPU conditions)
command: [/draino, –skip-drain, –node-label=accelerator=nvidia, GpuCount, GpuNvlink, GpuXid, GpuEcc]
Select the correct image/container
image: <YOUR ACR>.azurecr.io/draino:latest
Testing NPD+Draino GPU health checks
Prerequisites
You have a working AKS cluster. In this test we will be using a NDmv4 nodepool (See here on how to deploy an NDmv4 AKS nodepool).
Deploy NPD+GPU health checks
kubectl apply -f rbac.yaml
kubectl apply -f node-problem-detector-config.yaml
kubectl apply -f node-problem-detector.yaml
Note: You should see the node-problem-detector daemonset running on NDmv4 nodes.
Deploy special draino deployment with support for GPU node health checks
kubectl apply -f manifest.yml
Note: You should see the draino deployment.
Verify that the GPU node health checks are running (Check the NDmv4 node description and look at the node events/conditions.
You can see the GpuNvlink, GpuXid and CpuCount conditions reporting normal status.
Now, to simulate a GPU node health check failure, we will drop one of the NDmv4 GPU’s.
nvidia-smi -i 00000001:00:00.0 -pm 0
nvidia-smi drain -p 0001:00:00.0 -m 1
Note: nvidia-ami will verify that there are 7 GPU’s (instead of the expected 8).
Check the NDmv4 node events/conditions (via node description). If shows that the GPU count test has failed, and the node has been automatically cordoned by draino (i.e. no pods can be scheduled to this node).
Some additional considerations
NPD is set to run periodically and can overlap with a customer’s job. The timing and type of GPU node health checks you run may affect how well the customer job performs. One possible strategy is to perform thorough node health checks on an empty cluster from time to time and to run some essential GPU node health checks that do not affect performance on regular intervals.
Conclusion
Fully automated GPU specific health checks integrated into AKS, that
identify unhealthy GPU nodes
cordon nodes
helps to improve the reliability of large AI supercomputers running training jobs. In this blog post we showed how to integrate GPU specific health checks into NPD and then have draino look for specific GPU failure conditions and take some action (e.g cordon/drain node).
Microsoft Tech Community – Latest Blogs –Read More
Update on MFA requirements for Azure sign-in
We would like to share an update on the announcement that Microsoft will require multi-factor authentication (MFA) for users signing into Azure. In this post, we share clarifications on the scope, timing and implementation details, along with guidance for preparation.
Timing
Enforcement for the MFA requirement at Azure sign-in will be rolled out in phases:
Phase 1: Starting in July 2024, enforcement for MFA at sign-in for Azure portal only will roll out gradually to all tenants. This phase will not impact any other Azure clients, such as Azure CLI, Azure PowerShell and IaC tools.
Phase 2: Starting in early 2025, enforcement for MFA at sign-in for Azure Command Line Interface (CLI), Azure PowerShell and Infrastructure as Code (IaC) tools will gradually roll out to all tenants.
For both phases, Microsoft will notify global admins about the expected enforcement date of your tenant(s) by email and through Azure Service Notifications, 60 days in advance. The countdown for enforcement for your tenant(s) does not begin until you have received this first notification from us. Additionally, we will send out periodic reminders to global admins at a regular cadence between the first notification and the beginning of enforcement for your tenant(s).
We will also allow a grace period for select customers with use cases where no workarounds are easily available and who need additional time (beyond the start date of enforcement for their tenants) to prepare for the MFA requirement at Azure sign-in. The first notification from us stating the enforcement date for your tenant(s) will also include a link to apply for the grace period. Additional details on customer types, use cases and scenarios that are eligible for grace period will be included in the notification.
Scope of enforcement
User accounts
We heard your feedback noting confusion about which users will be impacted by this requirement. We want to clarify that all users signing into the Azure portal, Azure CLI, Azure PowerShell and IaC tools, such as Azure Developer CLI, Bicep, Terraform and Ansible to perform any CRUD (Create, Read, Update, Delete) operation will require MFA when the enforcement begins. End users who are accessing apps, websites or services hosted on Azure, but not signing into the Azure portal, CLI or PowerShell, are not subject to this requirement from Microsoft. Authentication requirements for end users will still be controlled by the app, website or service owners.
We’d like to reenforce that Microsoft recommends adoption of MFA as one of the most fundamental security measures for all users given the growing intensity and sophistication of current Cyber-threats.
Automation accounts
Workload Identities, such as managed identities and service principals, will not be impacted by this enforcement. If you are leveraging user identities as a service account running automation (including scripts or other automated tasks), those will be required to use MFA once enforcement begins. Our guidance is that user identities are not recommended for automation and customers should migrate those to Workload Identities.
Implementation
This requirement for MFA at sign-in is implemented by Azure. Microsoft Entra ID sign-in logs will show it as the source of the MFA requirement.
This requirement will be implemented on top of any access policies you’ve configured in your tenant. For example, if your organization chose to retain Microsoft’s security defaults, and you currently have security defaults enabled, your users will see no change in behavior as MFA is already required for Azure management. If your tenant is using Conditional Access policies in Microsoft Entra and you already have a Conditional Access policy through which users sign into Azure with MFA, then your users will not see a change. Similarly, if you have existing more restrictive Conditional Access policies in place targeting Azure that require stronger authentication, such as phishing-resistant MFA, then those policies will continue to be enforced and your users will not see any changes.
Available MFA Methods
All supported MFA methods are available for you to use and there are no changes to the authentication method features as part of this requirement. Support for external MFA solutions is in public preview with external authentication methods, and can be used to meet the MFA requirement. The deprecated Conditional Access Custom Controls preview will not satisfy the MFA requirement, and you should migrate to the external authentication methods preview to use an external solution with Microsoft Entra ID.
If you are using a federated Identity Provider (IdP), such as Active Directory Federation Services, and your MFA provider is integrated directly with this federated identity provider, the Federated identity provider must send an MFA claim.
Identifying impacted Azure users in your tenant
You can use the resources below to help you identify which users are signing into Azure with and without MFA:
Use this PowerShell command to export a list of users and their auth methods: https://aka.ms/AzMFA
Use this Multifactor Authentication Gaps workbook: Multifactor Authentication Gaps workbook – Microsoft Entra ID | Microsoft Learn
Use these App IDs in your queries:
Azure portal: c44b4083-3bb0-49c1-b47d-974e53cbdf3c
Azure CLI: 04b07795-8ddb-461a-bbee-02f9e1bf7b46
Azure PowerShell: 1950a258-227b-4e31-a9cf-717495945fc2
Break glass accounts and special scenarios
We have heard your questions about break glass or “emergency access” accounts. We recommend updating these accounts to use FIDO2 or certificate-based authentication (when configured as MFA) instead of relying only on a long password. Both methods will satisfy the MFA requirements.
In addition, below are a few scenarios for which we are still working on developing guidance, and we will address these in an upcoming blog post scheduled for mid-August:
Organizations using privileged access management with delegation management, or other security approaches with additional security for accounts shared by multiple people.
Hands-on Azure learning and labs that utilize user identities created and deleted within a short timeframe.
Utilizing Azure APIs that require an Entra user identity or APIs that don’t support application permissions.
What you can do to get ready
We recommend setting up MFA now to secure your cloud resources. Keep users and data safe by setting up MFA with the MFA wizard for Microsoft Entra and learn more from the MFA deployment guide. If you’re using user identities for automation, start the process of migrating to managed identities or service principals.
We will continue to publish blog posts, articles and direct customer notifications regarding the requirement for MFA at Azure sign-in to help you effectively prepare and keep your cloud resources secure.
Thank you,
Naj Shahid and Greg Kinasewitz
Microsoft Tech Community – Latest Blogs –Read More
Similarity Search with FAISS and Azure SQL | Data Exposed
Learn how to leverage FAISS with Azure SQL for efficient similarity search. Discover how to integrate FAISS library with Azure SQL, enhancing your data retrieval with speed and precision. Learn from live demos and best practices to apply these techniques to your datasets.
Resources:
View/share our latest episodes on Microsoft Learn and YouTube!
Microsoft Tech Community – Latest Blogs –Read More
Return of handle, which was selected with ‘ButtonDownFcn’
Hey there,
I plotted some data in just one figure, after that, I want to select some plots by mouse in the figure and I want to highlight it by increasing the ‘LineWidth’ and get the information, which of the plotted object has been selected.
In my main script, I use the following code to call the function (dxf.handle contains all the handles, which have been plotted before):
selected_entities = sub_select(dxf.handle);
The function has the following code:
function selected_object = sub_select(H)
set(H, ‘ButtonDownFcn’, selected_object = @LineSelected)
end
function ObjectH = LineSelected(ObjectH, EventData)
set(ObjectH, ‘LineWidth’, 2.5);
end
In general the code works and it’s possible to highlight the objects, but I didn’t get the information, which handle was selected. This information should be stored in selected_entities. At the moment, I just get this:
selected_object = @LineSelected
Thanks in advance for your help.
Best regards
DanielHey there,
I plotted some data in just one figure, after that, I want to select some plots by mouse in the figure and I want to highlight it by increasing the ‘LineWidth’ and get the information, which of the plotted object has been selected.
In my main script, I use the following code to call the function (dxf.handle contains all the handles, which have been plotted before):
selected_entities = sub_select(dxf.handle);
The function has the following code:
function selected_object = sub_select(H)
set(H, ‘ButtonDownFcn’, selected_object = @LineSelected)
end
function ObjectH = LineSelected(ObjectH, EventData)
set(ObjectH, ‘LineWidth’, 2.5);
end
In general the code works and it’s possible to highlight the objects, but I didn’t get the information, which handle was selected. This information should be stored in selected_entities. At the moment, I just get this:
selected_object = @LineSelected
Thanks in advance for your help.
Best regards
Daniel Hey there,
I plotted some data in just one figure, after that, I want to select some plots by mouse in the figure and I want to highlight it by increasing the ‘LineWidth’ and get the information, which of the plotted object has been selected.
In my main script, I use the following code to call the function (dxf.handle contains all the handles, which have been plotted before):
selected_entities = sub_select(dxf.handle);
The function has the following code:
function selected_object = sub_select(H)
set(H, ‘ButtonDownFcn’, selected_object = @LineSelected)
end
function ObjectH = LineSelected(ObjectH, EventData)
set(ObjectH, ‘LineWidth’, 2.5);
end
In general the code works and it’s possible to highlight the objects, but I didn’t get the information, which handle was selected. This information should be stored in selected_entities. At the moment, I just get this:
selected_object = @LineSelected
Thanks in advance for your help.
Best regards
Daniel ‘buttondownfcn’ MATLAB Answers — New Questions
How do I find the phase for a periodic cos wave using fft?
I have a simple cos wave that has a period, in this case 6. I am offsetting the wave by an angular amount with phase. How can I use the fft function to recover back my initial phase offset? I tried converting the fourier transformed value with the highest amplitude (abs) which does correclty identify the period back to a phase using angle, but this never seems to work. If someone could enlighten me as to how to do this, I would be so grateful! (Edit: I would like to see how to correctly recover the original period as well)
n = 1e3;
a = linspace(0, 2*pi, n);
period = 6;
phase = rand * 2*pi;
f = rescale(cos((a-phase)*pr));I have a simple cos wave that has a period, in this case 6. I am offsetting the wave by an angular amount with phase. How can I use the fft function to recover back my initial phase offset? I tried converting the fourier transformed value with the highest amplitude (abs) which does correclty identify the period back to a phase using angle, but this never seems to work. If someone could enlighten me as to how to do this, I would be so grateful! (Edit: I would like to see how to correctly recover the original period as well)
n = 1e3;
a = linspace(0, 2*pi, n);
period = 6;
phase = rand * 2*pi;
f = rescale(cos((a-phase)*pr)); I have a simple cos wave that has a period, in this case 6. I am offsetting the wave by an angular amount with phase. How can I use the fft function to recover back my initial phase offset? I tried converting the fourier transformed value with the highest amplitude (abs) which does correclty identify the period back to a phase using angle, but this never seems to work. If someone could enlighten me as to how to do this, I would be so grateful! (Edit: I would like to see how to correctly recover the original period as well)
n = 1e3;
a = linspace(0, 2*pi, n);
period = 6;
phase = rand * 2*pi;
f = rescale(cos((a-phase)*pr)); fourier, fft, phase MATLAB Answers — New Questions
DP203 certificate not available on Learn profile
I appeared for DP 203 certification on June 18, 2024 and cleared the exam. I have also received confirmation email with the certification ID, but the certificate is not yet available on my Microsoft learn profile under Credentials.certification id.
Could you please check and upload the certificate to my profile. Please let me know if you want me to share the certification id or any other required detail.
I appeared for DP 203 certification on June 18, 2024 and cleared the exam. I have also received confirmation email with the certification ID, but the certificate is not yet available on my Microsoft learn profile under Credentials.certification id.Could you please check and upload the certificate to my profile. Please let me know if you want me to share the certification id or any other required detail. Read More
FY25 Monthly Training Services Partner Community Call Thread
We will use this thread to communicate updates (invites and links) for the monthly TSP Community Calls.
Thanks for joining us on yesterday’s June TSP Community Calls. You can now access the recording, deck, and transcripts in our temporary shared folder: https://aka.ms/TSPCC_June24. The last year of calls continue to live on the Learning Resources site: https://partner.microsoft.com/marketing/learning-resources#/
We will not have a July call. Our next call will be August 28th. Invites are attached.
We will use this thread to communicate updates (invites and links) for the monthly TSP Community Calls.
Thanks for joining us on yesterday’s June TSP Community Calls. You can now access the recording, deck, and transcripts in our temporary shared folder: https://aka.ms/TSPCC_June24. The last year of calls continue to live on the Learning Resources site: https://partner.microsoft.com/marketing/learning-resources#/
We will not have a July call. Our next call will be August 28th. Invites are attached. Read More
Multiple Bookings at the same time when there is not availability
Hello, We have been using microsoft bookings for a few years now and are able to usually work through the glitches it has from time to time, but we have not been able to find a solution for the current issue. Bookings is allowing customers to book 100’s of appointments for times that are already full. We have had to shut days off to help manage the issue, but it is becoming a bigger issue. I have submitted feedback through microsoft but have been unsuccessful. Can someone point me in the right direction? Thank you,
Rick
Hello, We have been using microsoft bookings for a few years now and are able to usually work through the glitches it has from time to time, but we have not been able to find a solution for the current issue. Bookings is allowing customers to book 100’s of appointments for times that are already full. We have had to shut days off to help manage the issue, but it is becoming a bigger issue. I have submitted feedback through microsoft but have been unsuccessful. Can someone point me in the right direction? Thank you,Rick Read More
Rota planner for staff
Hi working in transport. I have given myself a task to recreate rota for drivers some of my driver are working every other week 6 days (Monday to Saturday) Sunday off
Rest of them are working every 5 weeks Saturday with rest during the week some of them Tuesday, Wednesday or Thursday.
Question is how to create a rule for it in excel if for every tab I have month assign to it to populate the rule.
In perfect world I would have a rule in separate TAB to print off work schedule for each driver.
Hi working in transport. I have given myself a task to recreate rota for drivers some of my driver are working every other week 6 days (Monday to Saturday) Sunday offRest of them are working every 5 weeks Saturday with rest during the week some of them Tuesday, Wednesday or Thursday.Question is how to create a rule for it in excel if for every tab I have month assign to it to populate the rule.In perfect world I would have a rule in separate TAB to print off work schedule for each driver. Read More
Learning Pathways
Any update on when the Learning Pathways lookbook template will be available again? And when updated content for it will be available? I want to get it deployed to my demo tenant so I can show it to customers.
Any update on when the Learning Pathways lookbook template will be available again? And when updated content for it will be available? I want to get it deployed to my demo tenant so I can show it to customers. Read More
MFA Login does not Authenticate
I am trying to retrofit an existing C# asp.net appliction with an MFA login on Azure. I am able to get the MFA prompt, and I click on my account and the code successfully returns to the redirect URL. However, IsAuthenticated is never true and User.Identity.Name is always blank. I based my code on another MFA application for my company that works, but I can’t figure out why mine doesn’t. I then created a brand new app from scratch to see if I could figure out what went wrong. However, in the new app, IsAuthenticated is always true, both before login, after login and after logout, and yet User.Identity.Name is blank here as well, so the authentication is clearly not valid.
I have the most recent Owin DLLs installed, which at the time of this writing are mostly version 4.2.2. My code includes the usual MFA code found in many online examples. The Startup.cs file includes this code:
string clientId = ConfigurationManager.AppSettings[“ClientId”];
string tenantId = ConfigurationManager.AppSettings[“TenantId”];
string authority = “https://login.microsoftonline.com/” + tenantId + “/v2.0”;
string redirectURI = ConfigurationManager.AppSettings[“MFARedirect”];
string postLogoutRedirectUri = ConfigurationManager.AppSettings[“PostLogoutRedirectUri”];
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
ExpireTimeSpan = System.TimeSpan.FromMinutes(90),
CookieManager = new Microsoft.Owin.Host.SystemWeb.SystemWebChunkingCookieManager(),
Provider = new CookieAuthenticationProvider
{
OnResponseSignIn = (context) => context.Properties.ExpiresUtc = DateTime.UtcNow.AddMinutes(sessionTimeout.TotalMinutes),
},
SlidingExpiration = true,
CookieSecure = CookieSecureOption.Always
});
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,
RedirectUri = redirectURI,
UseTokenLifetime = false,
Scope = OpenIdConnectScope.OpenIdProfile,
ResponseType = OpenIdConnectResponseType.CodeIdToken,
Notifications = new OpenIdConnectAuthenticationNotifications()
{
AuthenticationFailed = OnAuthenticationFailed
}
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
The Login method in the Home Controller includes this code:
HttpContext.GetOwinContext().Authentication.Challenge(
new AuthenticationProperties { RedirectUri = redirectUri },
OpenIdConnectAuthenticationDefaults.AuthenticationType
);
I have tried many suggestions found on Google, but nothing has made any difference. If anybody has some insight as to what might be going on here, I would greatly appreciate any help I can get.
I am trying to retrofit an existing C# asp.net appliction with an MFA login on Azure. I am able to get the MFA prompt, and I click on my account and the code successfully returns to the redirect URL. However, IsAuthenticated is never true and User.Identity.Name is always blank. I based my code on another MFA application for my company that works, but I can’t figure out why mine doesn’t. I then created a brand new app from scratch to see if I could figure out what went wrong. However, in the new app, IsAuthenticated is always true, both before login, after login and after logout, and yet User.Identity.Name is blank here as well, so the authentication is clearly not valid. I have the most recent Owin DLLs installed, which at the time of this writing are mostly version 4.2.2. My code includes the usual MFA code found in many online examples. The Startup.cs file includes this code: string clientId = ConfigurationManager.AppSettings[“ClientId”];string tenantId = ConfigurationManager.AppSettings[“TenantId”];string authority = “https://login.microsoftonline.com/” + tenantId + “/v2.0”;string redirectURI = ConfigurationManager.AppSettings[“MFARedirect”];string postLogoutRedirectUri = ConfigurationManager.AppSettings[“PostLogoutRedirectUri”]; app.UseCookieAuthentication(new CookieAuthenticationOptions{AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,ExpireTimeSpan = System.TimeSpan.FromMinutes(90),CookieManager = new Microsoft.Owin.Host.SystemWeb.SystemWebChunkingCookieManager(),Provider = new CookieAuthenticationProvider{OnResponseSignIn = (context) => context.Properties.ExpiresUtc = DateTime.UtcNow.AddMinutes(sessionTimeout.TotalMinutes),},SlidingExpiration = true,CookieSecure = CookieSecureOption.Always});app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions{ClientId = clientId,Authority = authority,PostLogoutRedirectUri = postLogoutRedirectUri,RedirectUri = redirectURI,UseTokenLifetime = false,Scope = OpenIdConnectScope.OpenIdProfile,ResponseType = OpenIdConnectResponseType.CodeIdToken,Notifications = new OpenIdConnectAuthenticationNotifications(){AuthenticationFailed = OnAuthenticationFailed}}); app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); The Login method in the Home Controller includes this code: HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = redirectUri },OpenIdConnectAuthenticationDefaults.AuthenticationType); I have tried many suggestions found on Google, but nothing has made any difference. If anybody has some insight as to what might be going on here, I would greatly appreciate any help I can get. Read More
ECIF Funding Milestone Date Changes
Hi there – We’re working on an ECIF funded project and due to approval date being pushed back we were unable to start the project until a few days before the first milestone completion date. Our team was hoping to extend the date of the first milestone but we received feedback that we may lose the funding if the date is extended. Looking at the ECIF process documentation, it seems like if all milestones listed are completed in the same quarter then the changes are documented and approved by Microsoft, then an amendment isn’t required.
All approved milestone completion dates are in Q3 and if the milestone dates are extended the project will be still be completed in Q3.
How do milestone extensions on approved ECIF scopes work within the same quarter (and in general) and will we lose funding if we request an extension?
Hi there – We’re working on an ECIF funded project and due to approval date being pushed back we were unable to start the project until a few days before the first milestone completion date. Our team was hoping to extend the date of the first milestone but we received feedback that we may lose the funding if the date is extended. Looking at the ECIF process documentation, it seems like if all milestones listed are completed in the same quarter then the changes are documented and approved by Microsoft, then an amendment isn’t required. All approved milestone completion dates are in Q3 and if the milestone dates are extended the project will be still be completed in Q3. How do milestone extensions on approved ECIF scopes work within the same quarter (and in general) and will we lose funding if we request an extension? Read More
Partner Blog | How Microsoft partner Witivio is innovating with Microsoft Copilot
By Srini Raghavan, Vice President, Microsoft Teams Ecosystem
This is part five in a series of blogs where I’m sharing examples of how partners are innovating with Microsoft Copilot.
Microsoft Copilot has been generally available to enterprise customers for less than a year, and many independent software vendors (ISVs) are already discovering ways to use it to transform their business and enhance their offerings to customers. It’s thrilling to see such rapid progress from our partners.
At Microsoft, we share in the sense of excitement about advancing the potential of AI. But, as with any new tool, it’s crucial to plot the best path forward rather than simply adopting it to keep pace with industry trends. I recently spoke with a leader of one ISV in France who put it succinctly: Don’t build AI for the sake of AI. You must do it strategically and with intention.
It’s helpful advice, and it comes from Nicolas Humann, CEO, and co-founder of Witivio, a maker of apps and bots that improve employee experiences across HR, IT, internal communications, and more. Witivio has often served as an advisor to other French ISVs looking to integrate with Microsoft Teams. The company recently released their first Copilot extension, and they provided great insight for Microsoft partners looking to extend Copilot.
In this post, I’ll share Witivio’s experience, their guidance about what other developers can focus on during development, and their thoughts on getting the most out of Copilot.
Continue reading here
Microsoft Tech Community – Latest Blogs –Read More