Month: August 2025
Analytic solution of quatric polynomial does not add up
Dear friends,
I currently ran into a math-issue when trying to get the analytical roots of a polynomial of order 4.
What I want to solve is:
The solution shall run on a microcontroller with dynamically changing parameters [a,d,e]. All parameters are real. I am searching for the real results, imaginary solutions are to be prevented. When applying Matlab symbolic, The parameters [a,d,e] are simplified and represent longer sub-terms. In accordance to the article Wiki: quartic function, I will receive quite a long solution, that is futile to reproduce here. I used the following short code to generate it:
syms x a d e
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
To check the solution, I tested it on an easier sub-problem: When d=0 is chosen follows:
When chosing a>0, e<0 this clearly yields some real results, besides the imaginary ones. Now the problem: the above given long solution cannot reproduce this result. Even if I force assumptions that should solve it, follows something that does not look equal:
syms x a d e
assume(a>=0)
assume(d>=0)
assume(e<=0)
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult=simplify(subs(sol.x, d,0))
latex(testresult)
However, if I change the equation before solving the quartic function, the solution of it looks as on paper:
y= a*x^4+e
assume(a>=0)
assume(d>=0)
assume(e<=0)
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult2=sol.x
latex(testresult2)
Numerical testing via inserting numbers in the two solutions according to the assumptions a>0, e<0 confirms the difference of the results. Chosing a=1 and e=-2 yields:
1) the general solution of the quartic polynomial (inserting d=0 after solving the quartic polynomial):
vpares1=vpa(subs(testresult,{a,e},{1,-2}))
vpares1 =
0
0
0
0
2) the solution of the simplified quartic polynomial (inserting d=0 before solving):
vpares2=vpa(subs(testresult2,{a,e},{1,-2}))
vpares2 =
1.1892071150027210667174999705605
-1.1892071150027210667174999705605
-1.1892071150027210667174999705605i
1.1892071150027210667174999705605i
Visibly, the trivial solution is not permissible given the solution of case 2). Interestingly, if the requirement is switched from {a>0,e<0} to {a<0, e>0} the solutions match again.
Similar difficulties have shown, when I hand-coded the general solution from the mentioned Wikipedia article. As I need the solution for , I now have trust-issues with the long solution. Therefore, I ask for your help or comment, why the "general solution" does not end in the same result as the simplified problem.
Thank you in advance for your help!Dear friends,
I currently ran into a math-issue when trying to get the analytical roots of a polynomial of order 4.
What I want to solve is:
The solution shall run on a microcontroller with dynamically changing parameters [a,d,e]. All parameters are real. I am searching for the real results, imaginary solutions are to be prevented. When applying Matlab symbolic, The parameters [a,d,e] are simplified and represent longer sub-terms. In accordance to the article Wiki: quartic function, I will receive quite a long solution, that is futile to reproduce here. I used the following short code to generate it:
syms x a d e
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
To check the solution, I tested it on an easier sub-problem: When d=0 is chosen follows:
When chosing a>0, e<0 this clearly yields some real results, besides the imaginary ones. Now the problem: the above given long solution cannot reproduce this result. Even if I force assumptions that should solve it, follows something that does not look equal:
syms x a d e
assume(a>=0)
assume(d>=0)
assume(e<=0)
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult=simplify(subs(sol.x, d,0))
latex(testresult)
However, if I change the equation before solving the quartic function, the solution of it looks as on paper:
y= a*x^4+e
assume(a>=0)
assume(d>=0)
assume(e<=0)
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult2=sol.x
latex(testresult2)
Numerical testing via inserting numbers in the two solutions according to the assumptions a>0, e<0 confirms the difference of the results. Chosing a=1 and e=-2 yields:
1) the general solution of the quartic polynomial (inserting d=0 after solving the quartic polynomial):
vpares1=vpa(subs(testresult,{a,e},{1,-2}))
vpares1 =
0
0
0
0
2) the solution of the simplified quartic polynomial (inserting d=0 before solving):
vpares2=vpa(subs(testresult2,{a,e},{1,-2}))
vpares2 =
1.1892071150027210667174999705605
-1.1892071150027210667174999705605
-1.1892071150027210667174999705605i
1.1892071150027210667174999705605i
Visibly, the trivial solution is not permissible given the solution of case 2). Interestingly, if the requirement is switched from {a>0,e<0} to {a<0, e>0} the solutions match again.
Similar difficulties have shown, when I hand-coded the general solution from the mentioned Wikipedia article. As I need the solution for , I now have trust-issues with the long solution. Therefore, I ask for your help or comment, why the "general solution" does not end in the same result as the simplified problem.
Thank you in advance for your help! Dear friends,
I currently ran into a math-issue when trying to get the analytical roots of a polynomial of order 4.
What I want to solve is:
The solution shall run on a microcontroller with dynamically changing parameters [a,d,e]. All parameters are real. I am searching for the real results, imaginary solutions are to be prevented. When applying Matlab symbolic, The parameters [a,d,e] are simplified and represent longer sub-terms. In accordance to the article Wiki: quartic function, I will receive quite a long solution, that is futile to reproduce here. I used the following short code to generate it:
syms x a d e
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
To check the solution, I tested it on an easier sub-problem: When d=0 is chosen follows:
When chosing a>0, e<0 this clearly yields some real results, besides the imaginary ones. Now the problem: the above given long solution cannot reproduce this result. Even if I force assumptions that should solve it, follows something that does not look equal:
syms x a d e
assume(a>=0)
assume(d>=0)
assume(e<=0)
y= a*x^4+d*x+e
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult=simplify(subs(sol.x, d,0))
latex(testresult)
However, if I change the equation before solving the quartic function, the solution of it looks as on paper:
y= a*x^4+e
assume(a>=0)
assume(d>=0)
assume(e<=0)
sol=solve(y==0,x,’MaxDegree’,4,’ReturnConditions’,true)
testresult2=sol.x
latex(testresult2)
Numerical testing via inserting numbers in the two solutions according to the assumptions a>0, e<0 confirms the difference of the results. Chosing a=1 and e=-2 yields:
1) the general solution of the quartic polynomial (inserting d=0 after solving the quartic polynomial):
vpares1=vpa(subs(testresult,{a,e},{1,-2}))
vpares1 =
0
0
0
0
2) the solution of the simplified quartic polynomial (inserting d=0 before solving):
vpares2=vpa(subs(testresult2,{a,e},{1,-2}))
vpares2 =
1.1892071150027210667174999705605
-1.1892071150027210667174999705605
-1.1892071150027210667174999705605i
1.1892071150027210667174999705605i
Visibly, the trivial solution is not permissible given the solution of case 2). Interestingly, if the requirement is switched from {a>0,e<0} to {a<0, e>0} the solutions match again.
Similar difficulties have shown, when I hand-coded the general solution from the mentioned Wikipedia article. As I need the solution for , I now have trust-issues with the long solution. Therefore, I ask for your help or comment, why the "general solution" does not end in the same result as the simplified problem.
Thank you in advance for your help! mathematics, symbolic, 4th order polynomial, polynomial MATLAB Answers — New Questions
Fatal error starting Matlab 1. time in Ubuntu 25.04
Starting Matlab in CLI on an Ubuntu 25.04 with 16 Gb of RAM I get this:
MATLAB is selecting SOFTWARE OPENGL rendering.
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error.
I have installed to /home/pgl/matlab as a user (not su).
What is the issue?
Best
PålStarting Matlab in CLI on an Ubuntu 25.04 with 16 Gb of RAM I get this:
MATLAB is selecting SOFTWARE OPENGL rendering.
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error.
I have installed to /home/pgl/matlab as a user (not su).
What is the issue?
Best
Pål Starting Matlab in CLI on an Ubuntu 25.04 with 16 Gb of RAM I get this:
MATLAB is selecting SOFTWARE OPENGL rendering.
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
library initialization failed – unable to allocate file descriptor table – out of memory
MATLAB is exiting because of fatal error.
I have installed to /home/pgl/matlab as a user (not su).
What is the issue?
Best
Pål ubuntu 25.04, font rendering, opengl MATLAB Answers — New Questions
Errors in listener callbacks
I have an app built in MATLAB App Designer. the underlying code utlizes events and listeners. my problem is this: Whenever an error occurs in the code, the app needs to know about this. when the error occurs in the code itself, there are built in "catch" commands that notify the GUI.
However, when an error occurs in one of the listener callbacks, there is some built in mechanism that replaces the error with a warning. Instead of getting an error message we get a warning: "error occurred during execution of listener callback" and a description of the error message.
Is there a way to cancel this mechanism? to let the errors in listener callbacks become actual error messages? or maybe a way to notify the app in case of a warning? something like try catch that includes warnings?
many thanks
NathanI have an app built in MATLAB App Designer. the underlying code utlizes events and listeners. my problem is this: Whenever an error occurs in the code, the app needs to know about this. when the error occurs in the code itself, there are built in "catch" commands that notify the GUI.
However, when an error occurs in one of the listener callbacks, there is some built in mechanism that replaces the error with a warning. Instead of getting an error message we get a warning: "error occurred during execution of listener callback" and a description of the error message.
Is there a way to cancel this mechanism? to let the errors in listener callbacks become actual error messages? or maybe a way to notify the app in case of a warning? something like try catch that includes warnings?
many thanks
Nathan I have an app built in MATLAB App Designer. the underlying code utlizes events and listeners. my problem is this: Whenever an error occurs in the code, the app needs to know about this. when the error occurs in the code itself, there are built in "catch" commands that notify the GUI.
However, when an error occurs in one of the listener callbacks, there is some built in mechanism that replaces the error with a warning. Instead of getting an error message we get a warning: "error occurred during execution of listener callback" and a description of the error message.
Is there a way to cancel this mechanism? to let the errors in listener callbacks become actual error messages? or maybe a way to notify the app in case of a warning? something like try catch that includes warnings?
many thanks
Nathan app designer, listener, event, callback, error MATLAB Answers — New Questions
DDPG Agent for Battery Control: Scalar action vs Full trajectory?
I’m implementing a Reinforcement Learning solution to control a home battery, similar to a Model Predictive Control (MPC) approach. The observation includes the current state of charge (SoC) and N-step forecasts for PV generation, electrical demand, import price, and export price.
In MPC, I calculate an optimal charge/discharge trajectory over the prediction horizon and output the entire plan. Now, I’m trying to implement the same using a DDPG agent in MATLAB.
My questions:
Should the DDPG agent output a scalar action (charging/discharging power) for each timestep, which is then used to update the SoC based on the sampling time,
or should the agent output a full trajectory, where I execute only the first action but discard the remaining ones, while still using the full trajectory for the reward calculation?
My thoughts:
In MPC, I get the entire optimal trajectory for charging and discharging over the horizon. Initially, I considered using the same approach with the DDPG agent. However, I’m wondering if this is necessary because the value function already accounts for downstream benefits (future prices/loads) since they are included in the state, right?
But if the agent returns just one action for the next state, it seems like this would lead to a result similar to what I would get if I had no prediction horizon at all.
Thanks in advance for any suggestions.I’m implementing a Reinforcement Learning solution to control a home battery, similar to a Model Predictive Control (MPC) approach. The observation includes the current state of charge (SoC) and N-step forecasts for PV generation, electrical demand, import price, and export price.
In MPC, I calculate an optimal charge/discharge trajectory over the prediction horizon and output the entire plan. Now, I’m trying to implement the same using a DDPG agent in MATLAB.
My questions:
Should the DDPG agent output a scalar action (charging/discharging power) for each timestep, which is then used to update the SoC based on the sampling time,
or should the agent output a full trajectory, where I execute only the first action but discard the remaining ones, while still using the full trajectory for the reward calculation?
My thoughts:
In MPC, I get the entire optimal trajectory for charging and discharging over the horizon. Initially, I considered using the same approach with the DDPG agent. However, I’m wondering if this is necessary because the value function already accounts for downstream benefits (future prices/loads) since they are included in the state, right?
But if the agent returns just one action for the next state, it seems like this would lead to a result similar to what I would get if I had no prediction horizon at all.
Thanks in advance for any suggestions. I’m implementing a Reinforcement Learning solution to control a home battery, similar to a Model Predictive Control (MPC) approach. The observation includes the current state of charge (SoC) and N-step forecasts for PV generation, electrical demand, import price, and export price.
In MPC, I calculate an optimal charge/discharge trajectory over the prediction horizon and output the entire plan. Now, I’m trying to implement the same using a DDPG agent in MATLAB.
My questions:
Should the DDPG agent output a scalar action (charging/discharging power) for each timestep, which is then used to update the SoC based on the sampling time,
or should the agent output a full trajectory, where I execute only the first action but discard the remaining ones, while still using the full trajectory for the reward calculation?
My thoughts:
In MPC, I get the entire optimal trajectory for charging and discharging over the horizon. Initially, I considered using the same approach with the DDPG agent. However, I’m wondering if this is necessary because the value function already accounts for downstream benefits (future prices/loads) since they are included in the state, right?
But if the agent returns just one action for the next state, it seems like this would lead to a result similar to what I would get if I had no prediction horizon at all.
Thanks in advance for any suggestions. reinforcement-learning, ddpg, simulink, mpc, matlab MATLAB Answers — New Questions
TreeTable in Matlab 2025a
Since javacomponents are deprecated as of MATLAB 2025a, has anyone found a way to generate treetables similar to what was possible with jide ?
We have been relying on those for a lot of GUI and see nothing in UITABLE/UITREE that would be similar. Necessary features are
tree opening
resizable columns
cell renderer allowing push buttons and pull down menus
column sorting is a bonusSince javacomponents are deprecated as of MATLAB 2025a, has anyone found a way to generate treetables similar to what was possible with jide ?
We have been relying on those for a lot of GUI and see nothing in UITABLE/UITREE that would be similar. Necessary features are
tree opening
resizable columns
cell renderer allowing push buttons and pull down menus
column sorting is a bonus Since javacomponents are deprecated as of MATLAB 2025a, has anyone found a way to generate treetables similar to what was possible with jide ?
We have been relying on those for a lot of GUI and see nothing in UITABLE/UITREE that would be similar. Necessary features are
tree opening
resizable columns
cell renderer allowing push buttons and pull down menus
column sorting is a bonus uitable, uitree, treetable MATLAB Answers — New Questions
Please help me to run this simple code. I want to check the definition the third oder of ODE is true of false in projfun function.
where c,alfa,mu,beta are constant.
% code
function sol= proj
clc;clf;clear;
myLegend1 = {};myLegend2 = {};
rr = [0.8]
for i =1:numel(rr)
c= rr(i);
alfa=6;
b=6;nu=4;
y0 = [1,1,1];
options =bvpset(‘stats’,’on’,’RelTol’,1e-4);
m = linspace(-3,3);
solinit = bvpinit(m,y0);
sol= bvp4c(@projfun,@projbc,solinit,options);
figure(1)
% plot(sol.x,(sol.y(1,:)))
yExact=nu*(3/b)*(sech((sqrt(nu)*0.5)*sol.x)).^2;
plot(sol.x,(sol.y(1,:)),’r’,sol.x,yExact,’b’)
grid on,hold on
myLegend1{i}=[‘b1= ‘,num2str(rr(i))];
% figure(2)
% % plot(sol.x,(sol.y(1,:)))
% grid on,hold on
% myLegend2{i}=[‘b1= ‘,num2str(rr(i))];
i=i+1;
end
figure(1)
legend(myLegend1)
hold on
figure(2)
legend(myLegend2)
function dy= projfun(~,y)
dy= zeros(3,1);
E = y(1);
dE = y(2);
ddE=y(3);
dy(1) = dE;
dy(2) =ddE;
dy(3)=(1/b)*(nu*ddE+dE*(c-alfa*E));
end
end
function res= projbc(ya,yb)
res= [ya(1);
ya(2);
yb(1);
];
endwhere c,alfa,mu,beta are constant.
% code
function sol= proj
clc;clf;clear;
myLegend1 = {};myLegend2 = {};
rr = [0.8]
for i =1:numel(rr)
c= rr(i);
alfa=6;
b=6;nu=4;
y0 = [1,1,1];
options =bvpset(‘stats’,’on’,’RelTol’,1e-4);
m = linspace(-3,3);
solinit = bvpinit(m,y0);
sol= bvp4c(@projfun,@projbc,solinit,options);
figure(1)
% plot(sol.x,(sol.y(1,:)))
yExact=nu*(3/b)*(sech((sqrt(nu)*0.5)*sol.x)).^2;
plot(sol.x,(sol.y(1,:)),’r’,sol.x,yExact,’b’)
grid on,hold on
myLegend1{i}=[‘b1= ‘,num2str(rr(i))];
% figure(2)
% % plot(sol.x,(sol.y(1,:)))
% grid on,hold on
% myLegend2{i}=[‘b1= ‘,num2str(rr(i))];
i=i+1;
end
figure(1)
legend(myLegend1)
hold on
figure(2)
legend(myLegend2)
function dy= projfun(~,y)
dy= zeros(3,1);
E = y(1);
dE = y(2);
ddE=y(3);
dy(1) = dE;
dy(2) =ddE;
dy(3)=(1/b)*(nu*ddE+dE*(c-alfa*E));
end
end
function res= projbc(ya,yb)
res= [ya(1);
ya(2);
yb(1);
];
end where c,alfa,mu,beta are constant.
% code
function sol= proj
clc;clf;clear;
myLegend1 = {};myLegend2 = {};
rr = [0.8]
for i =1:numel(rr)
c= rr(i);
alfa=6;
b=6;nu=4;
y0 = [1,1,1];
options =bvpset(‘stats’,’on’,’RelTol’,1e-4);
m = linspace(-3,3);
solinit = bvpinit(m,y0);
sol= bvp4c(@projfun,@projbc,solinit,options);
figure(1)
% plot(sol.x,(sol.y(1,:)))
yExact=nu*(3/b)*(sech((sqrt(nu)*0.5)*sol.x)).^2;
plot(sol.x,(sol.y(1,:)),’r’,sol.x,yExact,’b’)
grid on,hold on
myLegend1{i}=[‘b1= ‘,num2str(rr(i))];
% figure(2)
% % plot(sol.x,(sol.y(1,:)))
% grid on,hold on
% myLegend2{i}=[‘b1= ‘,num2str(rr(i))];
i=i+1;
end
figure(1)
legend(myLegend1)
hold on
figure(2)
legend(myLegend2)
function dy= projfun(~,y)
dy= zeros(3,1);
E = y(1);
dE = y(2);
ddE=y(3);
dy(1) = dE;
dy(2) =ddE;
dy(3)=(1/b)*(nu*ddE+dE*(c-alfa*E));
end
end
function res= projbc(ya,yb)
res= [ya(1);
ya(2);
yb(1);
];
end bvp4c, ode MATLAB Answers — New Questions
How can I add a backup an option, addSaveCallback, to save a timestamped version of my file, to the MATLAB editor?
% I’d like to add the option to save backup files – earlier versions every time I save a file in the Matlab editor
editorObj = matlab.desktop.editor.getActive;
editorObj.addSaveCallback(@mySaveCallback);
function mySaveCallback(~, ~)
disp(‘File has been saved!’);
% Add your custom code here
saveBackup(originalFilePath);
end
function saveBackup(originalFilePath)
% Check if the file exists
if ~isfile(originalFilePath)
error(‘The specified file does not exist.’);
end
% Extract file parts
[filePath, fileName, fileExt] = fileparts(originalFilePath);
% Create a timestamp
timestamp = datestr(now, ‘yyyymmdd_HHMMSS’);
% Define the backup file name
backupFileName = sprintf(‘%s_backup_%s%s’, fileName, timestamp, fileExt);
backupFilePath = fullfile(filePath, backupFileName);
% Copy the file to create a backup
copyfile(originalFilePath, backupFilePath);
fprintf(‘Backup saved as: %sn’, backupFilePath);
end% I’d like to add the option to save backup files – earlier versions every time I save a file in the Matlab editor
editorObj = matlab.desktop.editor.getActive;
editorObj.addSaveCallback(@mySaveCallback);
function mySaveCallback(~, ~)
disp(‘File has been saved!’);
% Add your custom code here
saveBackup(originalFilePath);
end
function saveBackup(originalFilePath)
% Check if the file exists
if ~isfile(originalFilePath)
error(‘The specified file does not exist.’);
end
% Extract file parts
[filePath, fileName, fileExt] = fileparts(originalFilePath);
% Create a timestamp
timestamp = datestr(now, ‘yyyymmdd_HHMMSS’);
% Define the backup file name
backupFileName = sprintf(‘%s_backup_%s%s’, fileName, timestamp, fileExt);
backupFilePath = fullfile(filePath, backupFileName);
% Copy the file to create a backup
copyfile(originalFilePath, backupFilePath);
fprintf(‘Backup saved as: %sn’, backupFilePath);
end % I’d like to add the option to save backup files – earlier versions every time I save a file in the Matlab editor
editorObj = matlab.desktop.editor.getActive;
editorObj.addSaveCallback(@mySaveCallback);
function mySaveCallback(~, ~)
disp(‘File has been saved!’);
% Add your custom code here
saveBackup(originalFilePath);
end
function saveBackup(originalFilePath)
% Check if the file exists
if ~isfile(originalFilePath)
error(‘The specified file does not exist.’);
end
% Extract file parts
[filePath, fileName, fileExt] = fileparts(originalFilePath);
% Create a timestamp
timestamp = datestr(now, ‘yyyymmdd_HHMMSS’);
% Define the backup file name
backupFileName = sprintf(‘%s_backup_%s%s’, fileName, timestamp, fileExt);
backupFilePath = fullfile(filePath, backupFileName);
% Copy the file to create a backup
copyfile(originalFilePath, backupFilePath);
fprintf(‘Backup saved as: %sn’, backupFilePath);
end matlab, editor, backup MATLAB Answers — New Questions
I need to remove tool boxes that were chosen when matlab was configured. How do I do that
Previously Matlab was mistakenly installed with all toolboxes selected for many installations. Now we are running into problems with licensing. I need to go in to these instances and undo those toolbox selections. Not sure the best way to do that.Previously Matlab was mistakenly installed with all toolboxes selected for many installations. Now we are running into problems with licensing. I need to go in to these instances and undo those toolbox selections. Not sure the best way to do that. Previously Matlab was mistakenly installed with all toolboxes selected for many installations. Now we are running into problems with licensing. I need to go in to these instances and undo those toolbox selections. Not sure the best way to do that. uninstall tool boxes MATLAB Answers — New Questions
How can I write a MATLAB script to plot 3D and 2D knee joint data from a CSV file with customized axes and medial–lateral connections?
The CSV file contains the following data:
Sensor names: sensorNames = data.Sensor(1:6,1)
Sensor coordinates: sensorCoordinates = data{1:6, 2:4}
Source number: (:,5)
Source coordinates: sourceCoordinates = data{:, 6:end}
I want to create a 3D plot in MATLAB that includes the following:
Plot the sensor names and their coordinates.
Plot the source coordinates. The source coordinates are categorized into two groups:
Medial: sourceCoordinates = data{7:end, 6:end}
Lateral: sourceCoordinates = data{1:6, 6:end}
3. Set the axis directions depending on the knee side (see figure. 1 below), using S2 as the reference sensor (0,0,0):
Figure.1
Right knee: X-axis positive leftward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
Left knee: X-axis positive rightward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
4. Generate three types of plots (similar to the figure.2):
A 3D plot with all axes.
A 2D plot of X vs. Y.
A 2D plot of X vs. Z.
5. Add a line (like the green line in the figure.2 below) that connects the medial and lateral sources. This line should represent the knee joint range in all axis directions.
Figure.2
Knee joint range determination table.
I would like to write a MATLAB script that reads the CSV file, extracts the relevant data, and generates the 3D and 2D plots including the above details.
I wrote the following code:
%% Read and Plot 3D/2D Data from CSV File
% Load the CSV file
filename = ‘3DPlot_KLII_Mori.csv’;
data = readtable(filename);
%% Extract Sensor and Source Data
sensorNames = data.Sensor(1:6, 1); % Sensor names
sensorCoordinates = data{1:6, 2:4}; % Sensor coordinates (X, Y, Z)
sourceNumbers = data{:, 5}; % Source numbers
sourceCoordinates = data{:, 6:end}; % All source coordinates
% Categorize source coordinates
lateralSources = data{1:6, 6:end}; % Lateral sources
medialSources = data{7:end, 6:end}; % Medial sources
%% User input for knee side
kneeSide = "Right"; % Change to "Left" if left knee
% Adjust axis directions based on knee side
if strcmpi(kneeSide, "Right")
% Right knee: X positive leftward, Y downward, Z downward
sensorCoordinates(:,1) = -sensorCoordinates(:,1);
lateralSources(:,1) = -lateralSources(:,1);
medialSources(:,1) = -medialSources(:,1);
elseif strcmpi(kneeSide, "Left")
% Left knee: X positive rightward, Y downward, Z downward
% No inversion needed
else
error(‘Knee side must be either "Right" or "Left".’);
end
%% Plotting – 3D Plot
figure;
hold on;
% Plot sensor coordinates
scatter3(sensorCoordinates(:,1), sensorCoordinates(:,2), sensorCoordinates(:,3), …
80, ‘filled’, ‘MarkerFaceColor’, ‘b’);
% Add sensor name labels
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), sensorCoordinates(i,3), …
[‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
% Plot lateral sources
scatter3(lateralSources(:,1), lateralSources(:,2), lateralSources(:,3), …
60, ‘o’, ‘MarkerEdgeColor’, ‘r’, ‘DisplayName’, ‘Lateral Sources’);
% Plot medial sources
scatter3(medialSources(:,1), medialSources(:,2), medialSources(:,3), …
60, ‘s’, ‘MarkerEdgeColor’, ‘g’, ‘DisplayName’, ‘Medial Sources’);
%% Formatting for 3D plot
grid on;
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
zlabel(‘Z-axis’);
title([‘3D Plot of Sensors and Sources (‘ kneeSide ‘ Knee)’]);
legend;
view(3);
hold off;
%% Plotting – 2D Plot (X vs Y)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,2), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,2), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,2), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
title([‘2D Plot (X vs Y) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off;
%% Plotting – 2D Plot (X vs Z)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,3), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,3), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,3), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,3), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Z-axis’);
title([‘2D Plot (X vs Z) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off;The CSV file contains the following data:
Sensor names: sensorNames = data.Sensor(1:6,1)
Sensor coordinates: sensorCoordinates = data{1:6, 2:4}
Source number: (:,5)
Source coordinates: sourceCoordinates = data{:, 6:end}
I want to create a 3D plot in MATLAB that includes the following:
Plot the sensor names and their coordinates.
Plot the source coordinates. The source coordinates are categorized into two groups:
Medial: sourceCoordinates = data{7:end, 6:end}
Lateral: sourceCoordinates = data{1:6, 6:end}
3. Set the axis directions depending on the knee side (see figure. 1 below), using S2 as the reference sensor (0,0,0):
Figure.1
Right knee: X-axis positive leftward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
Left knee: X-axis positive rightward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
4. Generate three types of plots (similar to the figure.2):
A 3D plot with all axes.
A 2D plot of X vs. Y.
A 2D plot of X vs. Z.
5. Add a line (like the green line in the figure.2 below) that connects the medial and lateral sources. This line should represent the knee joint range in all axis directions.
Figure.2
Knee joint range determination table.
I would like to write a MATLAB script that reads the CSV file, extracts the relevant data, and generates the 3D and 2D plots including the above details.
I wrote the following code:
%% Read and Plot 3D/2D Data from CSV File
% Load the CSV file
filename = ‘3DPlot_KLII_Mori.csv’;
data = readtable(filename);
%% Extract Sensor and Source Data
sensorNames = data.Sensor(1:6, 1); % Sensor names
sensorCoordinates = data{1:6, 2:4}; % Sensor coordinates (X, Y, Z)
sourceNumbers = data{:, 5}; % Source numbers
sourceCoordinates = data{:, 6:end}; % All source coordinates
% Categorize source coordinates
lateralSources = data{1:6, 6:end}; % Lateral sources
medialSources = data{7:end, 6:end}; % Medial sources
%% User input for knee side
kneeSide = "Right"; % Change to "Left" if left knee
% Adjust axis directions based on knee side
if strcmpi(kneeSide, "Right")
% Right knee: X positive leftward, Y downward, Z downward
sensorCoordinates(:,1) = -sensorCoordinates(:,1);
lateralSources(:,1) = -lateralSources(:,1);
medialSources(:,1) = -medialSources(:,1);
elseif strcmpi(kneeSide, "Left")
% Left knee: X positive rightward, Y downward, Z downward
% No inversion needed
else
error(‘Knee side must be either "Right" or "Left".’);
end
%% Plotting – 3D Plot
figure;
hold on;
% Plot sensor coordinates
scatter3(sensorCoordinates(:,1), sensorCoordinates(:,2), sensorCoordinates(:,3), …
80, ‘filled’, ‘MarkerFaceColor’, ‘b’);
% Add sensor name labels
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), sensorCoordinates(i,3), …
[‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
% Plot lateral sources
scatter3(lateralSources(:,1), lateralSources(:,2), lateralSources(:,3), …
60, ‘o’, ‘MarkerEdgeColor’, ‘r’, ‘DisplayName’, ‘Lateral Sources’);
% Plot medial sources
scatter3(medialSources(:,1), medialSources(:,2), medialSources(:,3), …
60, ‘s’, ‘MarkerEdgeColor’, ‘g’, ‘DisplayName’, ‘Medial Sources’);
%% Formatting for 3D plot
grid on;
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
zlabel(‘Z-axis’);
title([‘3D Plot of Sensors and Sources (‘ kneeSide ‘ Knee)’]);
legend;
view(3);
hold off;
%% Plotting – 2D Plot (X vs Y)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,2), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,2), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,2), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
title([‘2D Plot (X vs Y) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off;
%% Plotting – 2D Plot (X vs Z)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,3), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,3), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,3), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,3), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Z-axis’);
title([‘2D Plot (X vs Z) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off; The CSV file contains the following data:
Sensor names: sensorNames = data.Sensor(1:6,1)
Sensor coordinates: sensorCoordinates = data{1:6, 2:4}
Source number: (:,5)
Source coordinates: sourceCoordinates = data{:, 6:end}
I want to create a 3D plot in MATLAB that includes the following:
Plot the sensor names and their coordinates.
Plot the source coordinates. The source coordinates are categorized into two groups:
Medial: sourceCoordinates = data{7:end, 6:end}
Lateral: sourceCoordinates = data{1:6, 6:end}
3. Set the axis directions depending on the knee side (see figure. 1 below), using S2 as the reference sensor (0,0,0):
Figure.1
Right knee: X-axis positive leftward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
Left knee: X-axis positive rightward, Y-axis positive downward, Z-axis positive perpendicular to the depth of the plane.
4. Generate three types of plots (similar to the figure.2):
A 3D plot with all axes.
A 2D plot of X vs. Y.
A 2D plot of X vs. Z.
5. Add a line (like the green line in the figure.2 below) that connects the medial and lateral sources. This line should represent the knee joint range in all axis directions.
Figure.2
Knee joint range determination table.
I would like to write a MATLAB script that reads the CSV file, extracts the relevant data, and generates the 3D and 2D plots including the above details.
I wrote the following code:
%% Read and Plot 3D/2D Data from CSV File
% Load the CSV file
filename = ‘3DPlot_KLII_Mori.csv’;
data = readtable(filename);
%% Extract Sensor and Source Data
sensorNames = data.Sensor(1:6, 1); % Sensor names
sensorCoordinates = data{1:6, 2:4}; % Sensor coordinates (X, Y, Z)
sourceNumbers = data{:, 5}; % Source numbers
sourceCoordinates = data{:, 6:end}; % All source coordinates
% Categorize source coordinates
lateralSources = data{1:6, 6:end}; % Lateral sources
medialSources = data{7:end, 6:end}; % Medial sources
%% User input for knee side
kneeSide = "Right"; % Change to "Left" if left knee
% Adjust axis directions based on knee side
if strcmpi(kneeSide, "Right")
% Right knee: X positive leftward, Y downward, Z downward
sensorCoordinates(:,1) = -sensorCoordinates(:,1);
lateralSources(:,1) = -lateralSources(:,1);
medialSources(:,1) = -medialSources(:,1);
elseif strcmpi(kneeSide, "Left")
% Left knee: X positive rightward, Y downward, Z downward
% No inversion needed
else
error(‘Knee side must be either "Right" or "Left".’);
end
%% Plotting – 3D Plot
figure;
hold on;
% Plot sensor coordinates
scatter3(sensorCoordinates(:,1), sensorCoordinates(:,2), sensorCoordinates(:,3), …
80, ‘filled’, ‘MarkerFaceColor’, ‘b’);
% Add sensor name labels
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), sensorCoordinates(i,3), …
[‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
% Plot lateral sources
scatter3(lateralSources(:,1), lateralSources(:,2), lateralSources(:,3), …
60, ‘o’, ‘MarkerEdgeColor’, ‘r’, ‘DisplayName’, ‘Lateral Sources’);
% Plot medial sources
scatter3(medialSources(:,1), medialSources(:,2), medialSources(:,3), …
60, ‘s’, ‘MarkerEdgeColor’, ‘g’, ‘DisplayName’, ‘Medial Sources’);
%% Formatting for 3D plot
grid on;
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
zlabel(‘Z-axis’);
title([‘3D Plot of Sensors and Sources (‘ kneeSide ‘ Knee)’]);
legend;
view(3);
hold off;
%% Plotting – 2D Plot (X vs Y)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,2), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,2), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,2), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,2), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Y-axis’);
title([‘2D Plot (X vs Y) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off;
%% Plotting – 2D Plot (X vs Z)
figure;
hold on;
scatter(sensorCoordinates(:,1), sensorCoordinates(:,3), 80, ‘filled’, ‘b’);
for i = 1:length(sensorNames)
text(sensorCoordinates(i,1), sensorCoordinates(i,3), [‘ ‘ char(sensorNames{i})], ‘FontSize’, 10, ‘Color’, ‘b’);
end
scatter(lateralSources(:,1), lateralSources(:,3), 60, ‘ro’, ‘DisplayName’, ‘Lateral Sources’);
scatter(medialSources(:,1), medialSources(:,3), 60, ‘gs’, ‘DisplayName’, ‘Medial Sources’);
xlabel(‘X-axis’);
ylabel(‘Z-axis’);
title([‘2D Plot (X vs Z) – ‘ kneeSide ‘ Knee’]);
legend;
grid on;
hold off; matlab, 3d-plot, customized axes MATLAB Answers — New Questions
Creating and Using an Azure Automation Custom Runtime Environment
Use a Custom Runtime Environment for PowerShell V7.4 with the Microsoft Graph PowerShell SDK
The recent introduction of custom runtime environments for Azure Automation is an important step toward creating a better operational platform. The idea is simple. Microsoft defines a set of system-generated runtime environments and tenants can create their own runtime environments to match their needs.
Until now, Azure Automation has essentially offered just the system-generated runtime environments to cover languages like PowerShell and Python, and tenants have had to deal with whatever limitations existed in those environments. For example, the current version of PowerShell Core is V7.5.2, but Azure Automation only supports V5.1, V7.1, and V7.2. When the Microsoft Graph PowerShell SDK developers decided to remove support for .NET6 in their V2.26.1 release, any runbooks configured to use PowerShell V7.1 or V7.2 promptly broke because of their dependency on .NET6.
At the time, Microsoft’s solution was to advise customers to use PowerShell V5.1 with current versions of the Microsoft Graph PowerShell SDK or to stay with V2.25 of the SDK until Azure Automation delivered support for PowerShell V7.4, which is built on .NET8 and is the long-term support (LTS) version of PowerShell (an important aspect for many customers).
Component of Custom Runtime Environments
Support for PowerShell V7.4 has been available since late June 2025 in the form of a custom runtime environment. I don’t know why PowerShell V7.4 is not in the set of system-generated runtime environments. In any case, it is easy to create a custom runtime environment and execute runbooks created using the latest versions of the Microsoft Graph PowerShell SDK.
Before you can use custom runtime environments, you must select the Try runtime environment “experience” toggle for an automation account (Figure 1). Selecting the toggle exposes the option to access runtime environments under Runbooks in the Process Automation menu section.

A runtime environment is composed of:
- A language (PowerShell in this case, but also Python).
- A runtime version (V7.4).
- Packages (DLLs, Assemblies, and PowerShell modules) required to execute runbooks.
I created a custom runbook environment called PSR74. Figure 2 shows the environment settings and that I have looked four Microsoft Graph PowerShell SDK modules into the environment. In the past, you loaded modules as resources for an automation account. Now, the modules are resources for a specific runtime environment.

You can have as many custom runtime environments (within reason) as you like. It’s conceivable, but not practical, that each runbook would have its own runtime environment. More likely, you’ll end up creating a set of runtime environments to match the kind of work done by runbooks. For instance, I have a runtime environment for Microsoft Graph PowerShell SDK runbooks and another for Exchange Online runbooks.
Moving Runbooks to a Custom Runtime Environment
Existing runbooks are tied to a system-generated runtime environment. For instancem the CheckUtilityAccountSignIns runbook shown in Figure 3 is currently tied to the PowerShell V5.1 environment. To move the runbook, select it from the list and us the Update Runtime Environment option to choose a target runtime environment. You can then opt for any system-generated or custom runtime environment defined for the automation account.

When you move a runbook, remember to check the set of modules loaded into the target environment to ensure that all the components needed by the runbook are present. In this example, because the runbook processes Entra ID sign-in audit records, I had to load the Microsoft.Graph.Identity.SignIns and Microsoft.Graph.Reports modules into the target environment before the runbook executed successfully.
Some limitations exist and you should read the documentation before commiting to the new runtime environment. One noteable problem is that some commonly used modules for Microsoft 365 automation, like the Exchange Online management module, aren’t available for PowerShell V7.4 yet. You can attempt to load these modules into a V7.4 runtime environment, but nothing happens. It might take some time before all your favorite (and required) modules support PowerShell V7.4, so you might have to remain with V5.1 for a while yet. In the meantime, it’s easy to switch between the old and new runtime experience, and to switch runbooks between environments.
Nice Change to Deliver Flexibility
Being able to configure a runtime environment precisely the way that you want is an attractive feature. Some extra overhead is incurred to make sure that all the required modules are present, but that’s a small price to pay for the flexibility delivered by runtime environments.
Need some assistance to write and manage PowerShell scripts for Microsoft 365, including Azure Automation runbooks? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.
MATLAB Dropout layer during prediciton
The Documentation for a Dropout layer states that:
"At prediction time the output of a dropout layer is equal to its input."
I assume this means that during prediction, there is no dropout.
Is there a method in MATLAB to enable Dropout during prediction time?The Documentation for a Dropout layer states that:
"At prediction time the output of a dropout layer is equal to its input."
I assume this means that during prediction, there is no dropout.
Is there a method in MATLAB to enable Dropout during prediction time? The Documentation for a Dropout layer states that:
"At prediction time the output of a dropout layer is equal to its input."
I assume this means that during prediction, there is no dropout.
Is there a method in MATLAB to enable Dropout during prediction time? deep-learing, neural network MATLAB Answers — New Questions
What is the MATLAB Package Manager? How do I download and install products with it?
What is the MATLAB Package Manager? How do I download and install products with it?What is the MATLAB Package Manager? How do I download and install products with it? What is the MATLAB Package Manager? How do I download and install products with it? MATLAB Answers — New Questions
C-Caller crash with Matlab 2025a
I have many models which uses C-Callers and they work properly in accelerator mode with matlab 2024b and previous.
With Matlab 2025a almost all these models crash when I run them. "Validate custom code" runs fine, but when I run the model it crash. In normal as it should be it doesn’t crash.
The issue is located into the C-caller of course, but I never had problems until R2025a.
Do you have similar issues? Any advices?
Many thanks in advanced.
DI have many models which uses C-Callers and they work properly in accelerator mode with matlab 2024b and previous.
With Matlab 2025a almost all these models crash when I run them. "Validate custom code" runs fine, but when I run the model it crash. In normal as it should be it doesn’t crash.
The issue is located into the C-caller of course, but I never had problems until R2025a.
Do you have similar issues? Any advices?
Many thanks in advanced.
D I have many models which uses C-Callers and they work properly in accelerator mode with matlab 2024b and previous.
With Matlab 2025a almost all these models crash when I run them. "Validate custom code" runs fine, but when I run the model it crash. In normal as it should be it doesn’t crash.
The issue is located into the C-caller of course, but I never had problems until R2025a.
Do you have similar issues? Any advices?
Many thanks in advanced.
D c-caller, simscape MATLAB Answers — New Questions
How does the Compare To Constant block in Simulink choose type of the Constant value, and what are the implications for fixed-point operations?
How can I detect and address questionable fixed-point operations in Compare To Constant block?
This example model generates code that does not function as intended. It appears that value 15 is cast to fixdt(1,8,-5) as sfix8_E5, and quantized to zero.How can I detect and address questionable fixed-point operations in Compare To Constant block?
This example model generates code that does not function as intended. It appears that value 15 is cast to fixdt(1,8,-5) as sfix8_E5, and quantized to zero. How can I detect and address questionable fixed-point operations in Compare To Constant block?
This example model generates code that does not function as intended. It appears that value 15 is cast to fixdt(1,8,-5) as sfix8_E5, and quantized to zero. fixed point, data type rules MATLAB Answers — New Questions
Teams Gives Users Control Over Hiding Inactive Channels
Hiding Inactive Channels Automatically was a Terrible Idea
One of the oft-repeated tropes about Microsoft is that they need several attempts to get software right. This might certainly be true for the Teams feature designed to help users focus on active work by hiding unused channels. First introduced in Fall 2024 with the aim that: “Teams will automatically detect inactive channels you haven’t interacted with in a while, and automatically hide them for you,” the feature soon ran into problems. Initially, Microsoft said that Teams will automatically detect inactive channels that a user hasn’t interacted with for 45 days. The number was revised upward to 120 days in MC804771 (March 21, 2025). Apart from these statements, Microsoft hasn’t given any further details about the criteria used to determine the level of activity needed to regard a channel as active.
The way that Teams suppressed notifications from hidden channels didn’t help either. Although cleaning up a channel list to highlight active channels might be a good idea, it’s not so good when someone misses an important notification about an event posted in a channel that’s inactive because it’s reserved for discussing critical issues.
Offering Suggestions about Channels to Hide
Microsoft duly reversed course and acknowledged that automatically hiding inactive channels without user oversight was a bad idea. They promised to clean up the mess by announcing in MC804771 that Teams would offer suggestions about inactive channels and leave it to users to decide if the suggestions are valid and should be accepted.
Six months later, MC1141958 (25 August 2025, Microsoft 365 roadmap item 325780) announces that the update to give user control over hiding inactive channels is available in targeted released and will be generally available very soon. You’ll know if the update is available by checking the Settings app to see if the control for hiding inactive channels now mentions “suggestions” (Figure 1).

Opting for Get suggestions now forces Teams to show its current list of inactive channels. When I chose the option, it revealed five channels (Figure 2). The interesting thing is that similarly inactive channels in the same teams are not in the list. This underlines the general lack of information available from Microsoft about how Teams chooses inactive channels.

Automatic Maintenance and Coach Mark Messages
If the setting to hide inactive channels is On, Teams performs a periodic check to find channels that could be hidden. This doesn’t happen when a user has less than or equal to 25 visible channels.
If Teams finds some inactive channels, it notifies the user with a “coach mark message.” I was unfamiliar with this term, but apparently a coach mark is a user interface element intended to educate users about a new feature. Now that I know what these messages are called, I’ll stop referring to them as the annoying pop-up messages that infest Teams (or maybe not, because the overuse of these messages is still annoying especially when there’s no way to turn them off).

In any case, the message will prompt the user with “Looks like you haven’t visited some channels lately. Hide them to help you focus.” If the user opts to be distracted from doing whatever they were busy with before Teams launched its coach mark, they see the same dialog as shown in Figure 2.
There’s no administrative control over the hiding inactive channels feature. Its only control is at user level through the Settings app.
Hurrah for Sanity
The simple fact is that sanity has now been restored to the attempt to unclutter user views by removing inactive channels. Software, even Copilot at its best, has a hard job of understanding why some channels exist and how people use those channels. Given that a single team can support up to 1,000 channels, some inactive channels are likely to be floating around in everyone’s client. Making polite suggestions that some channels can be hidden is a much better approach than automatic clean-up, especially when the criteria used to select inactive channels are so fuzzy.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across the Microsoft 365 ecosystem. Subscribe to the Office 365 for IT Pros eBook to receive insights updated monthly into what happens within Microsoft 365, why it happens, and what new features and capabilities mean for your tenant.
Problems with quiver plot
Hey!
I try to create a quiver plot with unequl axis length. I’ like to have the arrows the same length, which somehow does not want to work.
Any ideas?
Thanks!
%% system paramters
eta = .1;
mu = .1;
nu = 1;
gamma = 2;
%% dependent variables
roi = 2;
s = linspace(max([(1-roi)*s_0,0]),(1+roi)*s_0,10);
p = linspace(max([(1-roi)*p_0,0]),(1+roi)*p_0,10);
[s,p] = meshgrid(s,p);
%% gradient flow
v = s.*p.^gamma ./ (1+(1+s).*p.^gamma);
ds = -v + eta;
dp = mu*(v – nu*p);
mag = sqrt(ds.^2 + dp.^2);
arrow_scale = 3E-1;
norm_ds = arrow_scale*ds./mag;
norm_dp = arrow_scale*dp./mag;
%% plot
q = quiver(s,p,norm_ds,norm_dp,’Autoscale’,’off’, ‘Color’,.6*[1,1,1]);
q.ShowArrowHead = ‘off’;
q.Marker = ‘.’;Hey!
I try to create a quiver plot with unequl axis length. I’ like to have the arrows the same length, which somehow does not want to work.
Any ideas?
Thanks!
%% system paramters
eta = .1;
mu = .1;
nu = 1;
gamma = 2;
%% dependent variables
roi = 2;
s = linspace(max([(1-roi)*s_0,0]),(1+roi)*s_0,10);
p = linspace(max([(1-roi)*p_0,0]),(1+roi)*p_0,10);
[s,p] = meshgrid(s,p);
%% gradient flow
v = s.*p.^gamma ./ (1+(1+s).*p.^gamma);
ds = -v + eta;
dp = mu*(v – nu*p);
mag = sqrt(ds.^2 + dp.^2);
arrow_scale = 3E-1;
norm_ds = arrow_scale*ds./mag;
norm_dp = arrow_scale*dp./mag;
%% plot
q = quiver(s,p,norm_ds,norm_dp,’Autoscale’,’off’, ‘Color’,.6*[1,1,1]);
q.ShowArrowHead = ‘off’;
q.Marker = ‘.’; Hey!
I try to create a quiver plot with unequl axis length. I’ like to have the arrows the same length, which somehow does not want to work.
Any ideas?
Thanks!
%% system paramters
eta = .1;
mu = .1;
nu = 1;
gamma = 2;
%% dependent variables
roi = 2;
s = linspace(max([(1-roi)*s_0,0]),(1+roi)*s_0,10);
p = linspace(max([(1-roi)*p_0,0]),(1+roi)*p_0,10);
[s,p] = meshgrid(s,p);
%% gradient flow
v = s.*p.^gamma ./ (1+(1+s).*p.^gamma);
ds = -v + eta;
dp = mu*(v – nu*p);
mag = sqrt(ds.^2 + dp.^2);
arrow_scale = 3E-1;
norm_ds = arrow_scale*ds./mag;
norm_dp = arrow_scale*dp./mag;
%% plot
q = quiver(s,p,norm_ds,norm_dp,’Autoscale’,’off’, ‘Color’,.6*[1,1,1]);
q.ShowArrowHead = ‘off’;
q.Marker = ‘.’; quiver, plot MATLAB Answers — New Questions
Why Does Answers Run Code in 2025a But the Run Button, the “Executing In” Popup, and the “Ran In” Tag Still Show 2024b?
verver ver answers version MATLAB Answers — New Questions
Function requires a Toolbox for which you do not have a license
Up until today, I have been using my scripts without any issues. These scripts rely on a number of functions associated with certain toolboxes (for example, the tdfread function, which belongs to the Statistics and Machine Learning Toolbox). However, all of a sudden, MATLAB no longer allows me to run these scripts, as it tells me I do not have access to these functions.
It seems the reason is that I do not have a license for these toolboxes. Still, I have been able to use them without any problem until now, and my account is linked to an academic institution that supposedly has licenses for all of these toolboxes.
Could you please tell me what might be happening?Up until today, I have been using my scripts without any issues. These scripts rely on a number of functions associated with certain toolboxes (for example, the tdfread function, which belongs to the Statistics and Machine Learning Toolbox). However, all of a sudden, MATLAB no longer allows me to run these scripts, as it tells me I do not have access to these functions.
It seems the reason is that I do not have a license for these toolboxes. Still, I have been able to use them without any problem until now, and my account is linked to an academic institution that supposedly has licenses for all of these toolboxes.
Could you please tell me what might be happening? Up until today, I have been using my scripts without any issues. These scripts rely on a number of functions associated with certain toolboxes (for example, the tdfread function, which belongs to the Statistics and Machine Learning Toolbox). However, all of a sudden, MATLAB no longer allows me to run these scripts, as it tells me I do not have access to these functions.
It seems the reason is that I do not have a license for these toolboxes. Still, I have been able to use them without any problem until now, and my account is linked to an academic institution that supposedly has licenses for all of these toolboxes.
Could you please tell me what might be happening? license, toolkits, functions MATLAB Answers — New Questions
How can I change the fontsize of datatip box?
<</matlabcentral/answers/uploaded_files/108002/matlab.png>>
I mean the font size of x:5 and y:-12.38
Thanks in advance<</matlabcentral/answers/uploaded_files/108002/matlab.png>>
I mean the font size of x:5 and y:-12.38
Thanks in advance <</matlabcentral/answers/uploaded_files/108002/matlab.png>>
I mean the font size of x:5 and y:-12.38
Thanks in advance datatip, fontsize MATLAB Answers — New Questions
R2025a exportgraphics new behavior for PDF export
I use to export figure to PDF using the following code :
exportgraphics(fig, [ savepath ‘fig_name.pdf’], ‘ContentType’, ‘vector’);
It contains both plots and imagesc in subplots.
In Matlab R2024b, the exported PDF would look smooth even zooming in -> vector graphic confirmed. Or good enough let’s say: I’ve heard that imagesc figures can’t be vectorized in a proper way anyway.
In Matlab R2025a, the plots are ok, the imagesc are very blured, even if I specify dpi = 600 in the exportgraphic function.
So I’m guessing the behaviour of that function have changed.
Anyone has any input about this ?
How can I have the same result as in R2024b in R2025a is my question.I use to export figure to PDF using the following code :
exportgraphics(fig, [ savepath ‘fig_name.pdf’], ‘ContentType’, ‘vector’);
It contains both plots and imagesc in subplots.
In Matlab R2024b, the exported PDF would look smooth even zooming in -> vector graphic confirmed. Or good enough let’s say: I’ve heard that imagesc figures can’t be vectorized in a proper way anyway.
In Matlab R2025a, the plots are ok, the imagesc are very blured, even if I specify dpi = 600 in the exportgraphic function.
So I’m guessing the behaviour of that function have changed.
Anyone has any input about this ?
How can I have the same result as in R2024b in R2025a is my question. I use to export figure to PDF using the following code :
exportgraphics(fig, [ savepath ‘fig_name.pdf’], ‘ContentType’, ‘vector’);
It contains both plots and imagesc in subplots.
In Matlab R2024b, the exported PDF would look smooth even zooming in -> vector graphic confirmed. Or good enough let’s say: I’ve heard that imagesc figures can’t be vectorized in a proper way anyway.
In Matlab R2025a, the plots are ok, the imagesc are very blured, even if I specify dpi = 600 in the exportgraphic function.
So I’m guessing the behaviour of that function have changed.
Anyone has any input about this ?
How can I have the same result as in R2024b in R2025a is my question. exportgraphic, pdf, r2025a MATLAB Answers — New Questions