Category: News
Wrong frequency and waveform distortion when reading 50Hz AC voltage using F29H85x ADC triggered by ePWM in Simulink
I have this ADC processing structure for the F29H85x in MATLAB to measure a 50Hz AC voltage. The ADC is triggered by an ePWM at a frequency of 10kHz, and the resulting sine wave is captured on the scope as shown. Please help me analyze the issue and give me solution. ThanksI have this ADC processing structure for the F29H85x in MATLAB to measure a 50Hz AC voltage. The ADC is triggered by an ePWM at a frequency of 10kHz, and the resulting sine wave is captured on the scope as shown. Please help me analyze the issue and give me solution. Thanks I have this ADC processing structure for the F29H85x in MATLAB to measure a 50Hz AC voltage. The ADC is triggered by an ePWM at a frequency of 10kHz, and the resulting sine wave is captured on the scope as shown. Please help me analyze the issue and give me solution. Thanks adc f29h85x MATLAB Answers — New Questions
Why can’t I use “end-2:end” for the meaning of last 2 columns?
Post Content Post Content tutorial MATLAB Answers — New Questions
datetime sometimes returns NaT and sometimes throws an error – what is the expected behaviour?
Sometimes datetime throws an error if it can’t return a valid datetime object from a string input:
dt = datetime(["2026_06" "2026_06_13"], Format = "yyyy_MM_dd")
and sometimes it returns NaT:
dt = datetime(["2026_06_13" "2026_06"], Format = "yyyy_MM_dd")
dt =
1×2 datetime array
2026_06_13 NaT
The second result is what I’d expect from the documentation. I’m having difficulty figuring out what the underlying rule is, since the two examples have the same input apart from the order and the same format. It seems to be to do with whether the first element of the array can be interpreted according to the format.
It looks like I have to put every call to datetime in a try-catch block and also test the result result for NaT, if I’m to detect any non-conforming input. This seems excessive – can anyone suggest a better way, or whether this is actually a bug I should try to report?Sometimes datetime throws an error if it can’t return a valid datetime object from a string input:
dt = datetime(["2026_06" "2026_06_13"], Format = "yyyy_MM_dd")
and sometimes it returns NaT:
dt = datetime(["2026_06_13" "2026_06"], Format = "yyyy_MM_dd")
dt =
1×2 datetime array
2026_06_13 NaT
The second result is what I’d expect from the documentation. I’m having difficulty figuring out what the underlying rule is, since the two examples have the same input apart from the order and the same format. It seems to be to do with whether the first element of the array can be interpreted according to the format.
It looks like I have to put every call to datetime in a try-catch block and also test the result result for NaT, if I’m to detect any non-conforming input. This seems excessive – can anyone suggest a better way, or whether this is actually a bug I should try to report? Sometimes datetime throws an error if it can’t return a valid datetime object from a string input:
dt = datetime(["2026_06" "2026_06_13"], Format = "yyyy_MM_dd")
and sometimes it returns NaT:
dt = datetime(["2026_06_13" "2026_06"], Format = "yyyy_MM_dd")
dt =
1×2 datetime array
2026_06_13 NaT
The second result is what I’d expect from the documentation. I’m having difficulty figuring out what the underlying rule is, since the two examples have the same input apart from the order and the same format. It seems to be to do with whether the first element of the array can be interpreted according to the format.
It looks like I have to put every call to datetime in a try-catch block and also test the result result for NaT, if I’m to detect any non-conforming input. This seems excessive – can anyone suggest a better way, or whether this is actually a bug I should try to report? datetime, datetime nat, datetime error MATLAB Answers — New Questions
solve system of 6
% Define symbolic variables
syms g alpha1 alpha2 sigma c b s1 s2 beta2 E1 U
% Use 0.5 instead of 0.1e1 ./ 0.2e1 for clarity
g_plus_half = g + 0.5;
g_minus_half = g – 0.5;
row1 = [2, 2, 2*besselk(g_plus_half, alpha1), 2*besselk(g_plus_half, alpha2), 2*besseli(g_plus_half, alpha1), 2*besseli(g_plus_half, alpha2)];
row2 = [-7, 2, …
(-3*alpha1*besselk(g_minus_half, alpha1) – besselk(g_plus_half, alpha1)*sigma – 7*besselk(g_plus_half, alpha1)), …
(-3*alpha2*besselk(g_minus_half, alpha2) – besselk(g_plus_half, alpha2)*sigma – 7*besselk(g_plus_half, alpha2)), …
(3*alpha1*besseli(g_minus_half, alpha1) – besseli(g_plus_half, alpha1)*sigma – 7*besseli(g_plus_half, alpha1)), …
(3*alpha2*besseli(g_minus_half, alpha2) – besseli(g_plus_half, alpha2)*sigma – 7*besseli(g_plus_half, alpha2))];
% Simplified row3
term1 = (alpha1^2 * c + alpha1^2 – sigma) / (2*c);
term2 = (alpha2^2 * c + alpha2^2 – sigma) / (2*c);
row3 = [0, 0, …
term1 * (besselk(g_plus_half, alpha1)*beta2*s1*s2 + alpha1*beta2*s1*besselk(g_minus_half, alpha1) + 2*besselk(g_plus_half, alpha1)*beta2*s1 + besselk(g_plus_half, alpha1)), …
term2 * (besselk(g_plus_half, alpha2)*beta2*s1*s2 + alpha2*beta2*s1*besselk(g_minus_half, alpha2) + 2*besselk(g_plus_half, alpha2)*beta2*s1 + besselk(g_plus_half, alpha2)), …
term1 * (besseli(g_plus_half, alpha1)*beta2*s1*s2 – alpha1*beta2*s1*besseli(g_minus_half, alpha1) + 2*besseli(g_plus_half, alpha1)*beta2*s1 + besseli(g_plus_half, alpha1)), …
term2 * (besseli(g_plus_half, alpha2)*beta2*s1*s2 – alpha2*beta2*s1*besseli(g_minus_half, alpha2) + 2*besseli(g_plus_half, alpha2)*beta2*s1 + besseli(g_plus_half, alpha2))];
row4 = [2/(b^3), 2, 2*besselk(g_plus_half, b*alpha1)*b^(-1.5), 2*besselk(g_plus_half, b*alpha2)*b^(-1.5), 2*besseli(g_plus_half, b*alpha1)*b^(-1.5), 2*besseli(g_plus_half, b*alpha2)*b^(-1.5)];
row5 = [-1/(b^3), 2, …
-(alpha1*besselk(g_minus_half, b*alpha1)*b + besselk(g_plus_half, b*alpha1))*b^(-1.5), …
-(alpha2*besselk(g_minus_half, b*alpha2)*b + besselk(g_plus_half, b*alpha2))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha1)*alpha1*b + besseli(g_plus_half, b*alpha1))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha2)*alpha2*b + besseli(g_plus_half, b*alpha2))*b^(-1.5)];
row6 = [0, 0, …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha2) / (2*c) * b^(-2.5), …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha2) / (2*c) * b^(-2.5)];
% Assemble matrix
A = [row1; row2; row3; row4; row5; row6];
% Rename ‘b’ to ‘rhs’ to avoid conflict
rhs = [-U; U; 0; 0; 0; 0];
% Solve symbolically
sol = linsolve(A, rhs);% Define symbolic variables
syms g alpha1 alpha2 sigma c b s1 s2 beta2 E1 U
% Use 0.5 instead of 0.1e1 ./ 0.2e1 for clarity
g_plus_half = g + 0.5;
g_minus_half = g – 0.5;
row1 = [2, 2, 2*besselk(g_plus_half, alpha1), 2*besselk(g_plus_half, alpha2), 2*besseli(g_plus_half, alpha1), 2*besseli(g_plus_half, alpha2)];
row2 = [-7, 2, …
(-3*alpha1*besselk(g_minus_half, alpha1) – besselk(g_plus_half, alpha1)*sigma – 7*besselk(g_plus_half, alpha1)), …
(-3*alpha2*besselk(g_minus_half, alpha2) – besselk(g_plus_half, alpha2)*sigma – 7*besselk(g_plus_half, alpha2)), …
(3*alpha1*besseli(g_minus_half, alpha1) – besseli(g_plus_half, alpha1)*sigma – 7*besseli(g_plus_half, alpha1)), …
(3*alpha2*besseli(g_minus_half, alpha2) – besseli(g_plus_half, alpha2)*sigma – 7*besseli(g_plus_half, alpha2))];
% Simplified row3
term1 = (alpha1^2 * c + alpha1^2 – sigma) / (2*c);
term2 = (alpha2^2 * c + alpha2^2 – sigma) / (2*c);
row3 = [0, 0, …
term1 * (besselk(g_plus_half, alpha1)*beta2*s1*s2 + alpha1*beta2*s1*besselk(g_minus_half, alpha1) + 2*besselk(g_plus_half, alpha1)*beta2*s1 + besselk(g_plus_half, alpha1)), …
term2 * (besselk(g_plus_half, alpha2)*beta2*s1*s2 + alpha2*beta2*s1*besselk(g_minus_half, alpha2) + 2*besselk(g_plus_half, alpha2)*beta2*s1 + besselk(g_plus_half, alpha2)), …
term1 * (besseli(g_plus_half, alpha1)*beta2*s1*s2 – alpha1*beta2*s1*besseli(g_minus_half, alpha1) + 2*besseli(g_plus_half, alpha1)*beta2*s1 + besseli(g_plus_half, alpha1)), …
term2 * (besseli(g_plus_half, alpha2)*beta2*s1*s2 – alpha2*beta2*s1*besseli(g_minus_half, alpha2) + 2*besseli(g_plus_half, alpha2)*beta2*s1 + besseli(g_plus_half, alpha2))];
row4 = [2/(b^3), 2, 2*besselk(g_plus_half, b*alpha1)*b^(-1.5), 2*besselk(g_plus_half, b*alpha2)*b^(-1.5), 2*besseli(g_plus_half, b*alpha1)*b^(-1.5), 2*besseli(g_plus_half, b*alpha2)*b^(-1.5)];
row5 = [-1/(b^3), 2, …
-(alpha1*besselk(g_minus_half, b*alpha1)*b + besselk(g_plus_half, b*alpha1))*b^(-1.5), …
-(alpha2*besselk(g_minus_half, b*alpha2)*b + besselk(g_plus_half, b*alpha2))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha1)*alpha1*b + besseli(g_plus_half, b*alpha1))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha2)*alpha2*b + besseli(g_plus_half, b*alpha2))*b^(-1.5)];
row6 = [0, 0, …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha2) / (2*c) * b^(-2.5), …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha2) / (2*c) * b^(-2.5)];
% Assemble matrix
A = [row1; row2; row3; row4; row5; row6];
% Rename ‘b’ to ‘rhs’ to avoid conflict
rhs = [-U; U; 0; 0; 0; 0];
% Solve symbolically
sol = linsolve(A, rhs); % Define symbolic variables
syms g alpha1 alpha2 sigma c b s1 s2 beta2 E1 U
% Use 0.5 instead of 0.1e1 ./ 0.2e1 for clarity
g_plus_half = g + 0.5;
g_minus_half = g – 0.5;
row1 = [2, 2, 2*besselk(g_plus_half, alpha1), 2*besselk(g_plus_half, alpha2), 2*besseli(g_plus_half, alpha1), 2*besseli(g_plus_half, alpha2)];
row2 = [-7, 2, …
(-3*alpha1*besselk(g_minus_half, alpha1) – besselk(g_plus_half, alpha1)*sigma – 7*besselk(g_plus_half, alpha1)), …
(-3*alpha2*besselk(g_minus_half, alpha2) – besselk(g_plus_half, alpha2)*sigma – 7*besselk(g_plus_half, alpha2)), …
(3*alpha1*besseli(g_minus_half, alpha1) – besseli(g_plus_half, alpha1)*sigma – 7*besseli(g_plus_half, alpha1)), …
(3*alpha2*besseli(g_minus_half, alpha2) – besseli(g_plus_half, alpha2)*sigma – 7*besseli(g_plus_half, alpha2))];
% Simplified row3
term1 = (alpha1^2 * c + alpha1^2 – sigma) / (2*c);
term2 = (alpha2^2 * c + alpha2^2 – sigma) / (2*c);
row3 = [0, 0, …
term1 * (besselk(g_plus_half, alpha1)*beta2*s1*s2 + alpha1*beta2*s1*besselk(g_minus_half, alpha1) + 2*besselk(g_plus_half, alpha1)*beta2*s1 + besselk(g_plus_half, alpha1)), …
term2 * (besselk(g_plus_half, alpha2)*beta2*s1*s2 + alpha2*beta2*s1*besselk(g_minus_half, alpha2) + 2*besselk(g_plus_half, alpha2)*beta2*s1 + besselk(g_plus_half, alpha2)), …
term1 * (besseli(g_plus_half, alpha1)*beta2*s1*s2 – alpha1*beta2*s1*besseli(g_minus_half, alpha1) + 2*besseli(g_plus_half, alpha1)*beta2*s1 + besseli(g_plus_half, alpha1)), …
term2 * (besseli(g_plus_half, alpha2)*beta2*s1*s2 – alpha2*beta2*s1*besseli(g_minus_half, alpha2) + 2*besseli(g_plus_half, alpha2)*beta2*s1 + besseli(g_plus_half, alpha2))];
row4 = [2/(b^3), 2, 2*besselk(g_plus_half, b*alpha1)*b^(-1.5), 2*besselk(g_plus_half, b*alpha2)*b^(-1.5), 2*besseli(g_plus_half, b*alpha1)*b^(-1.5), 2*besseli(g_plus_half, b*alpha2)*b^(-1.5)];
row5 = [-1/(b^3), 2, …
-(alpha1*besselk(g_minus_half, b*alpha1)*b + besselk(g_plus_half, b*alpha1))*b^(-1.5), …
-(alpha2*besselk(g_minus_half, b*alpha2)*b + besselk(g_plus_half, b*alpha2))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha1)*alpha1*b + besseli(g_plus_half, b*alpha1))*b^(-1.5), …
-(-besseli(g_minus_half, b*alpha2)*alpha2*b + besseli(g_plus_half, b*alpha2))*b^(-1.5)];
row6 = [0, 0, …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besselk(g_plus_half, b*alpha2) / (2*c) * b^(-2.5), …
(alpha1^2*b^2*c + alpha1^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha1) / (2*c) * b^(-2.5), …
(alpha2^2*b^2*c + alpha2^2*b^2 – b^2*sigma) * besseli(g_plus_half, b*alpha2) / (2*c) * b^(-2.5)];
% Assemble matrix
A = [row1; row2; row3; row4; row5; row6];
% Rename ‘b’ to ‘rhs’ to avoid conflict
rhs = [-U; U; 0; 0; 0; 0];
% Solve symbolically
sol = linsolve(A, rhs); solve system MATLAB Answers — New Questions
Please help me to solve two nonlinear algebraic equations
eq1 = b5*L1^2 + (b9 + b7)*L1 + b6*L2^2 + b10*L2 + b8 = 0:
eq2 = b27*L1^4 – b32*L1^3 + b33*L1^2 – b34*L1 …
+ b28*L2^4 – b35*L2^3 + b36*L2^2 – b37*L2 …
+ (b39 – b38 + b30 – b29 – b31) = 0:
%Solve the system for L1 and L2
solutions = solve({eq1, eq2}, {L1, L2}):eq1 = b5*L1^2 + (b9 + b7)*L1 + b6*L2^2 + b10*L2 + b8 = 0:
eq2 = b27*L1^4 – b32*L1^3 + b33*L1^2 – b34*L1 …
+ b28*L2^4 – b35*L2^3 + b36*L2^2 – b37*L2 …
+ (b39 – b38 + b30 – b29 – b31) = 0:
%Solve the system for L1 and L2
solutions = solve({eq1, eq2}, {L1, L2}): eq1 = b5*L1^2 + (b9 + b7)*L1 + b6*L2^2 + b10*L2 + b8 = 0:
eq2 = b27*L1^4 – b32*L1^3 + b33*L1^2 – b34*L1 …
+ b28*L2^4 – b35*L2^3 + b36*L2^2 – b37*L2 …
+ (b39 – b38 + b30 – b29 – b31) = 0:
%Solve the system for L1 and L2
solutions = solve({eq1, eq2}, {L1, L2}): solve MATLAB Answers — New Questions
To generate vertice mesh from a series of contours
Hello,
As beginner in MATLAB, now I have a series of contours, which define a structure. On each contour there are isolated points whose cartesian coordinates are known. Now I would like to generate a mesh from these contours (or points). The _MyRobustCrust.m_ from file exchange does generate a mesh with faces, but without vertices’ coordinates. And the vertices are needed for my calculation.
Does any one have any hints? Thank you very much.
ErhongHello,
As beginner in MATLAB, now I have a series of contours, which define a structure. On each contour there are isolated points whose cartesian coordinates are known. Now I would like to generate a mesh from these contours (or points). The _MyRobustCrust.m_ from file exchange does generate a mesh with faces, but without vertices’ coordinates. And the vertices are needed for my calculation.
Does any one have any hints? Thank you very much.
Erhong Hello,
As beginner in MATLAB, now I have a series of contours, which define a structure. On each contour there are isolated points whose cartesian coordinates are known. Now I would like to generate a mesh from these contours (or points). The _MyRobustCrust.m_ from file exchange does generate a mesh with faces, but without vertices’ coordinates. And the vertices are needed for my calculation.
Does any one have any hints? Thank you very much.
Erhong mesh, face, vertices MATLAB Answers — New Questions
how to mesh a geometry from matlab in gmsh
hi…
as part of my final project i have created the geometry of the cross section of a dam, in matlab, using an isogeometric numerical method code….
i have been asked to use the control points of this geometry, to mesh it on gmsh software, so that to compare the 2 methods, by finding the nodal coordinates and the connective matrix from the gmsh…
i have never used a meshing software before and i am a bit unfamiliar with the concepts of nodal coordinates and connective matrix i am supposed to find….
i know this is a more gmsh and finite element related question, however i would appreciate any help from this blog….
thanks in advance!hi…
as part of my final project i have created the geometry of the cross section of a dam, in matlab, using an isogeometric numerical method code….
i have been asked to use the control points of this geometry, to mesh it on gmsh software, so that to compare the 2 methods, by finding the nodal coordinates and the connective matrix from the gmsh…
i have never used a meshing software before and i am a bit unfamiliar with the concepts of nodal coordinates and connective matrix i am supposed to find….
i know this is a more gmsh and finite element related question, however i would appreciate any help from this blog….
thanks in advance! hi…
as part of my final project i have created the geometry of the cross section of a dam, in matlab, using an isogeometric numerical method code….
i have been asked to use the control points of this geometry, to mesh it on gmsh software, so that to compare the 2 methods, by finding the nodal coordinates and the connective matrix from the gmsh…
i have never used a meshing software before and i am a bit unfamiliar with the concepts of nodal coordinates and connective matrix i am supposed to find….
i know this is a more gmsh and finite element related question, however i would appreciate any help from this blog….
thanks in advance! finite elements, meshing, comparing numerical methods MATLAB Answers — New Questions
creating mesh from geo file in gmsh using matlab?
Hello All,
I am trying to create a mesh file from a geo file that is created by MATLAB.
Can I directly call gmsh and do meshing through some command in MATLAB?
I have seen few examples but not so clear. It will be great if someone can help me to do the meshing.
I have attached my geo file. Its a txt version.
Thanking you in advance,
kmHello All,
I am trying to create a mesh file from a geo file that is created by MATLAB.
Can I directly call gmsh and do meshing through some command in MATLAB?
I have seen few examples but not so clear. It will be great if someone can help me to do the meshing.
I have attached my geo file. Its a txt version.
Thanking you in advance,
km Hello All,
I am trying to create a mesh file from a geo file that is created by MATLAB.
Can I directly call gmsh and do meshing through some command in MATLAB?
I have seen few examples but not so clear. It will be great if someone can help me to do the meshing.
I have attached my geo file. Its a txt version.
Thanking you in advance,
km gmsh, mesh, workspace MATLAB Answers — New Questions
How can I generate a mesh of quadrilaterals for a given 2D surface using MATLAB?
Does somebody know, how to simply and theoretically generate a mesh of quadrilaterals on a given surface?
The surface is in the x,y-plane and might also have curved borders.
I have searched on google and found like tons and tons of informations and also free software to take over this Job, but I really would like to know, how I can generate a mesh of quadrilateral elements which corresponds to a given surface just on my own.
So where is the best place to start? I need to develop my own understanding and also my own spaghetti code for this task.
Given the borders of and the interior of a 2D surface, how or where should I start in order to get my ‘new’ vertices on the interior of the surface? How do I know, how many quadrilateral elements and corresponding vertices do I need?
Thank you for your help and support in advance.
Regards
Ahmed HossamDoes somebody know, how to simply and theoretically generate a mesh of quadrilaterals on a given surface?
The surface is in the x,y-plane and might also have curved borders.
I have searched on google and found like tons and tons of informations and also free software to take over this Job, but I really would like to know, how I can generate a mesh of quadrilateral elements which corresponds to a given surface just on my own.
So where is the best place to start? I need to develop my own understanding and also my own spaghetti code for this task.
Given the borders of and the interior of a 2D surface, how or where should I start in order to get my ‘new’ vertices on the interior of the surface? How do I know, how many quadrilateral elements and corresponding vertices do I need?
Thank you for your help and support in advance.
Regards
Ahmed Hossam Does somebody know, how to simply and theoretically generate a mesh of quadrilaterals on a given surface?
The surface is in the x,y-plane and might also have curved borders.
I have searched on google and found like tons and tons of informations and also free software to take over this Job, but I really would like to know, how I can generate a mesh of quadrilateral elements which corresponds to a given surface just on my own.
So where is the best place to start? I need to develop my own understanding and also my own spaghetti code for this task.
Given the borders of and the interior of a 2D surface, how or where should I start in order to get my ‘new’ vertices on the interior of the surface? How do I know, how many quadrilateral elements and corresponding vertices do I need?
Thank you for your help and support in advance.
Regards
Ahmed Hossam finite elements, meshing, quadrilateral meshes, surface, 2d MATLAB Answers — New Questions
How do I access all the advanced printer settings in Matlab 2026a?
How do I access all the advanced settings of a printer in 2026a? The dialog box only gives me a small subset. I had no issues accessing these settings in 2024aHow do I access all the advanced settings of a printer in 2026a? The dialog box only gives me a small subset. I had no issues accessing these settings in 2024a How do I access all the advanced settings of a printer in 2026a? The dialog box only gives me a small subset. I had no issues accessing these settings in 2024a printing, figures, printer settings MATLAB Answers — New Questions
Integral from a function that has a singularity
Hello
I want to take an integral from the function that has a singularity(pole), by quadgk but this common don’t give a right answer .for instance an integral of the function 1/(x-1) from(-2,2)
anyone can guide me
thanksHello
I want to take an integral from the function that has a singularity(pole), by quadgk but this common don’t give a right answer .for instance an integral of the function 1/(x-1) from(-2,2)
anyone can guide me
thanks Hello
I want to take an integral from the function that has a singularity(pole), by quadgk but this common don’t give a right answer .for instance an integral of the function 1/(x-1) from(-2,2)
anyone can guide me
thanks quadgk-numerical integral-singularity MATLAB Answers — New Questions
LOW INERTIA SYNCHRONOUS GENERATOR INSTABILITY
I have an HVDC system. The terminals include an HVDC inverter 1000MW rated, a RES 1000MW rated, another inverter 500MW, a load and a generator using synchronous machine. When i use a machine rating at 1000 MVA, everything works. When i try to reduce the rating to 500MVA maximum, in order to have a case where a country is in its critical case of lower inertia, i get instability when both inverters (1000MW and 500MW) are connected to the system. when i disconnect one of them the system is stable. For the synchronous machine i only changed the Rated power and the transformer voltage to scale down. not the H etc.
Does anyone know how can i fix this?I have an HVDC system. The terminals include an HVDC inverter 1000MW rated, a RES 1000MW rated, another inverter 500MW, a load and a generator using synchronous machine. When i use a machine rating at 1000 MVA, everything works. When i try to reduce the rating to 500MVA maximum, in order to have a case where a country is in its critical case of lower inertia, i get instability when both inverters (1000MW and 500MW) are connected to the system. when i disconnect one of them the system is stable. For the synchronous machine i only changed the Rated power and the transformer voltage to scale down. not the H etc.
Does anyone know how can i fix this? I have an HVDC system. The terminals include an HVDC inverter 1000MW rated, a RES 1000MW rated, another inverter 500MW, a load and a generator using synchronous machine. When i use a machine rating at 1000 MVA, everything works. When i try to reduce the rating to 500MVA maximum, in order to have a case where a country is in its critical case of lower inertia, i get instability when both inverters (1000MW and 500MW) are connected to the system. when i disconnect one of them the system is stable. For the synchronous machine i only changed the Rated power and the transformer voltage to scale down. not the H etc.
Does anyone know how can i fix this? simpowersystems, synchronous generator, inertia, simulink, power_electronics_control MATLAB Answers — New Questions
Innerjoin when a table contains user-defined objects
I have two tables that I wish to innerjoin() according to the topThick and botThick columns, which are the same in both tables. Why does this fail when Tright contains a column with objects of a user-defined class (here, myclass)?
load testdata
Tleft, Tright
innerjoin(Tleft, Tright)I have two tables that I wish to innerjoin() according to the topThick and botThick columns, which are the same in both tables. Why does this fail when Tright contains a column with objects of a user-defined class (here, myclass)?
load testdata
Tleft, Tright
innerjoin(Tleft, Tright) I have two tables that I wish to innerjoin() according to the topThick and botThick columns, which are the same in both tables. Why does this fail when Tright contains a column with objects of a user-defined class (here, myclass)?
load testdata
Tleft, Tright
innerjoin(Tleft, Tright) table, innerjoin MATLAB Answers — New Questions
using imaginary notation gives an error (-J)
Hi,
I am fairly new to matlab but used it years ago and have forgotten a lot.
I have downloaded an m file which should work but provides an error when encountering the following line of code.
u2=-J*u2.*q1; and there are two carrots underneath the "q1".
Can someone provide a suggestion as to how to interpret this error?
Thank You
TomHi,
I am fairly new to matlab but used it years ago and have forgotten a lot.
I have downloaded an m file which should work but provides an error when encountering the following line of code.
u2=-J*u2.*q1; and there are two carrots underneath the "q1".
Can someone provide a suggestion as to how to interpret this error?
Thank You
Tom Hi,
I am fairly new to matlab but used it years ago and have forgotten a lot.
I have downloaded an m file which should work but provides an error when encountering the following line of code.
u2=-J*u2.*q1; and there are two carrots underneath the "q1".
Can someone provide a suggestion as to how to interpret this error?
Thank You
Tom imaginary -j MATLAB Answers — New Questions
Microsoft to Delete Unlicensed OneDrive for Business Accounts
Removal Happens for Unlicensed OneDrive for Business Accounts after the 365th Unpaid Day
Microsoft’s June 5 (updated June 9) announcement (MC1381110) that unlicensed OneDrive for Business accounts will be deleted after 365 days if their storage is not paid for not unexpected. Two years ago, Microsoft announced a plan to move unlicensed OneDrive for Business accounts into Microsoft 365 Archive and set out how tenants could pay for the archived accounts through an Azure subscription.
The move to archive unlicensed OneDrive for Business accounts was followed by the provision of a report in the SharePoint admin center to list unlicensed OneDrive for Business accounts. MC1381110 is the logical next step in the process by setting out how long Microsoft will keep OneDrive data for when it’s not paid for.
The new arrangement does not apply to education or government tenants. Deployment is likely to be staggered across Microsoft, so the exact date when Microsoft will delete unpaid for OneDrive for Business accounts will differ from tenant to tenant.
Reviewing Unlicensed OneDrive for Business Accounts
The current version of the unlicensed OneDrive for Business accounts report includes an option to view why the unlicensed accounts exist. Figure 1 shows many unlicensed accounts (from a few years ago) that are still archived because of Data lifecycle management retention policies or labels, including “retention policy, active lock”, which is probably because a retention policy with a preservation lock applies to the account.

