Author: PuTI
how to buy student lisence i am in Egypt and all credit card i tried not works.
i want to buy student lisence, is there any restrictions on
Egypt country? all credit card i tried not works at your web site.i want to buy student lisence, is there any restrictions on
Egypt country? all credit card i tried not works at your web site. i want to buy student lisence, is there any restrictions on
Egypt country? all credit card i tried not works at your web site. specify libraries, or specific apis, matlab, license MATLAB Answers — New Questions
Switching values around in a matrix
Hi,
Say I have a 5 by 2 matrix in the form:
A = [2 5; 9 7; 10 2; 3 2; 1 9]
And I want to make a 10 by 1 matrix from these values so that I get:
B = [2;5;9;7;10;2;3;2;1;9]
How would I do this?
I know there is a probably a simple fix, but I haven’t been able to do it.
Many thanks,
ScottHi,
Say I have a 5 by 2 matrix in the form:
A = [2 5; 9 7; 10 2; 3 2; 1 9]
And I want to make a 10 by 1 matrix from these values so that I get:
B = [2;5;9;7;10;2;3;2;1;9]
How would I do this?
I know there is a probably a simple fix, but I haven’t been able to do it.
Many thanks,
Scott Hi,
Say I have a 5 by 2 matrix in the form:
A = [2 5; 9 7; 10 2; 3 2; 1 9]
And I want to make a 10 by 1 matrix from these values so that I get:
B = [2;5;9;7;10;2;3;2;1;9]
How would I do this?
I know there is a probably a simple fix, but I haven’t been able to do it.
Many thanks,
Scott matrices, matrix manipulation MATLAB Answers — New Questions
Why do I receive the error “Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application”?
When launching MATLAB, why do I receive the error "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application"?When launching MATLAB, why do I receive the error "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application"? When launching MATLAB, why do I receive the error "Unable to save login information. You are currently signed in but you will be prompted to sign in again the next time that you start this application"? MATLAB Answers — New Questions
Plot showing gaps in numerical solution
I’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
endI’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
end I’m working on a numerical model involving the merging of four turbulent plumes, each originating from a circular area source located at the corners of a square. My goal is to compute and visualize the merged outer contour that encloses all four interacting plumes. I have attached the code below, the equation I am solving is at the bottom of this code. When I make the plot some gaps appear and is there a better way to plot it so the gaps disappear
%% Four-Plume Contour + Area Plotting with Automatic k_crit Detection
close all; clc; clf
global r0 k theta
%%Parameter Input
r0 = 0.25; %Plume Source Radius
%% STEP 1: Find k_crit by setting θ = π/4 and solving corresponding function, g(rho) = 0 for r0
theta = pi/4;
kL = 0*(1 – r0^2)^2; % Conservative lower bound
kU = 1.05*(1 – r0^2)^2; % Previous Theoretical maximum
k_testArray = linspace(kL,kU, 501);
rho_valid = NaN(size(k_testArray)); % Store valid roots for each k in sweep
k_crit = NaN; % First k where g(rho)=0 has a real root
contactDetected = false; % Logical flag to stop at first contact
for jj = 1:length(k_testArray)
k = k_testArray(jj);
rho = mnhf_secant(@FourPlumes_Equation, [0.1 0.5], 1e-6, 0);
if rho > 0 && isreal(rho) && isfinite(rho)
rho_valid(jj) = rho;
if ~contactDetected
k_crit = k;
contactDetected = true;
end
end
end
fprintf(‘Detected critical k value (first contact with θ = π/4): k_crit = %.8fnn’, k_crit);
%% Parameter input: k values
Nt = 10001; % Resolution, must be an odd number
theta_array = linspace(-pi/2, pi/2, Nt);
k_array = [0.6]
%k_array = [0.2 0.3 0.4 0.5 0.6 0.7 k_crit 0.8 0.9 1.2 1.5]; % test range values for k
area = zeros(1,length(k_array));
%% STEP 2: Loop over k values, plot, and compute area
figure(1); hold on; box on
for jj = 1:length(k_array)
k = k_array(jj);
% For merged Case
if k >= k_crit
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square; xlim([0 2]); ylim([-1 1]);
% Plot θ = π/4 lines for visual reference
x_diag = linspace(0, 2, Nt); y_diag = x_diag;
plot(x_diag, y_diag, ‘r–‘); plot(x_diag, -y_diag, ‘r–‘);
% Area estimation using trapezoidal rule
iq = find(y1 >= y_diag); % intersection
if ~isempty(iq)
area(jj) = 2 * abs(trapz(x1(min(iq):(Nt-1)/2+1), y1(min(iq):(Nt-1)/2+1)));
area(jj) = area(jj) + x1(min(iq)-1)^2;
end
else
% Before Merging Case
rho_array1 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array(ii);
rho_array1(ii) = mnhf_secant(@FourPlumes_Equation, [1.5 2], 1e-6, 0);
if rho_array1(ii) < 0
rho_array1(ii) = NaN;
end
end
[x1, y1] = pol2cart(theta_array, rho_array1);
plot(x1, y1, ‘-k’); axis square;
% Detect breakdown region and recompute in "gap"
ij = find(isnan(rho_array1(1:round(end/2))));
if ~isempty(ij)
theta_min = theta_array(max(ij));
theta_array2 = linspace(theta_min, -theta_min, Nt);
rho_array2 = zeros(1, Nt);
for ii = 1:Nt
theta = theta_array2(ii);
rho_array2(ii) = mnhf_secant(@FourPlumes_Equation, [0.1 0.9], 1e-6, 0);
if rho_array2(ii) < 0
rho_array2(ii) = NaN;
end
end
[x2, y2] = pol2cart(theta_array2, rho_array2);
plot(x2, y2, ‘r.’);
ik = (Nt-1)/2 + find(isnan(x2((Nt-1)/2+1:end)));
x = [x2((Nt-1)/2+1:min(ik)-1), x1(max(ij)+1:(Nt-1)/2+1)];
y = [y2((Nt-1)/2+1:min(ik)-1), -y1(max(ij)+1:(Nt-1)/2+1)];
plot(x, y, ‘b–‘); plot(x, -y, ‘b–‘);
% Area from symmetric region
area(jj) = 2 * trapz(x, y);
end
end
% Plot plume source circles (n = 4)
pos1 = [1 – r0, -r0, 2*r0, 2*r0]; % (1, 0)
pos2 = [-1 – r0, -r0, 2*r0, 2*r0]; % (-1, 0)
pos3 = [-r0, 1 – r0, 2*r0, 2*r0]; % (0, 1)
pos4 = [-r0, -1 – r0, 2*r0, 2*r0]; % (0, -1)
rectangle(‘Position’, pos1, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos2, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos3, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
rectangle(‘Position’, pos4, ‘Curvature’, [1 1], ‘FaceColor’, ‘k’);
end
%% Function: Four-Plume Equation (Li & Flynn B3) —
function f = FourPlumes_Equation(rho)
global r0 k theta
f = (rho.^2 – 2*rho*cos(theta) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi/2) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + pi) + 1 – r0^2) .* …
(rho.^2 – 2*rho*cos(theta + 1.5*pi) + 1 – r0^2) – k^2;
end
function r=mnhf_secant(Fun,x,tol,trace)
%MNHF_SECANT finds the root of "Fun" using secant scheme.
%
% Fun – name of the external function
% x – vector of length 2, (initial guesses)
% tol – tolerance
% trace – print intermediate results
%
% Usage mnhf_secant(@poly1,[-0.5 2.0],1e-8,1)
% poly1 is the name of the external function.
% [-0.5 2.0] are the initial guesses for the root.
% Check inputs.
if nargin < 4, trace = 1; end
if nargin < 3, tol = 1e-8; end
if (length(x) ~= 2)
error(‘Please provide two initial guesses’)
end
f = feval(Fun,x); % Fun is assumed to accept a vector
for i = 1:100
x3 = x(1)-f(1)*(x(2)-x(1))/(f(2)-f(1)); % Update the guess.
f3 = feval(Fun,x3); % Function evaluation.
if trace, fprintf(1,’%3i %12.5f %12.5fn’, i,x3,f3); end
if abs(f3) < tol % Check for convergenece.
r = x3;
return
else % Reset values for x(1), x(2), f(1) and f(2).
x(1) = x(2); f(1) = f(2); x(2) = x3; f(2) = f3;
end
end
r = NaN;
end numerical solution, nonlinear-equations, root-finding, polar-coordinates, contour-gaps MATLAB Answers — New Questions
Backslash (mldivide) slower than inverse and multiplication
The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A)The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A) The common wisdom is that Ay is more accurate than inv(A)*y and I believe that to be true, but when is it also faster? Say the matrix A is well-conditioned so I don’t really care about the ability of to find a least-squares solution.
Am I doing something misleading here? The takes much longer.
A = randn(20);
A = A*A’;
s = randn(20,1);
timeit(@() inv(A)*s)
timeit(@() A s)
From the documentation for mldivide, it sounds like it should be using the Cholesky solver since A is Hermitian, why is that not faster than an inv and matrix multiplication?
ishermitian(A) mldivide, inv, slow MATLAB Answers — New Questions
How to integrate PEM electrolysis system and PEM fuel cell system to form the DC Electrical Power System?
Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance.Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance. Fig. 1 shows the PEM (Polymer Electrolyte Membrane) Electrolysis System.
Fig.1 PEM Electrolysis System
Fig. 2 shows the PEM (Polymer Electrolyte Membrane) Fuel Cell System.
Fig.2 PEM Fuel Cell System
Fig. 3 shows the Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System.
Fig.3 Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System
My question is how to complete the following tasks:
(1) Integrate Fig. 1 and Fig. 2 to form the DC Electrical Power System—the PEM Electrolysis—Fuel Cell.
(2) Integrate Fig. 1, Fig. 2, and Fig. 3 to form the DC Electrical Power System—PEM Electrolysis—Fuel Cell—Electrical Power System.
Reference:
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
PEM Fuel Cell System:https://ww2.mathworks.cn/help/simscape/ug/pem-fuel-cell-system.html
Fuel Cell Model:https://ww2.mathworks.cn/discovery/fuel-cell-model.html
Solid-Oxide Fuel Cell Connected to Three-Phase Electrical Power System:
https://ww2.mathworks.cn/help/sps/ug/solid-oxide-fuel-cell-connected-to-three-phase-electrical-power-system.html
Hydrogen Electrolyzer: https://ww2.mathworks.cn/discovery/hydrogen-electrolyzer.html
https://ww2.mathworks.cn/help/simscape/ug/pem-electrolysis-system.html
Integrating the PEM electrolysis system and the PEM fuel cell system—does this mean replacing the Hydrogen Source in the PEM fuel cell system with the PEM Electrolysis System? Could the experts provide specific guidance on this? Thanks in advance. pem electrolysis system, pem fuel cell system, solid-oxide fuel cell MATLAB Answers — New Questions
Target error. Application connection problem with speedgoat, Simulink real-time
I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application."I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application." I am trying to launch an application on a speedgoat, I am well connected to the speedgoat and I can load my application without any problem, but when I click start, I get: "Error communicating with target ‘TargetName’. Unable to start application on target computer ‘TargetName’. Unable to connect to application." speedgoat, connection, application, real-time MATLAB Answers — New Questions
How to change the background color of uiradiobuttons?
I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off!I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off! I have a few uibuttongroups in my app and to distinguish them visually I want to apply different background colors to them. But the radiobuttons’ backgroundcolor can’t be changed so the whole setup looks a bit weird.
Here is a sample code:
fig=uifigure;
bg=uibuttongroup(fig,’BackgroundColor’,[0.8 0.9 1],’Position’,[100 100 150 150]);
rb1=uiradiobutton(bg,’Text’,’Previous’,’Position’,[10 100 75 20]);
rb2=uiradiobutton(bg,’Text’,’Next’,’Position’,[10 50 75 20]);
%rb1.BackgroundColor=[0.8 0.9 1]; %Won’t work!
In addition, the default background grey of uibuttongroup & uiradiobutton are slightly different in R2025a so even with the default colours, it feels like something is off! appdesigner, uiradiobuttons MATLAB Answers — New Questions
Measure the model mass and moment of inertia of the component detached from the main body
I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes?I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes? I need to measure the mass and moment of inertia of a multi-component model in Simscape in real time. During the simulation process, some fixed components need to be detached from the main body one by one. I have used Weld Joint and Inertia Sensor, and found that the mass measured by Inertia Sensor did not decrease after the Weld Joint detached a component from the main body. In addition, I have also used Enabled Subsystems, trying to switch the connection method between the component and the main body when a component detached from the main body (from Rigid Transform to 6-DOF Joint), but it could not run. Is there any way to measure the inertia parameters of a model whose structure changes? inertia sensor, weld joint MATLAB Answers — New Questions
Parfor HPC Cluster – How to Assign Objects to Same Core Consistently?
Hello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objectsHello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objects Hello,
TLDR: Is there a way to force Matlab to consistently assign a classdef object to the same core? With a parfor loop inside another loop?
Details:
I’m working on a fairly complex/large scale project which involves a large number of classdef objects & a 3D simulation. I’m running on an HPC cluster using the Slurm scheduler.
The 3D simulation has to run in a serial triple loop (at least for now; that’s not the bottleneck).
The bottleneck is the array of objects, each of which stores its own state & calls ode15s once per iteration. These are all independent so I want to run this part in a parfor loop, and this step takes much longer than the triple loop right now.
I’m running on a small test chunk within the 3D space, with about 1200 independent objects. Ultimately this will need to scale about 100x to 150,000 objects, so I need to make this as efficient as possible.
It looks like Matlab is smartly assigning the same object to the same core for the first ~704 objects, but then after that it randomly toggles between 2 cores & a few others:
This shows ~20 loops (loop iterations going downwards), with ~1200 class objects on the X axis; the colors represent the core/task assignment on each iteration using this to create this matrix:
task = getCurrentTask();
coreID(ti, ci) = task.ID;
This plot was created assigning the objects in a parfor loop, but that didn’t help:
The basic structure of the code is this:
% pseudocode:
n_objects = 1200; % this needs to scale up to ~150,000 (so ~100x)
for i:n_objects
object_array(i) = constructor();
% also tried doing this as parfor but didn’t help
end
% … other setup code…
% Big Loop:
dt = 1; % seconds
n_timesteps = 10000;
for i = 1:n_timesteps
% unavoidable 3D triple loop update
update3D(dt);
parfor j = 1:n_objects
% each object depends on 1 scalar from the 3D matrix
object_array(i).update_ODEs(dt); % each object calls ode15s independently
end
% update 3D matrix with 1 scalar from each ODE object
end
I’ve tried adding more RAM per core, but for some reason, it still seems to break after the 704th core, which is interesting.
And doing the object initialization/constructors inside a parfor loop made the initial core assignments less consistent (top row of plot).
Anyway, thank you for your help & please let me know if you have any ideas!
I’m also curious if there’s a way to make the "Big Loop" the parfor loop, and make a "serial critical section" or something for the 3D part? Or some other hack like that?
Thank you!
ETA 7/28/25: Updated pseudocode with dt & scalar values passing between 3D simulation & ODE objects parallel computing, parfor, hpc, cluster, memory fragmentation MATLAB Answers — New Questions
How can I configure MATLAB to use the local offline documentation instead of the online documentation?
I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this?I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this? I would like to be able to browse the locally installed documentation instead of the web documentation available at mathworks.com. I need to do this because my laptop does not always have an internet connection, or because my release is older than 5 years and the release-specific documentation is no longer available online. How can I configure MATLAB to do this? offline, documentation, installed, local, doc MATLAB Answers — New Questions
Error Using unitConvert from Celsius to Fahrenheit.
When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug.When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug. When using unitConvert from Celsius to Fahrenheit and vice versa I noticed it was giving me incorrect answers. It is just multiplying or dividing by 9/5ths and forgetting to add or subtract the 32. Is there a way to fix this or is this a bug. bug, symbolic MATLAB Answers — New Questions
Help with Solving PDE System with DAE in MATLAB
I hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
WilliamI hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
William I hope you’re doing well. My name is William. I’m currently working on a problem and was hoping you might be able to help. I have a system of PDEs, but one of the variables does not include a time derivative (e.g., no ∂u/∂t), even though the variable depends on both time and space. I’m not sure how to approach solving this in MATLAB. I’ve been able to implement it in gPROMS, but translating it into MATLAB has been challenging.
I tried to follow your DAE method, but my variables depend on both time and space—not just time—so I’m unsure how to proceed. If you could offer any guidance or point me in the right direction, I would greatly appreciate it.
Thank you for your time and support.
Best regards,
William dae MATLAB Answers — New Questions
Add column with values to table based on value in existing column (look up)
I want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
endI want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
end I want to add a column to the end of Matrix.csv (my actual data is irregular and 18000+ lines) that matches the value in the Direction column to the heading below and outputs the corresponding wDir value.
I am trying to produce something like an excel lookup function after creating headingTable through the below code.
heading = ["000", "015", "030", "045", "060", "075", "090", "105", "120", "135", "150", "165", …
"180", "195", "210", "225", "240", "255", "270", "285", "300", "315", "330", "345"];
wDir = [90 75 60 45 30 15 0 345 330 315 300 295 270 255 240 225 210 195 180 165 150 135 120 105];
count = 0;
for i =1:numel(wDir)
heading1 = heading(i);
wDir1 = wDir(i);
outData = [heading1 wDir1];
count =count + 1;
headingTable(count,:) = outData;
end column, lookup, matrix, table, match, matching MATLAB Answers — New Questions
Creating a grouped bar plot from a table having multiple column
I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table.I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table. I have the following table:
ValuationRatios company industry sector
___________________________________ _______ ________ ______
"P/E Ratio" 31.96 0 0
"Price/Revenue" 7.79 6.35 7.04
"Price/Book" 45.88 25.45 10.02
"Price to Cash Flow per Share" 28.46 1.33 3.89
"Price to Free Cash Flow per Share" 31.66 1.82 6.37
"Dividend Yield" 0.49 0.49 0.6
"Payout Ratio" 15.58 15.59 28.8
"Quick/Acid Test Ratio" 0.75 0.61 1.03
whos Tindclean
Name Size Bytes Class Attributes
Tindclean 23×4 4221 table
Tindclean.Properties.VariableTypes
string double double double (1 x 4) string
I am trying to create a grouped bar plot/stacked from the table. group bar or stacked plot with multiple columns MATLAB Answers — New Questions
fractional discrete henon map
I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide.I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide. I’m currently working on the fractional Hénon map, but I’m facing difficulties in drawing the bifurcation diagrams correctly. I’m not sure how to implement the fractional order in the iteration process or which method is most suitable. I would really appreciate any guidance or examples you could provide. henon fractional map, bifurcation diagram MATLAB Answers — New Questions
How can I declare Hexadecimal enum constants in a classdef
classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers!classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers! classdef xyz
properties(Constant)
WaveformTypes = struct(‘SINE’,0, ‘SQUARE’,1, ‘TRIANGLE’,2, ‘RAMP UP’,3, …
‘RAMP DOWN’,4, ‘DC’,5, ‘PULSE’,6, ‘PWM’,7, ‘ARB’,8, ‘COMPOSITE’,9, ‘CUSTOM LUT’, A);
end
methods(Static)
*functions of xyz implemented with calllib*
end
end
I tried using 0x1, 0x2, etc, but this throws a property syntax error. My first question is, will the ‘A’ here denote a hexadecimal value? If not, how else do I declare?
My second question, is there is a better way to implement this? Please ask if you need any further info. Cheers! classes, constants, hexadecimal, enums MATLAB Answers — New Questions
Find your Office apps in Windows – Microsoft Support
Learn how to find your Office apps in Windows 10 by searching for them in the search box on the taskbar.
I have enabled SSH and am accessing my Raspberry Pi 5 using VNC. The Raspberry Pi is also connected to the network. However, when I try to check the connection, the system sho
Post Content Post Content simulink, matlab MATLAB Answers — New Questions
How Microsoft’s customers and partners accelerated AI Transformation in FY25 to innovate with purpose and shape their future success
Over the past fiscal year, our customers and partners have driven pragmatic outcomes by implementing AI-first strategies across their organizations. With AI Transformation as their framework, we helped them enrich employee experiences, reinvent customer engagement, reshape business processes and bend the curve on innovation for their people, businesses and industries. Now, we are partnering to go beyond what they thought possible to unlock even greater potential by restructuring and centralizing their business strategies with an AI-first mindset. Our cloud and AI capabilities are leading the industry, and we are committed to working closely with our customers and partners to meet their increasingly complex needs and help them become frontier AI firms.
Below are several stories from the past quarter reflecting the success we have seen broadly this past year. Each showcases what we can achieve together with an approach grounded in AI business solutions, cloud and AI platforms, and security.
AI is blurring the lines between personal and organizational productivity, and we are helping our customers leverage Copilots and agents combined with human ambition to create differentiation.
With over one million customers in Argentina, Banco Ciudad launched a digital transformation initiative focused on AI, productivity and security. What began as a pilot program quickly grew into broad adoption with the bank implementing Microsoft 365 Copilot to improve productivity, Microsoft Copilot Studio to develop agents and Microsoft Azure to scale their AI solutions. As a result, the bank strengthened its operational resilience, empowered teams, drove sustainable growth and improved customer engagement — even in a challenging economic environment. So far, the bank has freed up 2,400 employee work hours annually with savings projected to generate $75,000 USD monthly.
As one of the country’s largest financial institutions, Commonwealth Bank of Australia is harnessing AI to meet rising customer expectations by developing smarter, more secure and highly customizable banking experiences at scale. To ensure employees have the confidence and expertise to leverage AI effectively, the bank launched a structured skilling initiative to empower them with the knowledge needed to adopt AI effectively. Eighty-four percent of 10,000 Microsoft 365 Copilot users reported they would not go back to working without it; and nearly 30% of GitHub Copilot code suggestions were adopted, driving efficiency and smarter decision-making.
Nonprofit Make-A-Wish is dedicated to granting hope by fulfilling wishes for children with critical illnesses across the United States. Fragmented systems, limited data access and the need to protect sensitive information were creating challenges for the organization to operate effectively, so it turned to partner Redapt for support. Make-A-Wish deployed comprehensive Microsoft cloud and AI solutions — including Azure Cloud Services, Microsoft Fabric, Microsoft 365 Copilot and Copilot Studio — to unify its data, rebuild core applications and boost staff productivity. This transformation enabled the organization to increase operational efficiency, improve collaboration across national and regional chapters and strengthen its data security to protect sensitive family data.
Sheló NABEL, a wellness and beauty company based in Mexico, faced operational challenges as it expanded its network of independent entrepreneurs. With support from partner Best Practices Consulting, the company integrated Microsoft Dynamics 365 to gain real-time market insights and optimize its demand planning across more than 400 products. They also integrated Microsoft Copilot to enhance customer service and increase operational efficiency with AI. As a result, the company has achieved a 17% increase in sales, 5X faster reporting processes and real-time inventory control.
Based in Saudi Arabia, technology and communications company Unifonic serves millions of people across 160 countries. As their business began to scale rapidly, they faced challenges managing a growing hybrid workforce while maintaining strong security and compliance standards. To solve this, the company deployed Microsoft 365 E5 and Microsoft 365 Copilot to automate workflows and secure data in one platform. This unified ecosystem enabled teams to reduce time spent on audits by 85%, save two hours per day on cybersecurity governance, save $250,000 USD in costs and reduce time to set up client demos by 15%.
Microsoft has the leading cloud platform for AI innovation with Azure as the infrastructure, Azure AI Foundry as the applications server and Fabric as the data platform.
As legal professionals face challenges with manual data entry, document generation and compliance-heavy processes, Assembly Software aimed to transform how they handle complex, time-consuming workflows. Using Azure AI Foundry, the company built NeosAI — a fully embedded generative AI solution that automates nearly every aspect of the legal workflow — from document intake to drafting and reporting. As a result, law firms using NeosAI report saving up to 25 hours per case, with document drafting time reduced from 40 hours to just minutes. This AI solution is not only boosting productivity and reducing stress for legal professionals but also enabling firms to serve more clients with greater speed and accuracy.
One of the world’s oldest continuously operating companies, Husqvarna Group, faced increasing pressure to modernize its network of factories, supply chains and distribution channels to stay competitive in a rapidly evolving landscape. The company implemented a comprehensive Microsoft Azure solution — including Azure Arc, Azure IoT Operations and Azure OpenAI — to unify cloud and on-premises systems, enable real-time data insights and drive innovation across global manufacturing operations. As a result, the company achieved a 98% reduction in data deployment time, cut infrastructure imaging costs by 50% and significantly improved productivity and uptime across its connected factories.
Serving over 600,000 members in the United States, Members 1st Federal Credit Union sought to modernize its data infrastructure to deliver more personalized member experiences and support data-driven decision-making. The credit union faced challenges with siloed data across more than 15 sources and legacy systems with limited analytics capabilities. With support from partner 3Cloud, the credit union combined Azure SQL, Azure Data Factory and Azure Databricks to extract, log and centralize enterprise-wide data into a cutting-edge data lakehouse. Machine learning models that took 36 hours to run can now be done in three to four hours — a reduction of about 89%. Additionally, updates within its customer relationship management software now take 30 to 40 minutes compared to three to four hours previously.
NTT DATA, a global IT and business services leader headquartered in Japan, sought to accelerate decision-making and unlock deeper insights by overcoming limitations of legacy dashboards and siloed data systems. Serving clients in over 50 countries, the company needed a more intuitive, scalable and AI-driven approach to data access and analysis. NTT DATA deployed Microsoft Fabric, Azure AI Foundry Agent Service and Azure AI Foundry to enable the creation of conversational AI tools that allow employees to retrieve and act on real-time data. This agentic AI platform significantly improved productivity, reduced time to market for new solutions by 50% and laid the foundation for broader adoption of multi-agent frameworks across the organization.
University of Venda, a public higher education institution in South Africa, modernized its IT infrastructure to support its strategic goal of producing globally competitive graduates while meeting the evolving needs of its regional and international students. Facing challenges with aging on-premises servers, frequent service interruptions and a six-month hardware procurement cycle, the university sought a more agile and reliable solution. By deploying Microsoft 365, migrating 18 systems to Microsoft Azure and leveraging Microsoft Unified Support, the university achieved 99% service uptime and reduced resource provisioning time from six months to under 12 hours. This transformation significantly improved system reliability, scalability and security, enabling students and staff to access essential services seamlessly from anywhere.
Security is the foundation for AI Transformation. We are helping our customers and partners defend against threat actors and secure their environments with Microsoft’s cloud and AI solutions.
Following its spinoff from Eli Lilly, Elanco sought to modernize its IT and security infrastructure by building a secure, scalable digital environment from the ground up. The company deployed a comprehensive Microsoft solution stack comprised of Microsoft 365 E5, Microsoft Defender suite, Microsoft Sentinel, Microsoft Intune and Microsoft Security Copilot. This integrated approach streamlined global IT operations across 90 countries, enabling Elanco to accelerate security response times by 50% with a future-ready, secure and efficient digital ecosystem that empowers their workforce.
Kern County faced significant challenges securing and governing their data across 40 departments — each operating with fragmented IT systems. With an approach grounded in data protection, the county deployed Microsoft Purview as part of its Microsoft 365 Government G5 suite. The implementation resulted in the classification of over 13 million files, near-total adoption of sensitivity labels and over 3,000 data loss prevention alerts in a single month. A validation assessment also showed the county saved about $1 million in mitigation risk and potential noncompliance. This transformation strengthened audit readiness, reduced data exposure risks and laid a secure foundation for future innovation.
Headquartered in the Czech Republic, Mews provides cloud-based property management solutions to help modernize hotel operations worldwide. As it scaled its platform to serve thousands of properties worldwide, the company faced increasing cybersecurity threats and sought to strengthen its security posture and streamline threat detection. By deploying Microsoft Sentinel, Microsoft Defender for Cloud, Microsoft Entra ID and Microsoft Security Copilot, they enabled real-time monitoring, automated threat response and centralized visibility across its cloud infrastructure. As a result, the company reduced incident response times from hours to minutes and enhanced its ability to meet stringent compliance requirements to ensure secure growth in a highly regulated industry.
Puritan Life Insurance Company of America transformed its business model by launching Canvas Annuity — a direct-to-consumer digital distribution platform built entirely on Microsoft Azure. With the security features built into the technology out of the box, the team can detect and block malware attacks and threats, manage security efficiently and more easily pass regulatory, financial and information security audits. By creating a secure, scalable and user-friendly platform, customers can now purchase annuities online in just 10 minutes — a speed previously unheard of. Since launching, the company has seen a 700% increase in annual premium revenue, with the platform now accounting for 75% of premiums every year.
Facing growing cyber threats to its research, Singapore Management University needed to maintain seamless access for students and faculty while ensuring compliance with the country’s stringent data privacy regulations. The university implemented Microsoft’s Zero Trust framework by integrating Microsoft Security Copilot with Microsoft’s comprehensive security suite to strengthen protection while maintaining academic accessibility. This helped reduce response times and ease workloads for security teams while also supporting security analysts to streamline incident investigations, summarize complex multistage attacks and receive guided response recommendations in real time. The integrated security solution reduced operational costs and enhanced compliance reporting while maintaining seamless access to research resources.
For additional AI Transformation stories, check out AI-powered success—with more than 1,000 stories of customer transformation and innovation.
I could not be more excited by our mission than I am today — and I believe we have never been closer to bringing it to life than we are right now. With Microsoft’s leading technology and expertise, we are helping our customers and partners implement AI to bring out the best in individuals, organizations and companies. We are partnering to reinvent their business strategies and move beyond AI adoption alone to innovate with purpose and shape their futures as frontier AI firms. The opportunity to differentiate your business through AI Transformation and pave the way for industry leadership is now.
The post How Microsoft’s customers and partners accelerated AI Transformation in FY25 to innovate with purpose and shape their future success appeared first on The Official Microsoft Blog.
Over the past fiscal year, our customers and partners have driven pragmatic outcomes by implementing AI-first strategies across their organizations. With AI Transformation as their framework, we helped them enrich employee experiences, reinvent customer engagement, reshape business processes and bend the curve on innovation for their people, businesses and industries. Now, we are partnering to…
The post How Microsoft’s customers and partners accelerated AI Transformation in FY25 to innovate with purpose and shape their future success appeared first on The Official Microsoft Blog.Read More