Month: October 2025
javaclasspath hangs in MATLAB 2025b
Hi,
I’ve recently started using MATLAB 2025b (after using 2022b for a while), however, I sometimes get the whole app (sort of like a deadlock somewhere) hangs when calling:
javaclasspath(‘-dynamic’)
It doesn’t happen every time, but happens often enough to be an issue. I use this as part of an initialisation script to check if .jar file has been added already to not do it again (not sure what my reason was for setting it up that way – either for performance or to avoid warnings):
java_paths = javaclasspath(‘-dynamic’);
if ~ischar(filepath) || ~ismember(filepath, java_paths)
javaaddpath(filepath, varargin{:});
end
Here’s an error I get (it’s not an actual error cause I have to cancel it in the end), but shows where it gets "stuck":
Operation terminated by user during javaclasspath
In javaclasspath
In javaaddpathNoWarn (line 5)
java_paths = javaclasspath(‘-dynamic’);
^^^^^^^^^^^^^^^^^^^^^^^^^
In
initSnakeYaml (line 3)
javaaddpathNoWarn(snakeYamlFile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
yaml.load (line 43)
initSnakeYaml
^^^^^^^^^^^^^
In
yaml.loadFile (line 43)
result = yaml.load(content, bConvertToArray);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
LoadYaml (line 2)
data = yaml.loadFile(filename);
^^^^^^^^^^^^^^^^^^^^^^^
Has anyone seen this issue or have a solution for it? I have never had it in MATLAB 2022b.Hi,
I’ve recently started using MATLAB 2025b (after using 2022b for a while), however, I sometimes get the whole app (sort of like a deadlock somewhere) hangs when calling:
javaclasspath(‘-dynamic’)
It doesn’t happen every time, but happens often enough to be an issue. I use this as part of an initialisation script to check if .jar file has been added already to not do it again (not sure what my reason was for setting it up that way – either for performance or to avoid warnings):
java_paths = javaclasspath(‘-dynamic’);
if ~ischar(filepath) || ~ismember(filepath, java_paths)
javaaddpath(filepath, varargin{:});
end
Here’s an error I get (it’s not an actual error cause I have to cancel it in the end), but shows where it gets "stuck":
Operation terminated by user during javaclasspath
In javaclasspath
In javaaddpathNoWarn (line 5)
java_paths = javaclasspath(‘-dynamic’);
^^^^^^^^^^^^^^^^^^^^^^^^^
In
initSnakeYaml (line 3)
javaaddpathNoWarn(snakeYamlFile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
yaml.load (line 43)
initSnakeYaml
^^^^^^^^^^^^^
In
yaml.loadFile (line 43)
result = yaml.load(content, bConvertToArray);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
LoadYaml (line 2)
data = yaml.loadFile(filename);
^^^^^^^^^^^^^^^^^^^^^^^
Has anyone seen this issue or have a solution for it? I have never had it in MATLAB 2022b. Hi,
I’ve recently started using MATLAB 2025b (after using 2022b for a while), however, I sometimes get the whole app (sort of like a deadlock somewhere) hangs when calling:
javaclasspath(‘-dynamic’)
It doesn’t happen every time, but happens often enough to be an issue. I use this as part of an initialisation script to check if .jar file has been added already to not do it again (not sure what my reason was for setting it up that way – either for performance or to avoid warnings):
java_paths = javaclasspath(‘-dynamic’);
if ~ischar(filepath) || ~ismember(filepath, java_paths)
javaaddpath(filepath, varargin{:});
end
Here’s an error I get (it’s not an actual error cause I have to cancel it in the end), but shows where it gets "stuck":
Operation terminated by user during javaclasspath
In javaclasspath
In javaaddpathNoWarn (line 5)
java_paths = javaclasspath(‘-dynamic’);
^^^^^^^^^^^^^^^^^^^^^^^^^
In
initSnakeYaml (line 3)
javaaddpathNoWarn(snakeYamlFile);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
yaml.load (line 43)
initSnakeYaml
^^^^^^^^^^^^^
In
yaml.loadFile (line 43)
result = yaml.load(content, bConvertToArray);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In
LoadYaml (line 2)
data = yaml.loadFile(filename);
^^^^^^^^^^^^^^^^^^^^^^^
Has anyone seen this issue or have a solution for it? I have never had it in MATLAB 2022b. java, javaclasspath, 2025b, hangs MATLAB Answers — New Questions
Curve Fitting Toolbox Error: This expression has no coefficients or non-scalar coefficients.
Hi, i want to use the curve fitter with the custome equation:
y(x)=y0*((sin(n*a*(sin(x)/b)*pi))/sin(a*(sin(x)/b)*pi))^2*sinc((sin(x)/b)*pi*c)^2 with n = 5; a = 30e-6; b = 450e-9; c = 450e-9
My data has the following form:
0;3140
1;3073
…
24;3232
25;3349
I always recieve the error message
Fit Name: untitled fit 1
Error: This expression has no coefficients or non-scalar coefficients.
Warning: Ignoring NaNs in data.Hi, i want to use the curve fitter with the custome equation:
y(x)=y0*((sin(n*a*(sin(x)/b)*pi))/sin(a*(sin(x)/b)*pi))^2*sinc((sin(x)/b)*pi*c)^2 with n = 5; a = 30e-6; b = 450e-9; c = 450e-9
My data has the following form:
0;3140
1;3073
…
24;3232
25;3349
I always recieve the error message
Fit Name: untitled fit 1
Error: This expression has no coefficients or non-scalar coefficients.
Warning: Ignoring NaNs in data. Hi, i want to use the curve fitter with the custome equation:
y(x)=y0*((sin(n*a*(sin(x)/b)*pi))/sin(a*(sin(x)/b)*pi))^2*sinc((sin(x)/b)*pi*c)^2 with n = 5; a = 30e-6; b = 450e-9; c = 450e-9
My data has the following form:
0;3140
1;3073
…
24;3232
25;3349
I always recieve the error message
Fit Name: untitled fit 1
Error: This expression has no coefficients or non-scalar coefficients.
Warning: Ignoring NaNs in data. curve fitting, matlab MATLAB Answers — New Questions
What works in 2024 stopped with 2025: Latex interpreter
The following (textcircled and fbox) used to produce circled and boxed text on axes in MATLAB 2024 and earlier versions. Can you tell what might have happened and/or a specific setting that would restore? Or is there an alternative efficient way (instead of writing lines of code and using graphics) to get circled/boxed text?
My original source was : https://stackoverflow.com/questions/10818392/matlab-putting-a-circled-number-onto-a-graph
I realize that latex support in MATLAB may be somewhat limited, but I wish that what worked before still works.
Thank you all in advance…
GP–
text(0.5,0.5,[‘ ‘ ‘ $raisebox{.5pt}{textcircled{raisebox{-.9pt} {‘ num2str(14) ‘}}}$’ ‘ :i-end’],…
‘Units’,’normalized’,’HorizontalAlignment’,’left’,’VerticalAlignment’, ‘bottom’, ‘Color’,’m’,…
‘Interpreter’,’latex’,"FontSize",14);
text(0.2,0.5,[‘$fbox{ ‘ num2str(25) ‘ }$’ ],…
‘HorizontalAlignment’,’center’,’VerticalAlignment’, ‘top’,’rotation’,40,…
‘Interpreter’,’latex’,"FontSize",11);The following (textcircled and fbox) used to produce circled and boxed text on axes in MATLAB 2024 and earlier versions. Can you tell what might have happened and/or a specific setting that would restore? Or is there an alternative efficient way (instead of writing lines of code and using graphics) to get circled/boxed text?
My original source was : https://stackoverflow.com/questions/10818392/matlab-putting-a-circled-number-onto-a-graph
I realize that latex support in MATLAB may be somewhat limited, but I wish that what worked before still works.
Thank you all in advance…
GP–
text(0.5,0.5,[‘ ‘ ‘ $raisebox{.5pt}{textcircled{raisebox{-.9pt} {‘ num2str(14) ‘}}}$’ ‘ :i-end’],…
‘Units’,’normalized’,’HorizontalAlignment’,’left’,’VerticalAlignment’, ‘bottom’, ‘Color’,’m’,…
‘Interpreter’,’latex’,"FontSize",14);
text(0.2,0.5,[‘$fbox{ ‘ num2str(25) ‘ }$’ ],…
‘HorizontalAlignment’,’center’,’VerticalAlignment’, ‘top’,’rotation’,40,…
‘Interpreter’,’latex’,"FontSize",11); The following (textcircled and fbox) used to produce circled and boxed text on axes in MATLAB 2024 and earlier versions. Can you tell what might have happened and/or a specific setting that would restore? Or is there an alternative efficient way (instead of writing lines of code and using graphics) to get circled/boxed text?
My original source was : https://stackoverflow.com/questions/10818392/matlab-putting-a-circled-number-onto-a-graph
I realize that latex support in MATLAB may be somewhat limited, but I wish that what worked before still works.
Thank you all in advance…
GP–
text(0.5,0.5,[‘ ‘ ‘ $raisebox{.5pt}{textcircled{raisebox{-.9pt} {‘ num2str(14) ‘}}}$’ ‘ :i-end’],…
‘Units’,’normalized’,’HorizontalAlignment’,’left’,’VerticalAlignment’, ‘bottom’, ‘Color’,’m’,…
‘Interpreter’,’latex’,"FontSize",14);
text(0.2,0.5,[‘$fbox{ ‘ num2str(25) ‘ }$’ ],…
‘HorizontalAlignment’,’center’,’VerticalAlignment’, ‘top’,’rotation’,40,…
‘Interpreter’,’latex’,"FontSize",11); latex, circled text, boxed text MATLAB Answers — New Questions
Indexing a 4-D array using a logical matrix
Hello, I have a few 4-D arrays, originally netCDF files, which represent mapping data. Each 4-D array, or map, is lat x lon x percentile x frequency. I have the actual lat, lon, percentile, and frequency values sorted as seperate vectors.
Each map is actually 1144 x 1051 x 7 x 3, so for practice:
map=rand(1144,1051,7,3)
I have a polygon I want to subset the data by, and I have created an index by:
eez=shaperead(‘./ShapeFiles/eez/eez.shp’);
lat = ncread(ncfile, ‘/lat’);
lon = ncread(ncfile, ‘/lon’);
[LonGrid, LatGrid] = meshgrid(lon, lat); %make a grid with the latlongs
Y=eez.Y(~isnan(eez.Y))’; %removing NAs and transposing the array
X=eez.X(~isnan(eez.X))’;
inPoly = inpolygon(LonGrid, LatGrid,X,Y);
How do I use the inPoly logical to subset the 4-D map, just for the lat/lon, but apply it equally to all other dimensions (percentile/frequency), so I have a resulting 4-D array with the subsetted data? If I just index it by:
test=map(inPoly);
It returns an array that I am unsure how to apply to the original 4-D matrix. Ideally, it would return a 4D matrix with NaNs outside of the polygon.
Thanks in advance!Hello, I have a few 4-D arrays, originally netCDF files, which represent mapping data. Each 4-D array, or map, is lat x lon x percentile x frequency. I have the actual lat, lon, percentile, and frequency values sorted as seperate vectors.
Each map is actually 1144 x 1051 x 7 x 3, so for practice:
map=rand(1144,1051,7,3)
I have a polygon I want to subset the data by, and I have created an index by:
eez=shaperead(‘./ShapeFiles/eez/eez.shp’);
lat = ncread(ncfile, ‘/lat’);
lon = ncread(ncfile, ‘/lon’);
[LonGrid, LatGrid] = meshgrid(lon, lat); %make a grid with the latlongs
Y=eez.Y(~isnan(eez.Y))’; %removing NAs and transposing the array
X=eez.X(~isnan(eez.X))’;
inPoly = inpolygon(LonGrid, LatGrid,X,Y);
How do I use the inPoly logical to subset the 4-D map, just for the lat/lon, but apply it equally to all other dimensions (percentile/frequency), so I have a resulting 4-D array with the subsetted data? If I just index it by:
test=map(inPoly);
It returns an array that I am unsure how to apply to the original 4-D matrix. Ideally, it would return a 4D matrix with NaNs outside of the polygon.
Thanks in advance! Hello, I have a few 4-D arrays, originally netCDF files, which represent mapping data. Each 4-D array, or map, is lat x lon x percentile x frequency. I have the actual lat, lon, percentile, and frequency values sorted as seperate vectors.
Each map is actually 1144 x 1051 x 7 x 3, so for practice:
map=rand(1144,1051,7,3)
I have a polygon I want to subset the data by, and I have created an index by:
eez=shaperead(‘./ShapeFiles/eez/eez.shp’);
lat = ncread(ncfile, ‘/lat’);
lon = ncread(ncfile, ‘/lon’);
[LonGrid, LatGrid] = meshgrid(lon, lat); %make a grid with the latlongs
Y=eez.Y(~isnan(eez.Y))’; %removing NAs and transposing the array
X=eez.X(~isnan(eez.X))’;
inPoly = inpolygon(LonGrid, LatGrid,X,Y);
How do I use the inPoly logical to subset the 4-D map, just for the lat/lon, but apply it equally to all other dimensions (percentile/frequency), so I have a resulting 4-D array with the subsetted data? If I just index it by:
test=map(inPoly);
It returns an array that I am unsure how to apply to the original 4-D matrix. Ideally, it would return a 4D matrix with NaNs outside of the polygon.
Thanks in advance! 4-d, indexing MATLAB Answers — New Questions
ChatGPT Enterprise Connects to SharePoint Online
SharePoint Connector Throws Down the Gauntlet to Microsoft 365 Copilot

An October 8 LinkedIn post announced that OpenAI business customers can “centrally deploy SharePoint for their entire workspace,” The move throws down the gauntlet to Microsoft 365 Copilot by delivering the same kind of ability to reason over files stored in SharePoint Online and OneDrive for Business. While Microsoft 365 Copilot boasts more points of integration with Microsoft 365 apps, including SharePoint agents, the new Knowledge agent (in preview), and the ability to consume SharePoint content in custom agents built with Copilot Studio, I don’t think anyone in Microsoft will be happy to see OpenAI offer customers the opportunity to fully exploit the information stored in SharePoint Online.
Given that Microsoft 365 Copilot uses the OpenAI models, including GPT-5, it’s hard to know why companies opt for OpenAI enterprise, especially if those companies use SharePoint Online (which implies that they use Microsoft 365). List prices for the two offerings is compatible, but Microsoft 365 Copilot delivers more integrated functionality.
OpenAI and SharePoint Online
OpenAI has long offered the ability for individual users to connect to OneDrive for Business accounts and SharePoint Online sites. Access is granted through OAuth authentication against Entra ID and is limited to the information accessible to the user, just like any other app that uses the Graph API to interact with SharePoint Online and OneDrive for Business. Because the OpenAI connector is an app, the app can be blocked to prevent users from being able to upload information to OpenAI.
The description of the ChatGPT SharePoint Connector says “The admin-managed sync connector lets an administrator authenticate once and deploy across the entire organization. Users don’t need to set up anything themselves—it just works. To configure the connector, administrators must be both a SharePoint Online (or tenant) administrator and a ChatGPT administrator. During the configuration, the administrator can choose to synchronize all files or scope the connector to specific sites and folders, with the synchronized copies appearing in ChatGPT as “admin-managed” files. According to OpenAI, new files or updates made to SharePoint files are available to ChatGPT within an hour.
Access to files is governed by “strict email domain matching between SharePoint and ChatGPT. A user’s SharePoint account must match their ChatGPT account email.” I guess this means that user principal names must match the email addresses used to create ChatGPT accounts for ChatGPT to allow access to synchronized files. Of course, Microsoft 365 does not insist that user principal names match a user’s primary SMTP address, so there’s some opportunity for mismatches here.
OpenAI notes that synchronized connectors are only available to customers based in the U.S. that enable data residency or international customers who don’t mind that their data is stored in the U.S. They note that “We don’t yet support in-region storage for non-US data residency configurations.”
The SharePoint Connector
Overall, it seems like the new version of the ChatGPT connector uses application permissions like Sites.Read.All and Files.Read.All to access SharePoint and OneDrive content and synchronize it to ChatGPT, while User.Read.All, Group.Read.All, and GroupMember.Read.All permissions are used for account matching. An example of an app using Graph permissions to read SharePoint is available here.
One thing that’s become painfully obvious since the introduction of Microsoft 365 Copilot is that Microsoft 365 tenants store some complete rubbish in SharePoint Online. Old files and misleading and inaccurate content is stored alongside interesting and useful information, but Copilot can’t tell the difference between the two. Add in some sensitive and confidential information that should never appear in AI-generated output, and you can understand why Microsoft has struggled to make Copilot work for SharePoint in the real world (rather that carefully curated demos). Solutions like Restricted Content Discovery and the DLP Policy for Copilot allow organizations to hide content from Copilot or stop Copilot using information in its responses. It’s taken time for these solutions to arrive, but things are much better now.
OpenAI has the advantage of learning from Microsoft’s toils. It seems like OpenAI uses scoping to restrict what SharePoint content ChatGPT can process, which is kind of like what Restricted Content Discovery does.
Why Use the OpenAI Connector?
Apart from avoiding having to buy Microsoft 365 Copilot licenses, I could never understand why Microsoft 365 tenants let people upload corporate information to ChatGPT for processing. The enterprise SharePoint connector is even worse in my eyes, even if OpenAI guarantees that the information loaded through the connector is never used to train its models.
The notion of synchronizing SharePoint files to ChatGPT so that they people can use that content with ChatGPT seems a little crazy. As far as I can tell, OpenAI offers none of the compliance functionality that Microsoft has developed to protect and secure SharePoint Online. For instance, how does ChatGPT deal with files protected by sensitivity labels?
It seems like once the connector copies SharePoint Online sites to ChatGPT, a Microsoft 365 tenant runs some risk of losing control over information. It’s hard enough to persuade people to store important files in SharePoint Online rather than OneDrive for Business. Adding ChatGPT to the mix makes the task of managing corporate files even harder.
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
MATLAB R2025b “savefig(…)” fails to save changed legend Position when existing .fig file is opened and edited.
The question is explained in detail in the attached .txt file. Briefly:
Assume some figure A.fig was created by some plot(..) commands etc. and was then saved with only one single legend and legend box position coordinates [xO yO wO hO], the _old_ coordinates, with assumed values like, say,
[xO yO wO hO] == [0.7 0.6 0.2 0.3 .
From that A.fig, I now want to generate a new version, B.fig, which displays the legend box with _new_ position coordinate values, [xN yN wN hN], given by
[xN yN wN hN] == [0.6 0.5 0.3 0.4] ,
all else being the same as in A.fig.
The problem I run into is this:
I open A.fig, look up the legend handle (call it "hL") and change the legend box position coordinates by hL.Position=[xN yN wN hN]; hL.Location=’none’; save it as B.fig by savefig(‘B.fig’) and then close all. If I then later (re-)open B.fig, I find that B.fig has been saved with the old legend position coordinates [xO yO wO hO], instead of the new ones, [xN yN wN hN].The question is explained in detail in the attached .txt file. Briefly:
Assume some figure A.fig was created by some plot(..) commands etc. and was then saved with only one single legend and legend box position coordinates [xO yO wO hO], the _old_ coordinates, with assumed values like, say,
[xO yO wO hO] == [0.7 0.6 0.2 0.3 .
From that A.fig, I now want to generate a new version, B.fig, which displays the legend box with _new_ position coordinate values, [xN yN wN hN], given by
[xN yN wN hN] == [0.6 0.5 0.3 0.4] ,
all else being the same as in A.fig.
The problem I run into is this:
I open A.fig, look up the legend handle (call it "hL") and change the legend box position coordinates by hL.Position=[xN yN wN hN]; hL.Location=’none’; save it as B.fig by savefig(‘B.fig’) and then close all. If I then later (re-)open B.fig, I find that B.fig has been saved with the old legend position coordinates [xO yO wO hO], instead of the new ones, [xN yN wN hN]. The question is explained in detail in the attached .txt file. Briefly:
Assume some figure A.fig was created by some plot(..) commands etc. and was then saved with only one single legend and legend box position coordinates [xO yO wO hO], the _old_ coordinates, with assumed values like, say,
[xO yO wO hO] == [0.7 0.6 0.2 0.3 .
From that A.fig, I now want to generate a new version, B.fig, which displays the legend box with _new_ position coordinate values, [xN yN wN hN], given by
[xN yN wN hN] == [0.6 0.5 0.3 0.4] ,
all else being the same as in A.fig.
The problem I run into is this:
I open A.fig, look up the legend handle (call it "hL") and change the legend box position coordinates by hL.Position=[xN yN wN hN]; hL.Location=’none’; save it as B.fig by savefig(‘B.fig’) and then close all. If I then later (re-)open B.fig, I find that B.fig has been saved with the old legend position coordinates [xO yO wO hO], instead of the new ones, [xN yN wN hN]. changed legend, savefig fails MATLAB Answers — New Questions
Please help me to solve this simple error
%Code
% Tanh–Coth Method for Solving Nonlinear ODEs
clear; clc; syms U(xi) a0 a1 a2 b1 b2 c xi d1 d2 d3
% Example ODE: U” – U + 2*U^3 = 0
ode = diff(U, xi, 2)*U^2 +(diff(U, xi, 1))^2*(2*U+1)+d1*U^4+d2*U^3;
% Step 1: Assume tanh–coth solution (up to order 2 for example)
U_trial = a0 + a1*tanh(d3*xi) + a2*tanh(d3*xi)^2 + b1*coth(d3*xi) + b2*coth(d3*xi)^2;
% Step 2: Substitute the trial function into the ODE
ode_sub = subs(ode, U, U_trial);
% Step 3: Expand and simplify
ode_simplified = simplify(expand(ode_sub));
% Step 4: Collect terms with respect to tanh and coth
% Convert to polynomial form in tanh(xi) and coth(xi)
ode_collected = collect(ode_simplified, [tanh(d3*xi), coth(d3*xi)]);
% Step 5: Equate coefficients of each power of tanh and coth to zero
% (To make the equation identically zero)
coeffs_tanh = coeffs(ode_collected, tanh(xi));
eqns = [];
for k = 1:length(coeffs_tanh)
eqns = [eqns, simplify(coeffs_tanh(k)) == 0];
end
% Step 6: Solve for coefficients
sol = solve(eqns, [a0 a1 a2 b1 b2 d1 d2 d3], ‘IgnoreAnalyticConstraints’, true);
disp(‘Solutions for coefficients:’)
disp(sol)%Code
% Tanh–Coth Method for Solving Nonlinear ODEs
clear; clc; syms U(xi) a0 a1 a2 b1 b2 c xi d1 d2 d3
% Example ODE: U” – U + 2*U^3 = 0
ode = diff(U, xi, 2)*U^2 +(diff(U, xi, 1))^2*(2*U+1)+d1*U^4+d2*U^3;
% Step 1: Assume tanh–coth solution (up to order 2 for example)
U_trial = a0 + a1*tanh(d3*xi) + a2*tanh(d3*xi)^2 + b1*coth(d3*xi) + b2*coth(d3*xi)^2;
% Step 2: Substitute the trial function into the ODE
ode_sub = subs(ode, U, U_trial);
% Step 3: Expand and simplify
ode_simplified = simplify(expand(ode_sub));
% Step 4: Collect terms with respect to tanh and coth
% Convert to polynomial form in tanh(xi) and coth(xi)
ode_collected = collect(ode_simplified, [tanh(d3*xi), coth(d3*xi)]);
% Step 5: Equate coefficients of each power of tanh and coth to zero
% (To make the equation identically zero)
coeffs_tanh = coeffs(ode_collected, tanh(xi));
eqns = [];
for k = 1:length(coeffs_tanh)
eqns = [eqns, simplify(coeffs_tanh(k)) == 0];
end
% Step 6: Solve for coefficients
sol = solve(eqns, [a0 a1 a2 b1 b2 d1 d2 d3], ‘IgnoreAnalyticConstraints’, true);
disp(‘Solutions for coefficients:’)
disp(sol) %Code
% Tanh–Coth Method for Solving Nonlinear ODEs
clear; clc; syms U(xi) a0 a1 a2 b1 b2 c xi d1 d2 d3
% Example ODE: U” – U + 2*U^3 = 0
ode = diff(U, xi, 2)*U^2 +(diff(U, xi, 1))^2*(2*U+1)+d1*U^4+d2*U^3;
% Step 1: Assume tanh–coth solution (up to order 2 for example)
U_trial = a0 + a1*tanh(d3*xi) + a2*tanh(d3*xi)^2 + b1*coth(d3*xi) + b2*coth(d3*xi)^2;
% Step 2: Substitute the trial function into the ODE
ode_sub = subs(ode, U, U_trial);
% Step 3: Expand and simplify
ode_simplified = simplify(expand(ode_sub));
% Step 4: Collect terms with respect to tanh and coth
% Convert to polynomial form in tanh(xi) and coth(xi)
ode_collected = collect(ode_simplified, [tanh(d3*xi), coth(d3*xi)]);
% Step 5: Equate coefficients of each power of tanh and coth to zero
% (To make the equation identically zero)
coeffs_tanh = coeffs(ode_collected, tanh(xi));
eqns = [];
for k = 1:length(coeffs_tanh)
eqns = [eqns, simplify(coeffs_tanh(k)) == 0];
end
% Step 6: Solve for coefficients
sol = solve(eqns, [a0 a1 a2 b1 b2 d1 d2 d3], ‘IgnoreAnalyticConstraints’, true);
disp(‘Solutions for coefficients:’)
disp(sol) sym a function MATLAB Answers — New Questions
I am currently working with Simulink and out of the sudden, I am unable to change the Model Configuration Parameters.
I am currently working with Simulink and out of the sudden, I am unable to change the Model Configuration Parameters.
Whether I try to open the window via RightClick->Model Configuration Parameters or via Ctrl+E, in both cases, a blank white window opens.
This problem persists after a reboot and opening/closing MATLAB. Furthermore, it is the case for any model (whether old, new, untouched, example…) on my computer.
Is there some graphics cache or can you think of another way, how I could get the dialog back? A photo is attached:
Thanks a lot in advance!I am currently working with Simulink and out of the sudden, I am unable to change the Model Configuration Parameters.
Whether I try to open the window via RightClick->Model Configuration Parameters or via Ctrl+E, in both cases, a blank white window opens.
This problem persists after a reboot and opening/closing MATLAB. Furthermore, it is the case for any model (whether old, new, untouched, example…) on my computer.
Is there some graphics cache or can you think of another way, how I could get the dialog back? A photo is attached:
Thanks a lot in advance! I am currently working with Simulink and out of the sudden, I am unable to change the Model Configuration Parameters.
Whether I try to open the window via RightClick->Model Configuration Parameters or via Ctrl+E, in both cases, a blank white window opens.
This problem persists after a reboot and opening/closing MATLAB. Furthermore, it is the case for any model (whether old, new, untouched, example…) on my computer.
Is there some graphics cache or can you think of another way, how I could get the dialog back? A photo is attached:
Thanks a lot in advance! simulink MATLAB Answers — New Questions
Simple Stateflow state machine – input port to change the defaul transition
I have a simple state flow diagram; the toggle switch is linked to the constant value – I can do toggling on the switch and able to switch the constant value. Further I would like to use the toggle-switch to control stateflow state machine. As of now I have always enabled state-machine and toggle switch cannot control stateflow chart .
How do I connect the default transition in stateflow chart with "start" input port which represents input from toggle switch. Please can you advice?I have a simple state flow diagram; the toggle switch is linked to the constant value – I can do toggling on the switch and able to switch the constant value. Further I would like to use the toggle-switch to control stateflow state machine. As of now I have always enabled state-machine and toggle switch cannot control stateflow chart .
How do I connect the default transition in stateflow chart with "start" input port which represents input from toggle switch. Please can you advice? I have a simple state flow diagram; the toggle switch is linked to the constant value – I can do toggling on the switch and able to switch the constant value. Further I would like to use the toggle-switch to control stateflow state machine. As of now I have always enabled state-machine and toggle switch cannot control stateflow chart .
How do I connect the default transition in stateflow chart with "start" input port which represents input from toggle switch. Please can you advice? stateflow deafult transition MATLAB Answers — New Questions
Modelling a system of differential equations with recurrences in matlab
Trying to model a system in the form
a*u[n]” + b*u[n] = k( v[n+1] + v[n-1] – 2u[n] )
c*v[n]” + d*v[n] = k( u[n+1] + u[n-1] – 2v[n] )
a,b,c,d,k are all constants
Pretty sure this can only be done numericallyTrying to model a system in the form
a*u[n]” + b*u[n] = k( v[n+1] + v[n-1] – 2u[n] )
c*v[n]” + d*v[n] = k( u[n+1] + u[n-1] – 2v[n] )
a,b,c,d,k are all constants
Pretty sure this can only be done numerically Trying to model a system in the form
a*u[n]” + b*u[n] = k( v[n+1] + v[n-1] – 2u[n] )
c*v[n]” + d*v[n] = k( u[n+1] + u[n-1] – 2v[n] )
a,b,c,d,k are all constants
Pretty sure this can only be done numerically ode, system MATLAB Answers — New Questions
RC Circuit Simulation in Simulink Shows Incorrect Charging Time
Hello,
I am simulating a simple RC circuit in Simulink (MATLAB R2025b) to observe the capacitor charging time. The circuit consists of a 1V DC voltage source, a 1-ohm resistor, and a 1-µF capacitor.
According to theory, the time constant (τ = R*C) is 1 µs. This means the capacitor voltage should reach approximately 63% of the source voltage (about 0.63V) at t = 1 µs.
However, my simulation shows a significant delay. The capacitor voltage only begins to rise noticeably between 2 µs and 3 µs, and does not match the theoretical curve at all.
I have attached my model file for reference. Could you please help me understand why the simulation results do not align with the theoretical expectations? I suspect it might be related to my solver configuration.
Thank you for your help.Hello,
I am simulating a simple RC circuit in Simulink (MATLAB R2025b) to observe the capacitor charging time. The circuit consists of a 1V DC voltage source, a 1-ohm resistor, and a 1-µF capacitor.
According to theory, the time constant (τ = R*C) is 1 µs. This means the capacitor voltage should reach approximately 63% of the source voltage (about 0.63V) at t = 1 µs.
However, my simulation shows a significant delay. The capacitor voltage only begins to rise noticeably between 2 µs and 3 µs, and does not match the theoretical curve at all.
I have attached my model file for reference. Could you please help me understand why the simulation results do not align with the theoretical expectations? I suspect it might be related to my solver configuration.
Thank you for your help. Hello,
I am simulating a simple RC circuit in Simulink (MATLAB R2025b) to observe the capacitor charging time. The circuit consists of a 1V DC voltage source, a 1-ohm resistor, and a 1-µF capacitor.
According to theory, the time constant (τ = R*C) is 1 µs. This means the capacitor voltage should reach approximately 63% of the source voltage (about 0.63V) at t = 1 µs.
However, my simulation shows a significant delay. The capacitor voltage only begins to rise noticeably between 2 µs and 3 µs, and does not match the theoretical curve at all.
I have attached my model file for reference. Could you please help me understand why the simulation results do not align with the theoretical expectations? I suspect it might be related to my solver configuration.
Thank you for your help. electrical, rc circuit simulation MATLAB Answers — New Questions
MacBook heats up with R25a and 25b
I’ve noticed that my MacBook heats up quickly when using MATLAB R2025a or R2025b, even with light tasks such as editing scripts or small plots. The CPU usage remains high in Activity Monitor, and sometimes background MATLAB processes continue running after I close the app. This behavior wasn’t present in R2024b, which ran much cooler on the same machine. I’m I’m using [ macOS Sequoia and 24 Gb. MathWorks has acknowledged and they confirmed that developers are working on it for almost 9 months. MATLAB is a great software and I do not want to loose it. I cannot use either 25a or 25b yet.Any guidance appreciated.I’ve noticed that my MacBook heats up quickly when using MATLAB R2025a or R2025b, even with light tasks such as editing scripts or small plots. The CPU usage remains high in Activity Monitor, and sometimes background MATLAB processes continue running after I close the app. This behavior wasn’t present in R2024b, which ran much cooler on the same machine. I’m I’m using [ macOS Sequoia and 24 Gb. MathWorks has acknowledged and they confirmed that developers are working on it for almost 9 months. MATLAB is a great software and I do not want to loose it. I cannot use either 25a or 25b yet.Any guidance appreciated. I’ve noticed that my MacBook heats up quickly when using MATLAB R2025a or R2025b, even with light tasks such as editing scripts or small plots. The CPU usage remains high in Activity Monitor, and sometimes background MATLAB processes continue running after I close the app. This behavior wasn’t present in R2024b, which ran much cooler on the same machine. I’m I’m using [ macOS Sequoia and 24 Gb. MathWorks has acknowledged and they confirmed that developers are working on it for almost 9 months. MATLAB is a great software and I do not want to loose it. I cannot use either 25a or 25b yet.Any guidance appreciated. overheat, macbook MATLAB Answers — New Questions
Solve equation without symbolic math toolbox
Hello ,
I’m trying to solve this equation :
0 = (U/r.^3)* sqrt(-2+((3*r.^3)*(Bx/U)))-B
U is a constant
Bx and B are column matrix
I would have as a result a value of r for each value of Bx and B
is it possible to do this without the Symbolic math toolbox ?
Thank youHello ,
I’m trying to solve this equation :
0 = (U/r.^3)* sqrt(-2+((3*r.^3)*(Bx/U)))-B
U is a constant
Bx and B are column matrix
I would have as a result a value of r for each value of Bx and B
is it possible to do this without the Symbolic math toolbox ?
Thank you Hello ,
I’m trying to solve this equation :
0 = (U/r.^3)* sqrt(-2+((3*r.^3)*(Bx/U)))-B
U is a constant
Bx and B are column matrix
I would have as a result a value of r for each value of Bx and B
is it possible to do this without the Symbolic math toolbox ?
Thank you solve equation, without symbolic math toolbox MATLAB Answers — New Questions
Can I open a MATLAB Grader problem from MATLAB Home?
I use MATLAB Home (matlab.mathworks.com) to see my assigned courses, projects, and MATLAB files. Can I open one of my assigned MATLAB Grader problems directly from the MATLAB home page?I use MATLAB Home (matlab.mathworks.com) to see my assigned courses, projects, and MATLAB files. Can I open one of my assigned MATLAB Grader problems directly from the MATLAB home page? I use MATLAB Home (matlab.mathworks.com) to see my assigned courses, projects, and MATLAB files. Can I open one of my assigned MATLAB Grader problems directly from the MATLAB home page? matlab_grader MATLAB Answers — New Questions
Toolboxes invisible in the file exchange list
Hi,
Over the last few years I developped some toolboxes, like the mesh processing toolbox, but I recently realized they were not appearing in the community tollbox list on the file exhange (you can check it by sorting this list in descending order of downloads for instance beforre looking for them / mines)
I don’t understand the reason why they are not listed. When I submitted them I did tick the box ‘package as a toolbox’.
Any clue ?
Thank you for help.
NicolasHi,
Over the last few years I developped some toolboxes, like the mesh processing toolbox, but I recently realized they were not appearing in the community tollbox list on the file exhange (you can check it by sorting this list in descending order of downloads for instance beforre looking for them / mines)
I don’t understand the reason why they are not listed. When I submitted them I did tick the box ‘package as a toolbox’.
Any clue ?
Thank you for help.
Nicolas Hi,
Over the last few years I developped some toolboxes, like the mesh processing toolbox, but I recently realized they were not appearing in the community tollbox list on the file exhange (you can check it by sorting this list in descending order of downloads for instance beforre looking for them / mines)
I don’t understand the reason why they are not listed. When I submitted them I did tick the box ‘package as a toolbox’.
Any clue ?
Thank you for help.
Nicolas toolbox, file exchange, fex, community MATLAB Answers — New Questions
Gibbs-like behaviour with lowpass on long signals
I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that).I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that). I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that). signal processing, filter MATLAB Answers — New Questions
while loadlibrary error in latest version
After I upgraded my MATLAB version from the early 2024b release to the latest version, the .m files that I could load normally before started to have issues. They worked fine in both 2023a and the early 2024b release, and my code hasn’t changed at all. However, they fail to run in both the latest 2024b version and the 2025 version. What could be the reason for this? I hope to get help as soon as possible.After I upgraded my MATLAB version from the early 2024b release to the latest version, the .m files that I could load normally before started to have issues. They worked fine in both 2023a and the early 2024b release, and my code hasn’t changed at all. However, they fail to run in both the latest 2024b version and the 2025 version. What could be the reason for this? I hope to get help as soon as possible. After I upgraded my MATLAB version from the early 2024b release to the latest version, the .m files that I could load normally before started to have issues. They worked fine in both 2023a and the early 2024b release, and my code hasn’t changed at all. However, they fail to run in both the latest 2024b version and the 2025 version. What could be the reason for this? I hope to get help as soon as possible. matlab MATLAB Answers — New Questions
Matlab R2025a default setpath and cluster profile manager
Hello,
I just installed R2025a and I can’t find the default button for the setpath, and the "Cluster Profile Manager" link isn’t working.
Are you having the same issues ?Hello,
I just installed R2025a and I can’t find the default button for the setpath, and the "Cluster Profile Manager" link isn’t working.
Are you having the same issues ? Hello,
I just installed R2025a and I can’t find the default button for the setpath, and the "Cluster Profile Manager" link isn’t working.
Are you having the same issues ? matlab r2025a default setpath and cluster profile MATLAB Answers — New Questions
I need help verifying my license
Hi all, yesterday I was reciving this error message while using matlab online. I am supposed to have a liscence through my department email from the University of Arizona. I want to make sure it is registering properly before I lose my work.Hi all, yesterday I was reciving this error message while using matlab online. I am supposed to have a liscence through my department email from the University of Arizona. I want to make sure it is registering properly before I lose my work. Hi all, yesterday I was reciving this error message while using matlab online. I am supposed to have a liscence through my department email from the University of Arizona. I want to make sure it is registering properly before I lose my work. license MATLAB Answers — New Questions
Microsoft 365 Copilot Usage Report API General Availability
It’s Nice to be GA, but What Can You Do with the Copilot Usage Report API?
MC877369 first appeared in August 2024 to announce the availability of Microsoft 365 Copilot usage data through the Graph usage reports API (Microsoft 365 roadmap item 396562). The most recent update (6 Oct 2025) sets out a new timeline for general availability of the APIs, which is now expected to roll out in late October 2025 for worldwide completion in late November 2025. Microsoft doesn’t say why the latest delay occurred or why it’s taken so long to move the API from preview to GA.
Still at the Beta Endpoint
Although the Copilot usage report API is heading for general availability, it’s still only accessible through the beta endpoint. There’s nothing wrong with that, providing the API works. Normally, Microsoft Graph APIs accessible through the beta endpoint are under active development to solve performance or reliability problems, or to complete the features necessary to move to production (V1.0) status.
Using the Copilot Usage Report API
I first looked at the API in September 2024 and concluded that most value can be derived from the Copilot user activity detail API. Knowing what apps people use Copilot in is valuable information if you want to do things like:
- Knowing what departments Copilot is being used in and those that need a little help to get going. By including user data from Entra ID with Copilot usage data, we can slice and dice the usage data to generate additional insights (Figure 1).

- Look for user accounts with expensive ($360/year) Microsoft 365 Copilot licenses and automatically remove underused licenses so that the licenses can be reallocated to people who might use them more. The folks who lose the Microsoft 365 Copilot licenses might be happy with the no-charge Microsoft Copilot chat capability. Or they might be the folks in the company who are using ChatGPT and other AI tools instead of Copilot.
- A variation on the theme is to integrate Microsoft 365 audit data with Copilot usage report data to drill down into what people are doing with Copilot. The intention once again is to weed out underused Microsoft 365 Copilot licenses so that others might be assigned those licenses.
- I have a script to create a composite picture of user activity across multiple workloads. It would be easy to add the Copilot usage data to the mix.
Example PowerShell scripts are available to demonstrate the principles explored in each scenario. The point is that usage data is interesting in its own right, but it becomes more powerful when combined with other easily-accessible Microsoft 365 data sources about user activity.
Remember to allow full display of usernames and other information for the report data. If you don’t, the usage data will be obfuscated (concealed) and won’t be able to match up with data from other Microsoft 365 sources.
Other Usage Report APIs
Microsoft 365 supports a bunch of other usage reports APIs for different workloads. Not all workloads featured in the Microsoft 365 admin center are available through a Graph API (like Forms, Project, Visio, and Viva Learning). The same is true for some sub-reports (like Copilot agents). However, there’s enough data available to be able to build a good picture of how people use Microsoft 365 across the board.
The issue with reporting SharePoint URLs (first reported in September 2023) persists. Some security issue is apparently cramping Microsoft’s ability to include site URLs in the site activity report (powered by the getSharePointSiteUsageDetail API), which means that the usage data returned for a site looks like this:
Report Refresh Date : 2025-10-07 Site Id : 66bbf297-2f09-43ec-ab94-9333deacf769 Site URL : Owner Display Name : Project Haycock Owners Is Deleted : False Last Activity Date : 2025-05-23 File Count : 375 Active File Count : 131 Page View Count : 0 Visited Page Count : 0 Storage Used (Byte) : 110786012 Storage Allocated (Byte) : 27487790694400 Root Web Template : Group Owner Principal Name : projecthaycock@office365itpros.com Report Period : 180
The Site Id can be used to find the website URL:
(Get-MgSite -SiteId '66bbf297-2f09-43ec-ab94-9333deacf769').WebUrl https://office365itpros.sharepoint.com/sites/projecthaycock
It’s a mystery why Microsoft won’t or can’t fix this irritating issue. Just one of those cloud mysteries…