If, like me, you’ve been content to let unlicensed OneDrive for Business accounts accumulate waiting for their retention periods to expire and the eventual removal of the accounts, things have changed and a different strategy is needed,
Ignoring Retention and eDiscovery
As explained in Microsoft’s documentation, “After 12 months of Unpaid storage/archive the OneDrive Data might be deleted regardless of Retention settings, retention policies, eDiscovery, and all holds.” Microsoft will wait for accounts to notch up 365 days of unpaid archival. Once that period lapses, Microsoft can delete the data without further warning. It’s interesting that Microsoft says that accounts “might be deleted” rather than the more emphatic “will be deleted.” I imagine that the latter is more likely.
There’s nothing to say that the deletion is permanent and irrecoverable, but I assume that this is the case. After all, if administrators don’t move to preserve content in a year days after license removal, the data probably isn’t much use.
It’s entirely reasonable that Microsoft should create a deadline for keeping unpaid for OneDrive for Business accounts in Microsoft 365 archive. We’re now 15 years into the Office 365 journey, and the number of unpaid for accounts that must be hanging around, cluttering up valuable storage, must be massive. Microsoft is now forcing tenants to decide what data they wish to keep (and pay for) and what they are happy to lose through automatic deletion.
The bottom line is that once the new regime becomes effective in early July 2026, unpaid OneDrive for Business accounts will be deleted after 365 days following license removal. For example, most of the accounts listed in Figure 1 will be removed even though the accounts are currently kept due to retention policies or by holds for eDiscovery cases. Overriding retention and holds to force deletion is the big difference between what happens now and what will happen after July 2026.
Does Valuable Information Exist in Unpaid OneDrive Accounts?
Those who look after data governance strategies for Microsoft 365 tenants might worry about the enforced removal of unpaid for accounts. I am more sanguine because I think that the amount of valuable data in these accounts that an organization might want to recover and keep is probably low. Besides, the accounts are now archived and inaccessible unless an administrator restores accounts to make them available online, so what you don’t know about, you don’t miss.
The Microsoft 365 account deletion workflow allows access to be granted to OneDrive for Business accounts for users that are being deleted. That’s supposed to be the way that organizations harvest information from OneDrive before account deletion. The unfortunate thing is that Microsoft uses OneDrive for Business to stuff so much stuff from so many applications that it’s harder to review everything.
Moving to Retain OneDrive for Business Accounts
The bottom line is that organizations can no longer afford to ignore archived OneDrive for Business accounts. Either the organization accepts that accounts are removed automatically or they enable billing for archived OneDrive for Business accounts (Figure 2) and mark which accounts they’re willing to pay for.

