Month: April 2025
Minor mistake Writing a function but error
Hello just a quick question, I am writing a code but an error keeps poping up for the function I entered
By any chance would you know why it keeps coming up as a red warning
f=@ (1./x)+(sqrt(x).*exp(x));Hello just a quick question, I am writing a code but an error keeps poping up for the function I entered
By any chance would you know why it keeps coming up as a red warning
f=@ (1./x)+(sqrt(x).*exp(x)); Hello just a quick question, I am writing a code but an error keeps poping up for the function I entered
By any chance would you know why it keeps coming up as a red warning
f=@ (1./x)+(sqrt(x).*exp(x)); function, error, display MATLAB Answers — New Questions
Trying to add callback function in class
I am attempting to create a class the will have two line ROI objects. This class should have a callback function for when the lines are moved by the user. I am able to add a listener to the lines but only if the callback function is static.
Is it possible to do this without using a static method? Ultimatly I would like to use the callback method to compare the positions of the two lines as one of them is moved.
classdef imageRange < handle
properties
region double
line1
line2
rect
X double
end
methods
function obj = imageRange(axes, dataAxes)
x = dataAxes{1,4};
y = dataAxes{2,4};
midpoint = mean([x(1),x(3)]);
obj.X = floor(midpoint);
obj.rect = rectangle(axes,’Position’,[obj.X,y(1),…
ceil(midpoint)-floor(midpoint), y(3) – y(1)]);
obj.rect.EdgeColor = [0,0,0,0];
obj.rect.FaceColor = [.5,.5,.5];
obj.rect.FaceAlpha = .1;
obj.line1 = drawline(axes,’Position’,[floor(midpoint), y(1); …
floor(midpoint), y(3)],’Color’,[0.6350 0.0780 0.1840], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
addlistener(obj.line1, ‘MovingROI’, @(src,event)obj.allevents(src,event));
obj.line2 = drawline(axes,’Position’,[ceil(midpoint), y(1); …
ceil(midpoint), y(3)],’Color’,[0 0.4470 0.7410], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
obj.region = dataAxes{1,5};
end
end
methods (Static)
function allevents(src,event)
event.PreviousPosition(1,1)
end
end
endI am attempting to create a class the will have two line ROI objects. This class should have a callback function for when the lines are moved by the user. I am able to add a listener to the lines but only if the callback function is static.
Is it possible to do this without using a static method? Ultimatly I would like to use the callback method to compare the positions of the two lines as one of them is moved.
classdef imageRange < handle
properties
region double
line1
line2
rect
X double
end
methods
function obj = imageRange(axes, dataAxes)
x = dataAxes{1,4};
y = dataAxes{2,4};
midpoint = mean([x(1),x(3)]);
obj.X = floor(midpoint);
obj.rect = rectangle(axes,’Position’,[obj.X,y(1),…
ceil(midpoint)-floor(midpoint), y(3) – y(1)]);
obj.rect.EdgeColor = [0,0,0,0];
obj.rect.FaceColor = [.5,.5,.5];
obj.rect.FaceAlpha = .1;
obj.line1 = drawline(axes,’Position’,[floor(midpoint), y(1); …
floor(midpoint), y(3)],’Color’,[0.6350 0.0780 0.1840], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
addlistener(obj.line1, ‘MovingROI’, @(src,event)obj.allevents(src,event));
obj.line2 = drawline(axes,’Position’,[ceil(midpoint), y(1); …
ceil(midpoint), y(3)],’Color’,[0 0.4470 0.7410], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
obj.region = dataAxes{1,5};
end
end
methods (Static)
function allevents(src,event)
event.PreviousPosition(1,1)
end
end
end I am attempting to create a class the will have two line ROI objects. This class should have a callback function for when the lines are moved by the user. I am able to add a listener to the lines but only if the callback function is static.
Is it possible to do this without using a static method? Ultimatly I would like to use the callback method to compare the positions of the two lines as one of them is moved.
classdef imageRange < handle
properties
region double
line1
line2
rect
X double
end
methods
function obj = imageRange(axes, dataAxes)
x = dataAxes{1,4};
y = dataAxes{2,4};
midpoint = mean([x(1),x(3)]);
obj.X = floor(midpoint);
obj.rect = rectangle(axes,’Position’,[obj.X,y(1),…
ceil(midpoint)-floor(midpoint), y(3) – y(1)]);
obj.rect.EdgeColor = [0,0,0,0];
obj.rect.FaceColor = [.5,.5,.5];
obj.rect.FaceAlpha = .1;
obj.line1 = drawline(axes,’Position’,[floor(midpoint), y(1); …
floor(midpoint), y(3)],’Color’,[0.6350 0.0780 0.1840], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
addlistener(obj.line1, ‘MovingROI’, @(src,event)obj.allevents(src,event));
obj.line2 = drawline(axes,’Position’,[ceil(midpoint), y(1); …
ceil(midpoint), y(3)],’Color’,[0 0.4470 0.7410], …
‘InteractionsAllowed’,’translate’, …
‘MarkerSize’,.1, …
‘LineWidth’,1);
obj.region = dataAxes{1,5};
end
end
methods (Static)
function allevents(src,event)
event.PreviousPosition(1,1)
end
end
end static methods, class MATLAB Answers — New Questions
Reverse 2D-lookup table in Simulink
I tried to implement a reverse 2D lookup table in Simulink according to the following description by Fangjun Jiang:
https://de.mathworks.com/matlabcentral/answers/12809-reverse-2d-lookup-table?s_tid=sug_su
First, I wrote the following Matlab code for testing and it does exactly what I expect:
% Absolute eccentricity range
e = 0:1e-06:1.5e-05;
% Piston phase angle range
rad = 0:2*pi/400:2*pi;
% Load capacity matrix
load(‘Tragkraft_alpha_AK_kpl_V03.mat’);
load_cap = Tragkraft_alpha_AK_kpl_V03;
% Instant piston phase angle
rad_dyn = 3.12588469032184;
% Reverse 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% Instant load capacity
load_dyn = 659.331131439451;
% Instant absolute eccentricity
e_dyn = interp1(lookup,e,load_dyn);
After that, I tried to implement it in Simulink using a MATLAB function block with the following code:
function e_dyn = fcn(rad_dyn, load_dyn, load_cap)
% absolute eccentricity range
e = 0:1e-06:1.5e-05;
% piston phase angle range
rad = 0:2*pi/400:2*pi;
% 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% instant absolute eccentricity
e_dyn=interp1(lookup,e,load_dyn);
However, this leads to the following error message that I don’t really understand. In my understanding the Simulink model should do exactly the same as the Matlab code. Can anybody tell me how to fix that in Simulink?I tried to implement a reverse 2D lookup table in Simulink according to the following description by Fangjun Jiang:
https://de.mathworks.com/matlabcentral/answers/12809-reverse-2d-lookup-table?s_tid=sug_su
First, I wrote the following Matlab code for testing and it does exactly what I expect:
% Absolute eccentricity range
e = 0:1e-06:1.5e-05;
% Piston phase angle range
rad = 0:2*pi/400:2*pi;
% Load capacity matrix
load(‘Tragkraft_alpha_AK_kpl_V03.mat’);
load_cap = Tragkraft_alpha_AK_kpl_V03;
% Instant piston phase angle
rad_dyn = 3.12588469032184;
% Reverse 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% Instant load capacity
load_dyn = 659.331131439451;
% Instant absolute eccentricity
e_dyn = interp1(lookup,e,load_dyn);
After that, I tried to implement it in Simulink using a MATLAB function block with the following code:
function e_dyn = fcn(rad_dyn, load_dyn, load_cap)
% absolute eccentricity range
e = 0:1e-06:1.5e-05;
% piston phase angle range
rad = 0:2*pi/400:2*pi;
% 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% instant absolute eccentricity
e_dyn=interp1(lookup,e,load_dyn);
However, this leads to the following error message that I don’t really understand. In my understanding the Simulink model should do exactly the same as the Matlab code. Can anybody tell me how to fix that in Simulink? I tried to implement a reverse 2D lookup table in Simulink according to the following description by Fangjun Jiang:
https://de.mathworks.com/matlabcentral/answers/12809-reverse-2d-lookup-table?s_tid=sug_su
First, I wrote the following Matlab code for testing and it does exactly what I expect:
% Absolute eccentricity range
e = 0:1e-06:1.5e-05;
% Piston phase angle range
rad = 0:2*pi/400:2*pi;
% Load capacity matrix
load(‘Tragkraft_alpha_AK_kpl_V03.mat’);
load_cap = Tragkraft_alpha_AK_kpl_V03;
% Instant piston phase angle
rad_dyn = 3.12588469032184;
% Reverse 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% Instant load capacity
load_dyn = 659.331131439451;
% Instant absolute eccentricity
e_dyn = interp1(lookup,e,load_dyn);
After that, I tried to implement it in Simulink using a MATLAB function block with the following code:
function e_dyn = fcn(rad_dyn, load_dyn, load_cap)
% absolute eccentricity range
e = 0:1e-06:1.5e-05;
% piston phase angle range
rad = 0:2*pi/400:2*pi;
% 2D lookup table for load capacity
lookup = interp2(e,rad,load_cap,e,rad_dyn);
% instant absolute eccentricity
e_dyn=interp1(lookup,e,load_dyn);
However, this leads to the following error message that I don’t really understand. In my understanding the Simulink model should do exactly the same as the Matlab code. Can anybody tell me how to fix that in Simulink? lookup table, reverse, simulink MATLAB Answers — New Questions
Invalid initial condition error
I have to solve the sistem of differential equation odesys with the condition imposed in bc vector. I obtain the "Invalid Initial Condition" at the line where v is defined, even if the domain for the boundary condition is correct. I must keep it a symbolic solution and a0 is a costant.
%% ANALYTICAL MODEL FOR A DCB SPECIMEN UNDER THE CONDITION OF PRESCRIBED DISPLACEMENTS
%% Linear Elastic Phase
%———
syms x d v0(x) v1(x) v2(x) Lcz
%———
phi0 = -diff(v0,x);
M0 = E*I*diff(v0,x,2);
T0 = E*I*diff(v0,x,3);
phi1 = -diff(v1,x);
M1 = E*I*diff(v1,x,2);
T1 = E*I*diff(v1,x,3);
phi2 = -diff(v2,x);
M2 = E*I*diff(v2,x,2);
T2 = E*I*diff(v2,x,3);
%———
ode_0 = diff(v0,x,4) == 0;
ode_1 = diff(v1,x,4) – 2*w*(lambda^2)*diff(v1,x,2) + (lambda^4)*v1 == 0;
ode_2 = diff(v2,x,4) + 2*ps*(k^2)*diff(v2,x,2) – k^4*(v2 – d_c/2) == 0;
%———
syms xL xR xI
xL = -a0 – Lcz;
xI = -Lcz;
xR = L – a0 – Lcz;
c1 = v0(xL) == d/2;
c2 = M0(xL) == 0;
c3 = v0(xI) == v2(xI);
c4 = phi0(xI) == phi2(xI);
c5 = M0(xI) == M2(xI);
c6 = T0(xI) == T2(xI);
c7 = v1(0) == v2(0);
c8 = phi1(0) == phi2(0);
c9 = M1(0) == M2(0);
c10 = T1(0) == T2(0);
c11 = v1(xR) == 0;
c12 = phi1(xR) == 0;
%———
odesys = [ode_0; ode_1; ode_2];
bc = [c1; c2; c3; c4; c5; c6; c7; c8; c9; c10; c11; c12];
v = dsolve(odesys, bc);
%———
v1_sol(x,d,Lcz) = simplify(v.v1);
v0_sol(x,d,Lcz) = simplify(v.v0);
v2_sol(x,d,Lcz) = simplify(v.v2);
phi0_sol(x,d,Lcz) = diff(v0_sol,x);
phi1_sol(x,d,Lcz) = diff(v1_sol,x);
phi2_sol(x,d,Lcz) = diff(v2_sol,x);
M0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,2);
M1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,2);
M2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,2);
T0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,3);
T1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,3);
T2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,3);
%———
d_lim = solve(v0_sol(0,d,0) == d_0/2,d);
% d_max = solve(v0_sol(0,d,0) == d_0/2,d);
% Lcz_max = solve(v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0, x,[0 50]);
[d_max, Lcz_max] = solve([v1_sol(0,d,Lcz) – d_0/2 == 0, v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0],[d,Lcz]);I have to solve the sistem of differential equation odesys with the condition imposed in bc vector. I obtain the "Invalid Initial Condition" at the line where v is defined, even if the domain for the boundary condition is correct. I must keep it a symbolic solution and a0 is a costant.
%% ANALYTICAL MODEL FOR A DCB SPECIMEN UNDER THE CONDITION OF PRESCRIBED DISPLACEMENTS
%% Linear Elastic Phase
%———
syms x d v0(x) v1(x) v2(x) Lcz
%———
phi0 = -diff(v0,x);
M0 = E*I*diff(v0,x,2);
T0 = E*I*diff(v0,x,3);
phi1 = -diff(v1,x);
M1 = E*I*diff(v1,x,2);
T1 = E*I*diff(v1,x,3);
phi2 = -diff(v2,x);
M2 = E*I*diff(v2,x,2);
T2 = E*I*diff(v2,x,3);
%———
ode_0 = diff(v0,x,4) == 0;
ode_1 = diff(v1,x,4) – 2*w*(lambda^2)*diff(v1,x,2) + (lambda^4)*v1 == 0;
ode_2 = diff(v2,x,4) + 2*ps*(k^2)*diff(v2,x,2) – k^4*(v2 – d_c/2) == 0;
%———
syms xL xR xI
xL = -a0 – Lcz;
xI = -Lcz;
xR = L – a0 – Lcz;
c1 = v0(xL) == d/2;
c2 = M0(xL) == 0;
c3 = v0(xI) == v2(xI);
c4 = phi0(xI) == phi2(xI);
c5 = M0(xI) == M2(xI);
c6 = T0(xI) == T2(xI);
c7 = v1(0) == v2(0);
c8 = phi1(0) == phi2(0);
c9 = M1(0) == M2(0);
c10 = T1(0) == T2(0);
c11 = v1(xR) == 0;
c12 = phi1(xR) == 0;
%———
odesys = [ode_0; ode_1; ode_2];
bc = [c1; c2; c3; c4; c5; c6; c7; c8; c9; c10; c11; c12];
v = dsolve(odesys, bc);
%———
v1_sol(x,d,Lcz) = simplify(v.v1);
v0_sol(x,d,Lcz) = simplify(v.v0);
v2_sol(x,d,Lcz) = simplify(v.v2);
phi0_sol(x,d,Lcz) = diff(v0_sol,x);
phi1_sol(x,d,Lcz) = diff(v1_sol,x);
phi2_sol(x,d,Lcz) = diff(v2_sol,x);
M0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,2);
M1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,2);
M2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,2);
T0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,3);
T1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,3);
T2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,3);
%———
d_lim = solve(v0_sol(0,d,0) == d_0/2,d);
% d_max = solve(v0_sol(0,d,0) == d_0/2,d);
% Lcz_max = solve(v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0, x,[0 50]);
[d_max, Lcz_max] = solve([v1_sol(0,d,Lcz) – d_0/2 == 0, v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0],[d,Lcz]); I have to solve the sistem of differential equation odesys with the condition imposed in bc vector. I obtain the "Invalid Initial Condition" at the line where v is defined, even if the domain for the boundary condition is correct. I must keep it a symbolic solution and a0 is a costant.
%% ANALYTICAL MODEL FOR A DCB SPECIMEN UNDER THE CONDITION OF PRESCRIBED DISPLACEMENTS
%% Linear Elastic Phase
%———
syms x d v0(x) v1(x) v2(x) Lcz
%———
phi0 = -diff(v0,x);
M0 = E*I*diff(v0,x,2);
T0 = E*I*diff(v0,x,3);
phi1 = -diff(v1,x);
M1 = E*I*diff(v1,x,2);
T1 = E*I*diff(v1,x,3);
phi2 = -diff(v2,x);
M2 = E*I*diff(v2,x,2);
T2 = E*I*diff(v2,x,3);
%———
ode_0 = diff(v0,x,4) == 0;
ode_1 = diff(v1,x,4) – 2*w*(lambda^2)*diff(v1,x,2) + (lambda^4)*v1 == 0;
ode_2 = diff(v2,x,4) + 2*ps*(k^2)*diff(v2,x,2) – k^4*(v2 – d_c/2) == 0;
%———
syms xL xR xI
xL = -a0 – Lcz;
xI = -Lcz;
xR = L – a0 – Lcz;
c1 = v0(xL) == d/2;
c2 = M0(xL) == 0;
c3 = v0(xI) == v2(xI);
c4 = phi0(xI) == phi2(xI);
c5 = M0(xI) == M2(xI);
c6 = T0(xI) == T2(xI);
c7 = v1(0) == v2(0);
c8 = phi1(0) == phi2(0);
c9 = M1(0) == M2(0);
c10 = T1(0) == T2(0);
c11 = v1(xR) == 0;
c12 = phi1(xR) == 0;
%———
odesys = [ode_0; ode_1; ode_2];
bc = [c1; c2; c3; c4; c5; c6; c7; c8; c9; c10; c11; c12];
v = dsolve(odesys, bc);
%———
v1_sol(x,d,Lcz) = simplify(v.v1);
v0_sol(x,d,Lcz) = simplify(v.v0);
v2_sol(x,d,Lcz) = simplify(v.v2);
phi0_sol(x,d,Lcz) = diff(v0_sol,x);
phi1_sol(x,d,Lcz) = diff(v1_sol,x);
phi2_sol(x,d,Lcz) = diff(v2_sol,x);
M0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,2);
M1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,2);
M2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,2);
T0_sol(x,d,Lcz) = E*I*diff(v0_sol,x,3);
T1_sol(x,d,Lcz) = E*I*diff(v1_sol,x,3);
T2_sol(x,d,Lcz) = E*I*diff(v2_sol,x,3);
%———
d_lim = solve(v0_sol(0,d,0) == d_0/2,d);
% d_max = solve(v0_sol(0,d,0) == d_0/2,d);
% Lcz_max = solve(v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0, x,[0 50]);
[d_max, Lcz_max] = solve([v1_sol(0,d,Lcz) – d_0/2 == 0, v2_sol(-Lcz,d_max,Lcz) – d_c/2 == 0],[d,Lcz]); dsolve, ode, symbolic MATLAB Answers — New Questions
Error while creating Target starting from reference target ‘Aurix Tricore TC3x’
Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you!Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you! Hello,
I’m trying to use the Aurix Tricore TC3x Simulink Support Package to work with my TC36 board.
Since the available hardware options are only TC37, TC38, and TC39, I would like to create a new target for the TC36.
Rather than creating a new target from scratch and manually selecting all the features, I’m trying to inherit everything from the existing target and only modify the shared libraries (iLLD), the linker and the loader.
I’m using the following command:
tgt = createTarget(‘my TC36’, ‘Infineon AURIX TC3x’,’C:/TC36_TargetV1′, ‘initialize’)
But I get this error:
Error using matlabshared.targetsdk.Target/loadReferenceTargetObjects
Unable to load reference target ‘Infineon AURIX TC3x’.A table row name subscript must be a character vector, string array, or cell array of
character vectors
Error in matlabshared.targetsdk.Target
Error in createTarget (line 129)
targetObj = matlabshared.targetsdk.Target(name,refTarget,targetFolder,option);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Proceeding, I discovered that the error comes from:
matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
That gives the following:
>> matlabshared.targetsdk.loadTarget(‘Infineon AURIX TC3x’)
Error using {} (line 162)
A table row name subscript must be a character vector, string array, or cell array of character vectors
Error in matlabshared.targetsdk.Target/mapFeature
Error in matlabshared.targetsdk.Target/map
Error in matlabshared.targetsdk.Target/addNewBaremetalScheduler
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
Error in matlabshared.targetsdk.loadTarget
In particular in braceAssign.m on the line 162.
I also tried to use the loadTarget function with the ‘ARM Cortex-A’ target and it worked.
Therefore, The problem can be that I don’t know the exact target name of Infineon AURIX TC3x to use as the reference target, but I also tried to insert a wrong name argument to the loadTarget function and it gives a different result:
matlabshared.targetsdk.loadTarget(‘Infineon’)
Error using matlabshared.targetsdk.loadTarget
The target ‘Infineon’ is not registered. Make sure that the name of the target is correct and that its folders are on the MATLAB path. Also, make
sure to run ‘sl_refresh_customizations’ after you restart MATLAB.
Concluding, how can I use the Infineon AURIX TC3x as reference target?
Thank you! compiler sdk, embedded coder, infineon aurix tc3x support package, target sdk MATLAB Answers — New Questions
How to extract gray matter volumes based on a specific atlas using SPM and CAT12?
Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance!Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance! Hi everyone,
I’m new to MATLAB, SPM and CAT12, and I’m learning how to perform Voxel-Based Morphometry .
I’ve already preprocessed a T1-weighted MRI image using CAT12 and obtained TIV statis. Now I’d like to extract regional gray matter volume information from the mwp1.nii file, based on anatomical regions defined by an atlas (e.g., AAL atlas).
Could someone please guide me on how to do this?
Thanks in advance! image segmentation, cat12, spm, mri, gray matter MATLAB Answers — New Questions
Can someone help me name all this component Thak youu
name for each componentname for each component name for each component simulink, block diagram MATLAB Answers — New Questions
Clarification with IEC certified tools and the need for separate IEC certification kit
Hi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advanceHi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advance Hi,
As far as I read from the MATLAB website, the tools such as Matlab, Simulink, Embedded Coder,… are already ISO/IEC certified tools, but then, I am confused on the need for separate IEC certification kit available, to qualify those tools? Could you please clarify?
Thanks in advance iec61508, iso26262, toolbox, certification MATLAB Answers — New Questions
Ignoring Octave-specific code in Matlab 2024b
I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there.I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there. I have a following bit of code specific to Octave, in a project that is also meant to be run in Matlab:
if (isOctave())
% Set the tick label precision
set(gca, ‘xticklabel’, cellstr(num2str(get(gca, ‘xtick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
set(gca, ‘yticklabel’, cellstr(num2str(get(gca, ‘ytick’) (:), "%.2f"))) %#ok<SBTMP,*ALL>
% Set axis font size
set(gca, ‘fontsize’, 12)
end
That particular code is needed for Octave to display figures properly.
And isOctave.m is as follows:
function retval = isOctave
persistent cacheval; % speeds up repeated calls
if isempty (cacheval)
cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);
end
retval = cacheval;
end
isOctave() has been tested to properly return 0 (false) in Matlab and 1 (true) in Octave.
Now, in Matlab an error message is produced due to the indexing with a colon:
Error: File: foobar.m Line: 117 Column: 41
Invalid array indexing.
And since the code to be executed is guarded with isOctave(), which returns ‘false’, logically that code section should not even be executed in Matlab. So it’s weird that such error is being generated. And it even persist after adding the suppresstion %#ok<SBTMP,*ALL> in there. matlab, octave, code, portable MATLAB Answers — New Questions
Are Microsoft E5 Licensing Add-Ons a Good Deal?
Microsoft E5 Security for Microsoft 365 Business Premium Now Available
On April 6, 2025, Microsoft announced that the Microsoft E5 Security add-on is available to Microsoft 365 Business Premium tenants. Microsoft 365 Business Premium is one of the packages for small to medium businesses (up to 300 licensed seats). The E5 Security suite is a bundle of high-end features to improve the security of a tenant. Until now, Microsoft has targeted the add-on at enterprise customers with Office 365 E3 or Microsoft 365 E3 that want the extra security features without upgrading to Office 365 E5 or Microsoft 365 E5. This is the first time that Microsoft has made the add-on available for a small to medium product.
Finding Savings in Software Bundles
The unique selling point for the add-on is that it’s cheaper to buy it than license each of the features separately (Figure 1). Everyone loves a bargain, and saving 57% seems like a true deal.

The truth is that the E5 Security add-on is a bargain if your tenant can use its functionality. Careful assessment of each of the licensed features is necessary to understand where the tenant can gain value. For instance, if the organization currently doesn’t have the capacity to deploy Defender for Endpoint, that wipes $5.20 off the add-on’s value. If nothing can be gained from Entra P2, an extra $9 disappears, and suddenly the saving to license the other three features goes from $16.20 to $2. That’s still a saving of up to $600 monthly/$7,200 annually for a 300-person Business Premium tenant, which is not quite as impressive as the headline. And to get that saving, you must invest $43,200 annually to license the 300 seats.
On the other hand, if Entra P2 stops a tenant being compromised through an account that can be identified as risky or an attacker can be stopped because Defender for Cloud Apps detects a problematic app, then the cost of the E5 Security add-on is more than justified. It all depends on how a tenant can extract value.
The same point is valid for the Microsoft E5 Compliance add-on (also available for $12/month in the U.S.). A bunch of interesting compliance technology is covered by the add-on, but if you don’t want to use features like Insider Risk Management, Communication Compliance, customer lockbox, customer key (for sensitivity labels), and Information Barriers, the value proposition becomes much less attractive.
Playing the Licensing Game
License management is an essential competence for tenant administrators. I don’t mean negotiation of licensing deals with Microsoft. Instead, I’m referring to understanding what licenses are needed for the functionality required by the business, knowing the cheapest way to license that functionality, and keeping track of how licenses are used. Tools like the Microsoft 365 licensing report script can help here. If you don’t want to build your own tools and want an off-the-shelf product to manage licensing, I recommend CoreView license management (the sponsor of the Office 365 for IT Pros eBook).
The higher the individual license cost, the more important it is to track active and ongoing usage. Microsoft 365 Copilot is a good example. It doesn’t make sense to assign $360/year licenses to people who don’t use Copilot, so tracking Copilot usage to ensure that people with licenses use those licenses is important.
Have a Deployment Plan Before Buying Anything
If you need and can use their features, Microsoft 365 add-ins can be great value. I don’t recommend buying these add-ons unless a tenant has a plan to deploy and use the licensed technology to achieve well-defined results. Having something that you cannot use isn’t a great idea and buying expensive software just because it seems like a bargain has never been a great tactic. Small to medium enterprises might not have the expertise to assess the true worth of the functionality bundled in E5 Security add-in. If you’re in that situation, engage an expert to help build your plan.
For more information about using Microsoft E5 security with Microsoft 365 Business Premium, see the Microsoft documentation. The Microsoft E5 Compliance add-on is not available for Business Premium (but that might change).
Insight like this doesn’t come easily. You’ve got to know the technology and understand how to look behind the scenes. Benefit from the knowledge and experience of the Office 365 for IT Pros team by subscribing to the best eBook covering Office 365 and the wider Microsoft 365 ecosystem.
Change in OOP programming between 2014a and 2016 – Structures not recognized anymore?
Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks !Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks ! Hello all,
I’m working on a project that was coded in 2014a version and trying to bring it up the MatLab versions. I tried to bring it from the 2014a to 2016a version but I seem to have an issue with how the Object Oriented Programming files are handled by Matlab.
Here’s a ‘picture’ of my directory :
I have an issue where Matlab says that :
Warning: ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformation’ exceeds MATLAB’s maximum name length of 63 characters
and has been truncated to ‘bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio’.
….
Undefined variable "aaa" or class "aaa.bbb.ccc.ddd.eee.fff.ggg.B_AutomaticTransformatio".
Error in … (line …)
oPlugin = aaa.(sPlugin(6:end))(this, oParent, oGUI, varargin{:});
Has something changed in the way files and folders are handled my Matlab / OOP in the transition from 2014a to 2016a as it’s working in the 2014a version?
Also, I’m going from 2014a to 2023b versions of Matlab. Is a ‘stop’ at the 2016a version before going to the 2023b version worth it?
Thanks ! oop, structures MATLAB Answers — New Questions
How do I configure an options file with multiple licenses?
I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license?I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license? I have multiple licenses for MATLAB that I run off of one license server. How do I direct my users to the appropriate license? MATLAB Answers — New Questions
Where can I find MATLAB license files?
Where can I find MATLAB license files? Where can I find MATLAB license files? Where can I find MATLAB license files? MATLAB Answers — New Questions
Issues with HDL coder IFFT/FFT Processing with 4×1 Vectors and Data Reordering
I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response.I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response. I have created an OFDM system where, at the transmitter (Tx) side, I perform IFFT, add a cyclic prefix (CP), and then on the receiver (Rx) side, I perform FFT followed by channel estimation and equalization.
However, I encountered an issue. When I pass scalar values through the IFFT and FFT blocks, everything works fine, and the constellation graph appears as expected. However, my goal is to process data in 4×1 vectors to increase the sampling rate. After processing 4×1 vectors, the constellation graph does not appear correctly, and it seems the data is not in the expected order after the IFFT block.
My question is: when converting data to the time domain with IFFT, does the order of the data change? For example, I expect the data to go through as {0,1,2,3}, {4,5,6,7}, {8,9,10,11}, {12,13,14,15}, etc. But after IFFT, should I expect it to be {0,4,8,12}, {1,5,9,13}, and so on? If this is the case, should I introduce a reordering step after the IFFT to restore the data to its original order?
Additionally, could there be issues related to bit-reversed order, or other similar problems such as "output/input in bit-reversed order"? If you could clarify the meaning of this and how it might affect my system, I would greatly appreciate it.
For your reference, I am using HDL Coder and leveraging the HDL optimized IFFT/FFT blocks in my design.
Finally, I would be grateful if you could provide any resources or further explanations on the index order and the steps needed to process data in vector form, including any additional adjustments I need to make for IFFT/FFT operations.
Thank you very much for your time and assistance. I look forward to your response. hdl coder, ifft, fft MATLAB Answers — New Questions
Reporting the Creation of SharePoint Agents
Use Audit Records to Find Who Creates SharePoint Agents
Another day, another event on the TEC 2025 European Roadshow. This time we were in Paris and just like in London’s discussion about how to protect old confidential files from Copilot access, attendees posed many good questions. Following the discussion about how to manage agents, I was asked how an organization could discover if SharePoint agents are in use. It’s a good question that isn’t answered in Microsoft’s documentation about how to manage agents in SharePoint. Microsoft gives some details about planned administrative features for agents are in an April 8, 2025 blog post, but there’s nothing available today.
I hadn’t thought about the problem up to now. SharePoint agents are limited in scope and don’t seem to pose too many administrative challenges. Each agent exists as a file in a document library with an .agent extension (originally, agents had a .copilot extension). Except for sites marked for Restricted Content Discovery, SharePoint Online sites have a default agent that reasons over the entire site. Site members can create other agents that focus on specific parts of the site. Agents created by site members are available to all site members and can be amended by them.
Approved Agents
To mark agents as being particularly useful, site owners can approve agents to highlight the agents in the agent picker. The files for approved agents are moved to the Site Assets library where they’re stored in the Approved sub-folder of the Copilots folder. Only site owners can edit approved agents. Figure 1 shows the details of an approved agent.

Auditing Agent Creation
The creation and updating of custom SharePoint agents is evidence that people are using agents. Because the agent files are treated like other SharePoint files, audit records are captured in the Microsoft 365 audit log when these actions occur. By interrogating the audit log, we can discover who is creating agents and the sites where agents are used.
Here’s some PowerShell to use the Search-UnifiedAuditLog cmdlet to find SharePoint FileUploaded audit records for files with an .agent extension:
[array]$Records = Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -Formatted -ObjectIds "*.agent" -Operations FileUploaded -ResultSize 5000 -SessionCommand ReturnLargeset If ($Records) { $Records = $records | Sort-Object Identity -Unique Write-Host ("{0} audit records found" -f $Records.Count) } Else { Write-Host "No audit records found" Break } $AgentReport = [System.Collections.Generic.List[Object]]::new() ForEach ($Rec in $Records) { $AuditData = $Rec.AuditData | ConvertFrom-Json $ReportLine = [PSCustomObject][Ordered]@{ TimeStamp = Get-Date ($AuditData.CreationTime) -format 'dd-MMM-yyyy HH:mm' User = $AuditData.UserId Action = $AuditData.Operation SiteURL = $AuditData.SiteURL Agent = $AuditData.SourceFileName } $AgentReport.Add($ReportLine) } $AgentReport = $AgentReport | Sort-Object {$_.TimeStamp -as [datetime]} -Descending $AgentReport | Out-GridView -Title "Custom SharePoint Agent Creation" Write-Host "" Write-Host "Custom agents created in these SharePoint Online sites" $AgentReport | Group-Object SiteURL -NoElement | Sort-Object Count -Descending | Format-Table Name, Count Write-Host "" Write-Host "Custom agents created by these users" $AgentReport | Group-Object User -NoElement | Sort-Object Count -Descending | Format-Table Name, Count
Figure 2 shows some sample output seen through the Out-GridView cmdlet.

Some basic statistics are also produced about the sites where custom agents were created and the user accounts which create agents. To track agent usage, you can use the same technique to fetch and analyze FileAccessed audit events.
Microsoft Reports to Come?
Once again, the Microsoft 365 audit log is the source to answer questions. I’m sure that Microsoft will eventually get around to generating better-looking reports about agent creation and activity in the future. The usual course of events is that these kinds of gaps are filled sometime after functionality becomes available. Given that SharePoint agents reached general availability in November 2024, we’re still only finding out what reporting is needed for operational purposes, so it might take a while yet before we see any Microsoft reports.
Support the work of the Office 365 for IT Pros team by subscribing to the Office 365 for IT Pros eBook. Your support pays for the time we need to track, analyze, and document the changing world of Microsoft 365 and Office 365.
Matlab App: Get cursor position in axis continuously, keep plot interactivity
Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this?Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this? Hi there,
I’m trying to create a matlab app in which users can create geometric objects and use them for some calculations later.
These are displayed in a 3D axis, rotated slightly. I am trying to create user functions to draw lines inside that axis. For this, I wan to implement continuously displayed x,y coordinates, or crosshairs or similar, as well as data snapping. Users will only draw 2D objects on the x,y plane. I still want users to be able to rotate the plot, zoom and pan normally with the mouse.
If I use a WindowButtonMotionFcn, then I lose plot interactivity with the mouse. If I use other means of getting the cursor position, like java.awt.MouseInfo.getPointerInfo().getLocation() and getpixelposition() or similar gui coordinate functions, I have to deal with a rotated camera and axis transformation. This makes "hit detection" on the data very cumbersome.
Using axes.CurrentPoint seems useless, because it only updates when the mouse is clicked, not continuously.
Any ideas on how to do this? appdesigner, app designer, windowbuttonmotionfcn, axes, matlab gui MATLAB Answers — New Questions
Got error in resample function
I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs);I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs); I am a beginner of Matlab and I was trying to resample y by this resample function
but i got an error: " Incorrect number or types of inputs or outputs for function resample. "
please tell me what is the problem if you know. thanks a lot.
load handel.mat
y = y(:);
Fs = 8192;
fc = 2e5;
Fs_new = ceil( (Fs/2 + fc) / Fs * 2 ) * Fs;
y_resampled = resample(y,Fs_new,Fs); resample, matlab, error MATLAB Answers — New Questions
How to generate custom unoptimized code within a system composer software architecture model?
C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated).C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated). C-function code generation appears to work differently when generating code inside of a system composer software architecture model isntead of a standalone simulink model. I am trying to insert certain processer primitaves (mutexes) into my simulink model such that it is incorporated into the autogenerated code. It is a few simple lines of c++ code, so I opted to use the C-function block. In both cases, I have specified in the c-function dialogue window "Generate code as-is (optimizations off)"
Inside of an export-function simulink model, I created a c-function block that includes a comment and then a simple line of code, which generates correctly:
However, if I copy this exact same c-function into an export-function model within a system composer software architecture model, it no longer generates my my specified code. Instead, it generates function calls but does not define the functions anywhere. (Even doing a simple text search of my entire workspace only shows that the function call shown below gets generated). software architecture models, c-functions, export-function models, embedded coder, system composer MATLAB Answers — New Questions
When using a writetable to write a table file containing data in datetime format to Excel, the saved datetime data in Excel is not in the same format as the datetime data
The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath);The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath); The table data is as follows:
Use the following writetable function code to save data to Excel,the exported result is shown in the following figure:
The time display is incomplete.
How to set the exported time format to be the same as the original data?
writetable(T, filePath); writetable,datetime,excel MATLAB Answers — New Questions
Plot along line from. PDE solution
The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet")The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet") The code below solves a 1-D, transient heat transfer problem set up as in general PDE format. The solution is plotted in color across the domain from 0 to 0.1 after 10 seconds have elapsed. What is the best way to plot the temperature across the length of this domain at this final time?
Thanks
clear all;
%% Create transient thermal model
thermalmodel = createpde(1);
R1= [3,4,0,0.1,0.1,0,0,0,1,1]’;
gd= [R1];
sf= ‘R1’;
ns = char(‘R1’);
ns = ns’;
dl = decsg(gd,sf,ns);
%% Create & plot geometry
geometryFromEdges(thermalmodel,dl);
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","on")
xlim([0 0.1])
ylim([-1 1])
% axis equal
%% Generate and plot mesh
generateMesh(thermalmodel)
figure
pdemesh(thermalmodel)
title("Mesh with Quadratic Triangular Elements")
%% Apply BCs
% Edge 4 is left edge; Edge 2 is right side
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[4],u=100);
applyBoundaryCondition(thermalmodel, "dirichlet",Edge=[2],u=20);
%% Apply thermal properties [copper]
rho= 8933 %
cp= 385 %
rhocp= rho*cp %
k= 401 % W/mK
%% Define uniform volumetric heat generation rate
Qgen= 0 % W/m3
%% Define coefficients for generic Governing Equation to be solved
m= 0
a= 0
d= rhocp
c= [k]
f= [Qgen]
specifyCoefficients(thermalmodel, m=0, d=rhocp, c=k, a=0, f=f);
%% Apply initial condition
setInitialConditions(thermalmodel, 20);
%% Define time limits
tlist= 0: 1: 10;
thermalresults= solvepde(thermalmodel, tlist);
% Plot results
sol = thermalresults.NodalSolution;
subplot(2,2,1)
pdeplot(thermalmodel,"XYData",sol(:,11), …
"Contour","on",…
"ColorMap","jet") plotting MATLAB Answers — New Questions