A good first step is to review the unlicensed OneDrive accounts report to understand how many (if any) of the unlicensed accounts you need to keep. The results will guide your next step to leave automatic deletion happen or to start paying for archived accounts.
The new arrangement effectively establishes a commercial (paid) boundary for compliance retention. No matter how you configure retention policies, OneDrive for Business data can only be retained so long as the associated storage is funded by being licensed through an Entra ID account or paying to store the account in Microsoft 365 Archive. I don’t think this will be a major source of new revenue for Microsoft, but it should help everyone by clearing out digital debris that has hung around Microsoft 365 for probably far too long.
The nice thing about generative AI tools is that they can generate information based on what’s gone before. The bad thing about generative AI tools is that they can’t create new thinking or insights about how technology works (or doesn’t). When we write the Office 365 for IT Pros and Automating Microsoft 365 with PowerShell eBooks, we depend on hundreds of years of real-world experience, knowledge, and intuition to analyze and explain how Microsoft 365 really works. If you understand the basic principles about Entra ID, Exchange Online, SharePoint Online, Teams, the Microsoft Graph, and more, you’ll be able to figure out the value of new features as Microsoft adds them to the platform. All for less than ten copies of black coffee.
Why is MATLAB slow after moving files to network drive?
The execution time in MATLAB is much longer when executed from a network drive compared to a local directory. For example, "genpath" takes a few seconds from a local directory, but it takes several minutes from a network drive.
Why is MATLAB slow during startup and when performing specific operations, such as "genpath", after moving files to a network drive?The execution time in MATLAB is much longer when executed from a network drive compared to a local directory. For example, "genpath" takes a few seconds from a local directory, but it takes several minutes from a network drive.
Why is MATLAB slow during startup and when performing specific operations, such as "genpath", after moving files to a network drive? The execution time in MATLAB is much longer when executed from a network drive compared to a local directory. For example, "genpath" takes a few seconds from a local directory, but it takes several minutes from a network drive.
Why is MATLAB slow during startup and when performing specific operations, such as "genpath", after moving files to a network drive? slow, matalb, network, files MATLAB Answers — New Questions
every restart of Matlab path is lost
where is may pathdef directorywhere is may pathdef directory where is may pathdef directory pathdef MATLAB Answers — New Questions
starting matlab after intall on linux
Iam using Debian. I just installed matlab 2026a. It seemed that everything was fine during installation.
When I try to start matlab, I see a flu window. In front of that window I see a blue small page writing MATLAB. It does not go away and I cannot use matlab. How can I solve this?Iam using Debian. I just installed matlab 2026a. It seemed that everything was fine during installation.
When I try to start matlab, I see a flu window. In front of that window I see a blue small page writing MATLAB. It does not go away and I cannot use matlab. How can I solve this? Iam using Debian. I just installed matlab 2026a. It seemed that everything was fine during installation.
When I try to start matlab, I see a flu window. In front of that window I see a blue small page writing MATLAB. It does not go away and I cannot use matlab. How can I solve this? starting matlab, linux MATLAB Answers — New Questions
It seems like Simulation of Cubesat and eclipse time is not correct
Hello,
I am extending the the cubesat simulation project [open(‘asbCubeSatVehicleTemplate.sltx’)] template with some functions. Therefore I need to know if the sun is in view or not. Fortunately there is a block that calculates it and gives out 1 when sun is in view and 0 when it is not.
But it seems like this is not correct when I compare the boolean to the visualization.
I simulated half an orbit on the dark side of the earth, but in the middle of the simulation the satellite sees the sun again.
Can someone help me to fix this problem mathematecally or doas the visualization is not correct?
Best regards.Hello,
I am extending the the cubesat simulation project [open(‘asbCubeSatVehicleTemplate.sltx’)] template with some functions. Therefore I need to know if the sun is in view or not. Fortunately there is a block that calculates it and gives out 1 when sun is in view and 0 when it is not.
But it seems like this is not correct when I compare the boolean to the visualization.
I simulated half an orbit on the dark side of the earth, but in the middle of the simulation the satellite sees the sun again.
Can someone help me to fix this problem mathematecally or doas the visualization is not correct?
Best regards. Hello,
I am extending the the cubesat simulation project [open(‘asbCubeSatVehicleTemplate.sltx’)] template with some functions. Therefore I need to know if the sun is in view or not. Fortunately there is a block that calculates it and gives out 1 when sun is in view and 0 when it is not.
But it seems like this is not correct when I compare the boolean to the visualization.
I simulated half an orbit on the dark side of the earth, but in the middle of the simulation the satellite sees the sun again.
Can someone help me to fix this problem mathematecally or doas the visualization is not correct?
Best regards. cubesat, aerospace toolbox, sun in view, cubesat simulation project MATLAB Answers — New Questions
MATLAB Randomly Changes Values in Array to Scientific Notation
I have a script that reads inputs from an excel file, then stores specific arrays that I need, as different variables.
These will later need to be written to an output txt file along with other strings (this output needs to be a specific format so it can feed an executable).
My problem is that when I read the data from the excel file, MATLAB keeps changing only two of the values to scientific notation.
My code is structured like so:
DATAINEED = readtable(fullfile(input_location,filename));
array1 = unique(DATAINEED.array1);
array2 = unique(DATAINEED.array2);
My problem is MATLAB then stores "array1" like so when I open the variable:
1000
2000
3000
4e+03
5000
6e+03
If I type "array1" in the command window, it prints out just fine (1000, 2000, 3000, 4000…etc.)
The problem is, if I try to print the variable along with another string so it can feed into the text file, it keeps that weird scientific notation for the couple of values.
I’m using the following code:
OutputRow1 = "array1 has: "+sprintf(‘%d ‘,array1’);
This results in:
OutputRow1 =
"array1 has: 1000 2000 3000 4e+03 5000 6e+03"
Array 2 is completely fine (also an array of numbers, but not in the thousands). I’ve tried format short g and long g, doesn’t help. Wondering if anyone has any insights, suggestions or other ways to accomplish what I need.I have a script that reads inputs from an excel file, then stores specific arrays that I need, as different variables.
These will later need to be written to an output txt file along with other strings (this output needs to be a specific format so it can feed an executable).
My problem is that when I read the data from the excel file, MATLAB keeps changing only two of the values to scientific notation.
My code is structured like so:
DATAINEED = readtable(fullfile(input_location,filename));
array1 = unique(DATAINEED.array1);
array2 = unique(DATAINEED.array2);
My problem is MATLAB then stores "array1" like so when I open the variable:
1000
2000
3000
4e+03
5000
6e+03
If I type "array1" in the command window, it prints out just fine (1000, 2000, 3000, 4000…etc.)
The problem is, if I try to print the variable along with another string so it can feed into the text file, it keeps that weird scientific notation for the couple of values.
I’m using the following code:
OutputRow1 = "array1 has: "+sprintf(‘%d ‘,array1’);
This results in:
OutputRow1 =
"array1 has: 1000 2000 3000 4e+03 5000 6e+03"
Array 2 is completely fine (also an array of numbers, but not in the thousands). I’ve tried format short g and long g, doesn’t help. Wondering if anyone has any insights, suggestions or other ways to accomplish what I need. I have a script that reads inputs from an excel file, then stores specific arrays that I need, as different variables.
These will later need to be written to an output txt file along with other strings (this output needs to be a specific format so it can feed an executable).
My problem is that when I read the data from the excel file, MATLAB keeps changing only two of the values to scientific notation.
My code is structured like so:
DATAINEED = readtable(fullfile(input_location,filename));
array1 = unique(DATAINEED.array1);
array2 = unique(DATAINEED.array2);
My problem is MATLAB then stores "array1" like so when I open the variable:
1000
2000
3000
4e+03
5000
6e+03
If I type "array1" in the command window, it prints out just fine (1000, 2000, 3000, 4000…etc.)
The problem is, if I try to print the variable along with another string so it can feed into the text file, it keeps that weird scientific notation for the couple of values.
I’m using the following code:
OutputRow1 = "array1 has: "+sprintf(‘%d ‘,array1’);
This results in:
OutputRow1 =
"array1 has: 1000 2000 3000 4e+03 5000 6e+03"
Array 2 is completely fine (also an array of numbers, but not in the thousands). I’ve tried format short g and long g, doesn’t help. Wondering if anyone has any insights, suggestions or other ways to accomplish what I need. array, scientific notation, matlab, sprintf, storing variables, double MATLAB Answers — New Questions









