Month: August 2024
Help using Word equation editor
I have been unable to do two separate things that i consider quite essential for advanced mathematics.
I am unable to find any way of implementing a block matrix. That is a big matrix that is dividied into submatrices by vertical and horizontal lines within the matrix
I can’t find a way to cancel equation terms to zero with an arrow striking through them. Similar to the cancelto command in Latex
Any suggestions are welcome. Thank you!
Question 1
Question 2
I have been unable to do two separate things that i consider quite essential for advanced mathematics.I am unable to find any way of implementing a block matrix. That is a big matrix that is dividied into submatrices by vertical and horizontal lines within the matrixI can’t find a way to cancel equation terms to zero with an arrow striking through them. Similar to the cancelto command in LatexAny suggestions are welcome. Thank you! Question 1 Question 2 Read More
fingerprint and facial recognition is unavailable
when i am using windows 10 i am able to use my fingerprint and facial recognition lock. after updating to windows 11 insider i am not able to use this. can you solve this problem
when i am using windows 10 i am able to use my fingerprint and facial recognition lock. after updating to windows 11 insider i am not able to use this. can you solve this problem Read More
Clave de activación de Matlab Simulink para estudiantes
Estimado,
¿Todo está bien?
Mi nombre es Roberta, soy estudiante de posgrado en la Universidad Federal de Bahía, en Brasil y me gustaría saber cómo puedo acceder a la clave de activación de Matlab Simulink para estudiantes.
¡Gracias de antemano!Estimado,
¿Todo está bien?
Mi nombre es Roberta, soy estudiante de posgrado en la Universidad Federal de Bahía, en Brasil y me gustaría saber cómo puedo acceder a la clave de activación de Matlab Simulink para estudiantes.
¡Gracias de antemano! Estimado,
¿Todo está bien?
Mi nombre es Roberta, soy estudiante de posgrado en la Universidad Federal de Bahía, en Brasil y me gustaría saber cómo puedo acceder a la clave de activación de Matlab Simulink para estudiantes.
¡Gracias de antemano! matlab code, clave de activación MATLAB Answers — New Questions
Using ss2tf when your matrices are variables without values yet
syms m b k
A = [0 (1/m+1/b);-k (-k/m-k/b)]
B = [0;k]
C = [0 1]
D = [0]
[b,a] = ss2tf(A,B,C,D)
I would like to get the transfer function of those matrices but the ss2tf function requires the matrices to be numerical. Is there a way to get a symbolic answer or am I looking at the wrong function?syms m b k
A = [0 (1/m+1/b);-k (-k/m-k/b)]
B = [0;k]
C = [0 1]
D = [0]
[b,a] = ss2tf(A,B,C,D)
I would like to get the transfer function of those matrices but the ss2tf function requires the matrices to be numerical. Is there a way to get a symbolic answer or am I looking at the wrong function? syms m b k
A = [0 (1/m+1/b);-k (-k/m-k/b)]
B = [0;k]
C = [0 1]
D = [0]
[b,a] = ss2tf(A,B,C,D)
I would like to get the transfer function of those matrices but the ss2tf function requires the matrices to be numerical. Is there a way to get a symbolic answer or am I looking at the wrong function? state space, transfer function MATLAB Answers — New Questions
Why did my MPC code not track the references?
I wrote code for the MPC controller to control a stable system to track to the desired value, but the system can not track the desired value, and I can not understand why the MPC controller can not track the desired value. Code I wrote as follows
t0 = 0 ;
tf = 40;
ts = 0.01;
t = t0:ts:tf ;
A = [0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1;-1967.63005780347,983.815028901734,0,0,0,-16.9768786127168,8.48843930635838,0,0,0;983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0,0;0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0;0,0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838;0,0,0,983.815028901734,-983.815028901734,0,0,0,8.48843930635838,-8.48843930635838];
B = [0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;-0.00289017341040462,0,0,0,0;0,-0.00289017341040462,0,0,0;0,0,-0.00289017341040462,0,0;0,0,0,-0.00289017341040462,0;0,0,0,0,-0.00289017341040462];
C = [1,0,0,0,0,0,0,0,0,0;0,1,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0,0;0,0,0,1,0,0,0,0,0,0;0,0,0,0,1,0,0,0,0,0;0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1]; ;
sys=ss(A,B,C,0);
sys1=c2d(sys,ts);
Am = sys1.a ;
Bm = sys1.b ;
Cm = sys1.c ;
n = size(Am ,1) ; % number of eigenvalues
q = size(Cm , 1) ; % number of outputs
m = size(Bm , 2) ; % number of inputs
Np =15 ; % Prediction Horizon
Nc = 10; % Control Horizon
F = zeros(q*Np , size(Am , 1)) ;
for i = 1:Np
F(q*i-q+1:q*i , 🙂 = Cm * Am^i ;
end
PHI = zeros(q * Np , m*Nc);
for i = 1:Np
for j = 1:i
PHI(q*i-q+1:q*i , m*j-m+1:m*j) = Cm * Am^(i-j) * Bm ;
end
end
PHI = PHI( : , 1:Nc*m) ;
%% Main Loop
Nt = numel(t) ;
%W = [ones(floor(Nt/4) , 1) ; 2*ones(floor(Nt/4) , 1) ; -ones(floor(Nt/4) , 1) ; zeros(floor(Nt/4+1) , 1)] ;
W = [ones(floor(Nt) , 1)]
y = zeros(q , Nt) ;
du = zeros(m , Nt) ;
u = zeros(m , Nt)
x = zeros(size(Am , 1) , Nt) ;
R = 1 ;
Fval = zeros(Nt , 1 ) ;
for i = 2:Nt-1
FreeResponse = F * x(: , i);
dU = (PHI’*PHI + R * size(PHI , 2))(PHI’ * (W(i) – FreeResponse)) ;
du(: , i) = dU(1:m) ;
x(: , i+1) = Am * x(: , i) + Bm * du(: ,i) ;
y(: , i+1) = Cm * x(: , i+1) ;
endI wrote code for the MPC controller to control a stable system to track to the desired value, but the system can not track the desired value, and I can not understand why the MPC controller can not track the desired value. Code I wrote as follows
t0 = 0 ;
tf = 40;
ts = 0.01;
t = t0:ts:tf ;
A = [0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1;-1967.63005780347,983.815028901734,0,0,0,-16.9768786127168,8.48843930635838,0,0,0;983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0,0;0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0;0,0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838;0,0,0,983.815028901734,-983.815028901734,0,0,0,8.48843930635838,-8.48843930635838];
B = [0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;-0.00289017341040462,0,0,0,0;0,-0.00289017341040462,0,0,0;0,0,-0.00289017341040462,0,0;0,0,0,-0.00289017341040462,0;0,0,0,0,-0.00289017341040462];
C = [1,0,0,0,0,0,0,0,0,0;0,1,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0,0;0,0,0,1,0,0,0,0,0,0;0,0,0,0,1,0,0,0,0,0;0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1]; ;
sys=ss(A,B,C,0);
sys1=c2d(sys,ts);
Am = sys1.a ;
Bm = sys1.b ;
Cm = sys1.c ;
n = size(Am ,1) ; % number of eigenvalues
q = size(Cm , 1) ; % number of outputs
m = size(Bm , 2) ; % number of inputs
Np =15 ; % Prediction Horizon
Nc = 10; % Control Horizon
F = zeros(q*Np , size(Am , 1)) ;
for i = 1:Np
F(q*i-q+1:q*i , 🙂 = Cm * Am^i ;
end
PHI = zeros(q * Np , m*Nc);
for i = 1:Np
for j = 1:i
PHI(q*i-q+1:q*i , m*j-m+1:m*j) = Cm * Am^(i-j) * Bm ;
end
end
PHI = PHI( : , 1:Nc*m) ;
%% Main Loop
Nt = numel(t) ;
%W = [ones(floor(Nt/4) , 1) ; 2*ones(floor(Nt/4) , 1) ; -ones(floor(Nt/4) , 1) ; zeros(floor(Nt/4+1) , 1)] ;
W = [ones(floor(Nt) , 1)]
y = zeros(q , Nt) ;
du = zeros(m , Nt) ;
u = zeros(m , Nt)
x = zeros(size(Am , 1) , Nt) ;
R = 1 ;
Fval = zeros(Nt , 1 ) ;
for i = 2:Nt-1
FreeResponse = F * x(: , i);
dU = (PHI’*PHI + R * size(PHI , 2))(PHI’ * (W(i) – FreeResponse)) ;
du(: , i) = dU(1:m) ;
x(: , i+1) = Am * x(: , i) + Bm * du(: ,i) ;
y(: , i+1) = Cm * x(: , i+1) ;
end I wrote code for the MPC controller to control a stable system to track to the desired value, but the system can not track the desired value, and I can not understand why the MPC controller can not track the desired value. Code I wrote as follows
t0 = 0 ;
tf = 40;
ts = 0.01;
t = t0:ts:tf ;
A = [0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1;-1967.63005780347,983.815028901734,0,0,0,-16.9768786127168,8.48843930635838,0,0,0;983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0,0;0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838,0;0,0,983.815028901734,-1967.63005780347,983.815028901734,0,0,8.48843930635838,-16.9768786127168,8.48843930635838;0,0,0,983.815028901734,-983.815028901734,0,0,0,8.48843930635838,-8.48843930635838];
B = [0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;0,0,0,0,0;-0.00289017341040462,0,0,0,0;0,-0.00289017341040462,0,0,0;0,0,-0.00289017341040462,0,0;0,0,0,-0.00289017341040462,0;0,0,0,0,-0.00289017341040462];
C = [1,0,0,0,0,0,0,0,0,0;0,1,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0,0;0,0,0,1,0,0,0,0,0,0;0,0,0,0,1,0,0,0,0,0;0,0,0,0,0,1,0,0,0,0;0,0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1,0;0,0,0,0,0,0,0,0,0,1]; ;
sys=ss(A,B,C,0);
sys1=c2d(sys,ts);
Am = sys1.a ;
Bm = sys1.b ;
Cm = sys1.c ;
n = size(Am ,1) ; % number of eigenvalues
q = size(Cm , 1) ; % number of outputs
m = size(Bm , 2) ; % number of inputs
Np =15 ; % Prediction Horizon
Nc = 10; % Control Horizon
F = zeros(q*Np , size(Am , 1)) ;
for i = 1:Np
F(q*i-q+1:q*i , 🙂 = Cm * Am^i ;
end
PHI = zeros(q * Np , m*Nc);
for i = 1:Np
for j = 1:i
PHI(q*i-q+1:q*i , m*j-m+1:m*j) = Cm * Am^(i-j) * Bm ;
end
end
PHI = PHI( : , 1:Nc*m) ;
%% Main Loop
Nt = numel(t) ;
%W = [ones(floor(Nt/4) , 1) ; 2*ones(floor(Nt/4) , 1) ; -ones(floor(Nt/4) , 1) ; zeros(floor(Nt/4+1) , 1)] ;
W = [ones(floor(Nt) , 1)]
y = zeros(q , Nt) ;
du = zeros(m , Nt) ;
u = zeros(m , Nt)
x = zeros(size(Am , 1) , Nt) ;
R = 1 ;
Fval = zeros(Nt , 1 ) ;
for i = 2:Nt-1
FreeResponse = F * x(: , i);
dU = (PHI’*PHI + R * size(PHI , 2))(PHI’ * (W(i) – FreeResponse)) ;
du(: , i) = dU(1:m) ;
x(: , i+1) = Am * x(: , i) + Bm * du(: ,i) ;
y(: , i+1) = Cm * x(: , i+1) ;
end mpc MATLAB Answers — New Questions
axtool tools are flickering and cannot be accessed
I am having a problem with the stability of the axtool menu bar. To investigate I created a simple app containing a single UIAxes and the default set of tools. When the mouse pointer is placed over the tool bar, the icons will flicker briefly and then disappear. Clicking the mouse causes the tools to appear briefly and then disappear again.and it seems next to impossible to select a single tool.I have used the axtool command sucessfully in recent times and I don’t understand what has changed.I am having a problem with the stability of the axtool menu bar. To investigate I created a simple app containing a single UIAxes and the default set of tools. When the mouse pointer is placed over the tool bar, the icons will flicker briefly and then disappear. Clicking the mouse causes the tools to appear briefly and then disappear again.and it seems next to impossible to select a single tool.I have used the axtool command sucessfully in recent times and I don’t understand what has changed. I am having a problem with the stability of the axtool menu bar. To investigate I created a simple app containing a single UIAxes and the default set of tools. When the mouse pointer is placed over the tool bar, the icons will flicker briefly and then disappear. Clicking the mouse causes the tools to appear briefly and then disappear again.and it seems next to impossible to select a single tool.I have used the axtool command sucessfully in recent times and I don’t understand what has changed. axtool MATLAB Answers — New Questions
Troubles with Experiment Manager Setup for LSTM regression
I need help!
I am managing Experiment Manager with a very simple exercise. I use data stocks for one-step ahead of the close price with a simple LSTM net. The net works well with trainnest(XTest,YTest,layers,options). I want to calibrate the Epochs parameters with Experiment Manager. I followed any suggestions and tutorials on the web but I can not do it. Xtest is an array with 6 cols (open, close, volum etc.) and 2401 (time steps) rows for a given stock. The reponse is a single 2401 vector containing one-time shifted of the close price. As said. I have no problem with trainnet and the net performs well.
I put data, layers and options in the script for Experiment Manager. Here is my code:
function [XTrain_N,YTrain_N,layers,options] = Experiment1_setup1(params)
load dati_net.mat XTrain_N YTrain_N
num_features = 6;
num_responses = 1;
num_hidden_units = 350;
layers = [
featureInputLayer(6);
lstmLayer(num_hidden_units, ‘OutputMode’,’last’)
fullyConnectedLayer(num_responses)
];
%Training Options
options = trainingOptions("adam", …
MaxEpochs=params.MaxEpochs, …
SequencePaddingDirection="left",…
InitialLearnRate=0.001,…
Shuffle="every-epoch", …
ValidationFrequency=50, …
GradientThreshold=.93, …
L2Regularization=0.00001, …
Verbose=false, …
Metrics="rmse", …
Plots="training-progress");
end
But when I run the experiment I always get:
The following errors occurred while running the experiment:
Errors occurred while validating the setup function: Caused by: Invalid output arguments from setup function. Third-from-last output of setup function must be a layer array or dlnetwork object, but a value of type ‘double’ was detected.
I tried dozens of trials but I am able to escape the problem. I attach also my data
Thanks in Advance!I need help!
I am managing Experiment Manager with a very simple exercise. I use data stocks for one-step ahead of the close price with a simple LSTM net. The net works well with trainnest(XTest,YTest,layers,options). I want to calibrate the Epochs parameters with Experiment Manager. I followed any suggestions and tutorials on the web but I can not do it. Xtest is an array with 6 cols (open, close, volum etc.) and 2401 (time steps) rows for a given stock. The reponse is a single 2401 vector containing one-time shifted of the close price. As said. I have no problem with trainnet and the net performs well.
I put data, layers and options in the script for Experiment Manager. Here is my code:
function [XTrain_N,YTrain_N,layers,options] = Experiment1_setup1(params)
load dati_net.mat XTrain_N YTrain_N
num_features = 6;
num_responses = 1;
num_hidden_units = 350;
layers = [
featureInputLayer(6);
lstmLayer(num_hidden_units, ‘OutputMode’,’last’)
fullyConnectedLayer(num_responses)
];
%Training Options
options = trainingOptions("adam", …
MaxEpochs=params.MaxEpochs, …
SequencePaddingDirection="left",…
InitialLearnRate=0.001,…
Shuffle="every-epoch", …
ValidationFrequency=50, …
GradientThreshold=.93, …
L2Regularization=0.00001, …
Verbose=false, …
Metrics="rmse", …
Plots="training-progress");
end
But when I run the experiment I always get:
The following errors occurred while running the experiment:
Errors occurred while validating the setup function: Caused by: Invalid output arguments from setup function. Third-from-last output of setup function must be a layer array or dlnetwork object, but a value of type ‘double’ was detected.
I tried dozens of trials but I am able to escape the problem. I attach also my data
Thanks in Advance! I need help!
I am managing Experiment Manager with a very simple exercise. I use data stocks for one-step ahead of the close price with a simple LSTM net. The net works well with trainnest(XTest,YTest,layers,options). I want to calibrate the Epochs parameters with Experiment Manager. I followed any suggestions and tutorials on the web but I can not do it. Xtest is an array with 6 cols (open, close, volum etc.) and 2401 (time steps) rows for a given stock. The reponse is a single 2401 vector containing one-time shifted of the close price. As said. I have no problem with trainnet and the net performs well.
I put data, layers and options in the script for Experiment Manager. Here is my code:
function [XTrain_N,YTrain_N,layers,options] = Experiment1_setup1(params)
load dati_net.mat XTrain_N YTrain_N
num_features = 6;
num_responses = 1;
num_hidden_units = 350;
layers = [
featureInputLayer(6);
lstmLayer(num_hidden_units, ‘OutputMode’,’last’)
fullyConnectedLayer(num_responses)
];
%Training Options
options = trainingOptions("adam", …
MaxEpochs=params.MaxEpochs, …
SequencePaddingDirection="left",…
InitialLearnRate=0.001,…
Shuffle="every-epoch", …
ValidationFrequency=50, …
GradientThreshold=.93, …
L2Regularization=0.00001, …
Verbose=false, …
Metrics="rmse", …
Plots="training-progress");
end
But when I run the experiment I always get:
The following errors occurred while running the experiment:
Errors occurred while validating the setup function: Caused by: Invalid output arguments from setup function. Third-from-last output of setup function must be a layer array or dlnetwork object, but a value of type ‘double’ was detected.
I tried dozens of trials but I am able to escape the problem. I attach also my data
Thanks in Advance! experiment manager MATLAB Answers — New Questions
Deploy Word QAT
We’re looking to push a custom Quick Access Toolbar configuration to all users in our organization. Will someone please outline the steps to accomplish this or share the proper documentation necessary?
We’re looking to push a custom Quick Access Toolbar configuration to all users in our organization. Will someone please outline the steps to accomplish this or share the proper documentation necessary? Read More
List Form Formatting – Displaying Multiple Choice values in Header not possible
I’ve tried every approach possible to try and display values from a Multiple Choice column in the Header of my List Form, but no luck. Is this a bug, or limitation with the JSON and List Header?
Note that I’ve tried every possible variation of foreach and iterators, etc.
If someone has a working example specifically for a List Form Header that would be amazing.
I’ve tried every approach possible to try and display values from a Multiple Choice column in the Header of my List Form, but no luck. Is this a bug, or limitation with the JSON and List Header? Note that I’ve tried every possible variation of foreach and iterators, etc. If someone has a working example specifically for a List Form Header that would be amazing. Read More
auto adust numbering help
I have a numbered list of names. The names correspond to notes in my document and each note is numbered and corresponds to the list. I want to know how to have the number in the list update in the notes. For example, lets suppose between number 9 and 10, I insert a new name. The new name becomes 10 and the name formerly at 10 now becomes 11. However, in my notes number 10 doesn’t update. How can I do this. Or perhaps there is a more efficent way.
I have a numbered list of names. The names correspond to notes in my document and each note is numbered and corresponds to the list. I want to know how to have the number in the list update in the notes. For example, lets suppose between number 9 and 10, I insert a new name. The new name becomes 10 and the name formerly at 10 now becomes 11. However, in my notes number 10 doesn’t update. How can I do this. Or perhaps there is a more efficent way. Read More
Tasks with 0 day slacks are not showing up as Critical
Hi,
My MS Project is ‘Manually Scheduled’. Tasks with 0 day slacks are not showing up in Critical Path. I guess the answer is in the fact that its manually scheduled but it has to be that way for a reason. Many tasks with same attributes such as having predecessors and successors are showing up as Critical but not this one highlighted. Can anyone figure out why?
Hi, My MS Project is ‘Manually Scheduled’. Tasks with 0 day slacks are not showing up in Critical Path. I guess the answer is in the fact that its manually scheduled but it has to be that way for a reason. Many tasks with same attributes such as having predecessors and successors are showing up as Critical but not this one highlighted. Can anyone figure out why? Read More
List Form Formatting – can’t get title and hyperlink from Hyperlink column
I have a Hyperlink column and trying to display it within the footer of the List Form using JSON formatting. However, I can’t seem to split the Title and URL of the Hyperlink value.
If I just try to get the value using “[$FieldName]” it returns the URL and Title, comma separated.
Is there anything special I need to do here, or is it a bug with the new MS Lists in SharePoint Lists that’s causing the issue?
Note: I found that someone else faced the same issue – looks like a bug with the List Form formatting.
I have a Hyperlink column and trying to display it within the footer of the List Form using JSON formatting. However, I can’t seem to split the Title and URL of the Hyperlink value. If I just try to get the value using “[$FieldName]” it returns the URL and Title, comma separated. Is there anything special I need to do here, or is it a bug with the new MS Lists in SharePoint Lists that’s causing the issue? Note: I found that someone else faced the same issue – looks like a bug with the List Form formatting. JSON formatting on form Header – Getting just the link of a Hyperlink field : r/sharepoint (reddit.com) Read More
How to add UCQ descriptor to the message?
hi
We have developed a camera and want to add the UCQ descriptor. Refer to “Microsoft Teams
Devices General Specification”
We put the UCQ descriptor into a USB device descriptor, but did not receive proper feedback. We have filled in the full UCQ string according to the recommended properties in the document.
We found another device which can read UCQ successfully, But our simulation of this process has been consistently unsuccessful
we have no clue
hiWe have developed a camera and want to add the UCQ descriptor. Refer to “Microsoft TeamsDevices General Specification” We put the UCQ descriptor into a USB device descriptor, but did not receive proper feedback. We have filled in the full UCQ string according to the recommended properties in the document. We found another device which can read UCQ successfully, But our simulation of this process has been consistently unsuccessful we have no clue Read More
RL: Continuous action space, but within a desired range(use PPO)
I am now trying to use a PPO in RL training with continuous action space.
However, I want to ensure that the output of my actor always stays within the upper and lower bounds I set. In my environment, I’m using the following code, and my actor network and critic network are as follows.
% observation info
ObservationInfo = rlNumericSpec([n_Pd+n_Pg+1, 1]);
% action info
ActionInfo = rlNumericSpec([n_Pg, 1], …
‘Lowerlimit’, Pgmin, …
‘Upperlimit’, Pgmax);
Actor network
%% Actor Network
% Input path layers
inPath = [featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’ActorFC1′)
reluLayer(‘Name’,’ActorRelu1′)
fullyConnectedLayer(128,’Name’,’ActorFC2′)
reluLayer(‘Name’, ‘ActorRelu2’)
fullyConnectedLayer(numActions,’Name’,’Action’)
];
% Path layers for mean value
meanPath = [
tanhLayer(Name="tanhMean");
fullyConnectedLayer(numActions);
scalingLayer(‘Name’,’ActorScaling’,’Scale’,actInfo.UpperLimit)
];
% Path layers for standard deviations
% Using softplus layer to make them non negative
sdevPath = [
tanhLayer(Name="tanhStdv");
fullyConnectedLayer(numActions);
softplusLayer(Name="Splus")
];
% Add layers to network object
actorNetwork = layerGraph(inPath);
actorNetwork = addLayers(actorNetwork,meanPath);
actorNetwork = addLayers(actorNetwork,sdevPath);
% Connect layers
actorNetwork = connectLayers(actorNetwork,"Action","tanhMean/in");
actorNetwork = connectLayers(actorNetwork,"Action","tanhStdv/in");
actorNetwork = dlnetwork(actorNetwork);
% figure(2)
% plot(layerGraph(actorNetwork))
% Setting Actor
actorOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
actor = rlContinuousGaussianActor(actorNetwork,obsInfo,actInfo, …
"ActionMeanOutputNames","ActorScaling", …
"ActionStandardDeviationOutputNames","Splus");
Critic network
%% Critic Network
criticNetwork = [
featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’CriticFC1′)
reluLayer(‘Name’,’CriticRelu1′)
fullyConnectedLayer(1,’Name’,’CriticOutput’)];
criticNetwork = dlnetwork(criticNetwork);
% Setting Critic
criticOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
critic = rlValueFunction(criticNetwork,obsInfo);
something eles
%% Create PPO Agent
% Setting PPO Agent Options
agentOptions = rlPPOAgentOptions(…
‘SampleTime’,Ts,…
‘ActorOptimizerOptions’,actorOptions,…
‘CriticOptimizerOptions’,criticOptions,…
‘ExperienceHorizon’,600,…
‘ClipFactor’,0.02,…
‘EntropyLossWeight’,0.01,…
‘MiniBatchSize’,300, …
‘AdvantageEstimateMethod’,’gae’,…
‘GAEFactor’,0.95,…
‘DiscountFactor’,0.99);
% Create Agent
agent = rlPPOAgent(actor,critic,agentOptions);
%% Train Agent
maxepisodes = 10000;
maxsteps = ceil(Nt/Ts);
trainingOptions = rlTrainingOptions(…
‘MaxEpisodes’,maxepisodes,…
‘MaxStepsPerEpisode’,maxsteps,…
‘StopOnError’,"on",…
‘Plots’,"training-progress",…
‘StopTrainingCriteria’,"AverageReward",…
‘StopTrainingValue’,-14500,…
‘SaveAgentCriteria’,"EpisodeReward",…
‘SaveAgentValue’,-14500);
% train? 1-train; 0-not train
doTraining = 1;
if doTraining
% Train the agent.
trainingStats = train(agent,env,trainingOptions);
save(‘XXX.mat’,’agent’)
else
% Load the pretrained agent for the example.
load(‘XXX.mat’,’agent’)
end
THANKS!I am now trying to use a PPO in RL training with continuous action space.
However, I want to ensure that the output of my actor always stays within the upper and lower bounds I set. In my environment, I’m using the following code, and my actor network and critic network are as follows.
% observation info
ObservationInfo = rlNumericSpec([n_Pd+n_Pg+1, 1]);
% action info
ActionInfo = rlNumericSpec([n_Pg, 1], …
‘Lowerlimit’, Pgmin, …
‘Upperlimit’, Pgmax);
Actor network
%% Actor Network
% Input path layers
inPath = [featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’ActorFC1′)
reluLayer(‘Name’,’ActorRelu1′)
fullyConnectedLayer(128,’Name’,’ActorFC2′)
reluLayer(‘Name’, ‘ActorRelu2’)
fullyConnectedLayer(numActions,’Name’,’Action’)
];
% Path layers for mean value
meanPath = [
tanhLayer(Name="tanhMean");
fullyConnectedLayer(numActions);
scalingLayer(‘Name’,’ActorScaling’,’Scale’,actInfo.UpperLimit)
];
% Path layers for standard deviations
% Using softplus layer to make them non negative
sdevPath = [
tanhLayer(Name="tanhStdv");
fullyConnectedLayer(numActions);
softplusLayer(Name="Splus")
];
% Add layers to network object
actorNetwork = layerGraph(inPath);
actorNetwork = addLayers(actorNetwork,meanPath);
actorNetwork = addLayers(actorNetwork,sdevPath);
% Connect layers
actorNetwork = connectLayers(actorNetwork,"Action","tanhMean/in");
actorNetwork = connectLayers(actorNetwork,"Action","tanhStdv/in");
actorNetwork = dlnetwork(actorNetwork);
% figure(2)
% plot(layerGraph(actorNetwork))
% Setting Actor
actorOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
actor = rlContinuousGaussianActor(actorNetwork,obsInfo,actInfo, …
"ActionMeanOutputNames","ActorScaling", …
"ActionStandardDeviationOutputNames","Splus");
Critic network
%% Critic Network
criticNetwork = [
featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’CriticFC1′)
reluLayer(‘Name’,’CriticRelu1′)
fullyConnectedLayer(1,’Name’,’CriticOutput’)];
criticNetwork = dlnetwork(criticNetwork);
% Setting Critic
criticOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
critic = rlValueFunction(criticNetwork,obsInfo);
something eles
%% Create PPO Agent
% Setting PPO Agent Options
agentOptions = rlPPOAgentOptions(…
‘SampleTime’,Ts,…
‘ActorOptimizerOptions’,actorOptions,…
‘CriticOptimizerOptions’,criticOptions,…
‘ExperienceHorizon’,600,…
‘ClipFactor’,0.02,…
‘EntropyLossWeight’,0.01,…
‘MiniBatchSize’,300, …
‘AdvantageEstimateMethod’,’gae’,…
‘GAEFactor’,0.95,…
‘DiscountFactor’,0.99);
% Create Agent
agent = rlPPOAgent(actor,critic,agentOptions);
%% Train Agent
maxepisodes = 10000;
maxsteps = ceil(Nt/Ts);
trainingOptions = rlTrainingOptions(…
‘MaxEpisodes’,maxepisodes,…
‘MaxStepsPerEpisode’,maxsteps,…
‘StopOnError’,"on",…
‘Plots’,"training-progress",…
‘StopTrainingCriteria’,"AverageReward",…
‘StopTrainingValue’,-14500,…
‘SaveAgentCriteria’,"EpisodeReward",…
‘SaveAgentValue’,-14500);
% train? 1-train; 0-not train
doTraining = 1;
if doTraining
% Train the agent.
trainingStats = train(agent,env,trainingOptions);
save(‘XXX.mat’,’agent’)
else
% Load the pretrained agent for the example.
load(‘XXX.mat’,’agent’)
end
THANKS! I am now trying to use a PPO in RL training with continuous action space.
However, I want to ensure that the output of my actor always stays within the upper and lower bounds I set. In my environment, I’m using the following code, and my actor network and critic network are as follows.
% observation info
ObservationInfo = rlNumericSpec([n_Pd+n_Pg+1, 1]);
% action info
ActionInfo = rlNumericSpec([n_Pg, 1], …
‘Lowerlimit’, Pgmin, …
‘Upperlimit’, Pgmax);
Actor network
%% Actor Network
% Input path layers
inPath = [featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’ActorFC1′)
reluLayer(‘Name’,’ActorRelu1′)
fullyConnectedLayer(128,’Name’,’ActorFC2′)
reluLayer(‘Name’, ‘ActorRelu2’)
fullyConnectedLayer(numActions,’Name’,’Action’)
];
% Path layers for mean value
meanPath = [
tanhLayer(Name="tanhMean");
fullyConnectedLayer(numActions);
scalingLayer(‘Name’,’ActorScaling’,’Scale’,actInfo.UpperLimit)
];
% Path layers for standard deviations
% Using softplus layer to make them non negative
sdevPath = [
tanhLayer(Name="tanhStdv");
fullyConnectedLayer(numActions);
softplusLayer(Name="Splus")
];
% Add layers to network object
actorNetwork = layerGraph(inPath);
actorNetwork = addLayers(actorNetwork,meanPath);
actorNetwork = addLayers(actorNetwork,sdevPath);
% Connect layers
actorNetwork = connectLayers(actorNetwork,"Action","tanhMean/in");
actorNetwork = connectLayers(actorNetwork,"Action","tanhStdv/in");
actorNetwork = dlnetwork(actorNetwork);
% figure(2)
% plot(layerGraph(actorNetwork))
% Setting Actor
actorOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
actor = rlContinuousGaussianActor(actorNetwork,obsInfo,actInfo, …
"ActionMeanOutputNames","ActorScaling", …
"ActionStandardDeviationOutputNames","Splus");
Critic network
%% Critic Network
criticNetwork = [
featureInputLayer(numObservations,’Normalization’,’none’,’Name’,’observation’)
fullyConnectedLayer(128,’Name’,’CriticFC1′)
reluLayer(‘Name’,’CriticRelu1′)
fullyConnectedLayer(1,’Name’,’CriticOutput’)];
criticNetwork = dlnetwork(criticNetwork);
% Setting Critic
criticOptions = rlOptimizerOptions(‘LearnRate’,0.1,’GradientThreshold’,inf);
critic = rlValueFunction(criticNetwork,obsInfo);
something eles
%% Create PPO Agent
% Setting PPO Agent Options
agentOptions = rlPPOAgentOptions(…
‘SampleTime’,Ts,…
‘ActorOptimizerOptions’,actorOptions,…
‘CriticOptimizerOptions’,criticOptions,…
‘ExperienceHorizon’,600,…
‘ClipFactor’,0.02,…
‘EntropyLossWeight’,0.01,…
‘MiniBatchSize’,300, …
‘AdvantageEstimateMethod’,’gae’,…
‘GAEFactor’,0.95,…
‘DiscountFactor’,0.99);
% Create Agent
agent = rlPPOAgent(actor,critic,agentOptions);
%% Train Agent
maxepisodes = 10000;
maxsteps = ceil(Nt/Ts);
trainingOptions = rlTrainingOptions(…
‘MaxEpisodes’,maxepisodes,…
‘MaxStepsPerEpisode’,maxsteps,…
‘StopOnError’,"on",…
‘Plots’,"training-progress",…
‘StopTrainingCriteria’,"AverageReward",…
‘StopTrainingValue’,-14500,…
‘SaveAgentCriteria’,"EpisodeReward",…
‘SaveAgentValue’,-14500);
% train? 1-train; 0-not train
doTraining = 1;
if doTraining
% Train the agent.
trainingStats = train(agent,env,trainingOptions);
save(‘XXX.mat’,’agent’)
else
% Load the pretrained agent for the example.
load(‘XXX.mat’,’agent’)
end
THANKS! reinforcement learning, agent MATLAB Answers — New Questions
Parse error at observed data
% Define the SITR model as a system of ODEs
function dydt = SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N)
S = y(1); % Susceptible
I = y(2); % Infectious
Q = y(3); % Isolated
T = y(4); % Treated
R = y(5); % Recovered
dSdt = -beta * S * I / N;
dIdt = beta * S * I / N – gamma * I – delta * I – alpha * I;
dQdt = delta * I – lambda * Q;
dTdt = alpha * I – mu * T;
dRdt = gamma * I + lambda * Q + mu * T;
dydt = [dSdt; dIdt; dQdt; dTdt; dRdt];
end
% Observed data (replace with actual data)
% Format: [time, infected, isolated, treated, recovered]
observed_data = [
0, 1, 0, 0, 0;
10, 50, 10, 5, 15;
20, 100, 25, 15, 50;
30, 150, 35, 30, 100;
40, 200, 50, 50, 200
];
% Initial conditions
N = 1000000; % Total population
S0 = N – 1;
I0 = 1;
Q0 = 0;
T0 = 0;
R0 = 0;
y0 = [S0, I0, Q0, T0, R0];
% Time points for the solution (based on observed data)
tspan = observed_data(:, 1);
% Define the objective function for optimization
function error = objectiveFunction(params)
beta = params(1);
gamma = params(2);
delta = params(3);
alpha = params(4);
lambda = params(5);
mu = params(6);
% Solve the ODE with the current parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N), tspan, y0);
% Interpolate the model’s output to match the time points of observed data
model_values = interp1(t, y(:, 2:5), tspan);
% Calculate the sum of squared errors
error = sum((model_values – observed_data(:, 2:5)).^2, ‘all’);
end
% Initial guess for parameters [beta, gamma, delta, alpha, lambda, mu]
initial_params = [0.3, 0.1, 0.05, 0.02, 0.1, 0.1];
% Perform optimization using fminsearch
options = optimset(‘MaxFunEvals’, 1000, ‘MaxIter’, 1000);
optimized_params = fminsearch(@objectiveFunction, initial_params, options);
% Display optimized parameters
disp(‘Optimized parameters:’);
disp(optimized_params);
% Solve the system with optimized parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, optimized_params(1), optimized_params(2), optimized_params(3), optimized_params(4), optimized_params(5), optimized_params(6), N), linspace(0, 160, 100), y0);
% Plot the solution with optimized parameters
figure;
plot(t, y(:, 1), ‘b-‘, t, y(:, 2), ‘r-‘, t, y(:, 3), ‘g-‘, t, y(:, 4), ‘m-‘, t, y(:, 5), ‘k-‘);
legend(‘Susceptible’, ‘Infectious’, ‘Isolated’, ‘Treated’, ‘Recovered’);
title(‘Fitted SITR Model for COVID-19’);
xlabel(‘Days’);
ylabel(‘Population’);
grid on;% Define the SITR model as a system of ODEs
function dydt = SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N)
S = y(1); % Susceptible
I = y(2); % Infectious
Q = y(3); % Isolated
T = y(4); % Treated
R = y(5); % Recovered
dSdt = -beta * S * I / N;
dIdt = beta * S * I / N – gamma * I – delta * I – alpha * I;
dQdt = delta * I – lambda * Q;
dTdt = alpha * I – mu * T;
dRdt = gamma * I + lambda * Q + mu * T;
dydt = [dSdt; dIdt; dQdt; dTdt; dRdt];
end
% Observed data (replace with actual data)
% Format: [time, infected, isolated, treated, recovered]
observed_data = [
0, 1, 0, 0, 0;
10, 50, 10, 5, 15;
20, 100, 25, 15, 50;
30, 150, 35, 30, 100;
40, 200, 50, 50, 200
];
% Initial conditions
N = 1000000; % Total population
S0 = N – 1;
I0 = 1;
Q0 = 0;
T0 = 0;
R0 = 0;
y0 = [S0, I0, Q0, T0, R0];
% Time points for the solution (based on observed data)
tspan = observed_data(:, 1);
% Define the objective function for optimization
function error = objectiveFunction(params)
beta = params(1);
gamma = params(2);
delta = params(3);
alpha = params(4);
lambda = params(5);
mu = params(6);
% Solve the ODE with the current parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N), tspan, y0);
% Interpolate the model’s output to match the time points of observed data
model_values = interp1(t, y(:, 2:5), tspan);
% Calculate the sum of squared errors
error = sum((model_values – observed_data(:, 2:5)).^2, ‘all’);
end
% Initial guess for parameters [beta, gamma, delta, alpha, lambda, mu]
initial_params = [0.3, 0.1, 0.05, 0.02, 0.1, 0.1];
% Perform optimization using fminsearch
options = optimset(‘MaxFunEvals’, 1000, ‘MaxIter’, 1000);
optimized_params = fminsearch(@objectiveFunction, initial_params, options);
% Display optimized parameters
disp(‘Optimized parameters:’);
disp(optimized_params);
% Solve the system with optimized parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, optimized_params(1), optimized_params(2), optimized_params(3), optimized_params(4), optimized_params(5), optimized_params(6), N), linspace(0, 160, 100), y0);
% Plot the solution with optimized parameters
figure;
plot(t, y(:, 1), ‘b-‘, t, y(:, 2), ‘r-‘, t, y(:, 3), ‘g-‘, t, y(:, 4), ‘m-‘, t, y(:, 5), ‘k-‘);
legend(‘Susceptible’, ‘Infectious’, ‘Isolated’, ‘Treated’, ‘Recovered’);
title(‘Fitted SITR Model for COVID-19’);
xlabel(‘Days’);
ylabel(‘Population’);
grid on; % Define the SITR model as a system of ODEs
function dydt = SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N)
S = y(1); % Susceptible
I = y(2); % Infectious
Q = y(3); % Isolated
T = y(4); % Treated
R = y(5); % Recovered
dSdt = -beta * S * I / N;
dIdt = beta * S * I / N – gamma * I – delta * I – alpha * I;
dQdt = delta * I – lambda * Q;
dTdt = alpha * I – mu * T;
dRdt = gamma * I + lambda * Q + mu * T;
dydt = [dSdt; dIdt; dQdt; dTdt; dRdt];
end
% Observed data (replace with actual data)
% Format: [time, infected, isolated, treated, recovered]
observed_data = [
0, 1, 0, 0, 0;
10, 50, 10, 5, 15;
20, 100, 25, 15, 50;
30, 150, 35, 30, 100;
40, 200, 50, 50, 200
];
% Initial conditions
N = 1000000; % Total population
S0 = N – 1;
I0 = 1;
Q0 = 0;
T0 = 0;
R0 = 0;
y0 = [S0, I0, Q0, T0, R0];
% Time points for the solution (based on observed data)
tspan = observed_data(:, 1);
% Define the objective function for optimization
function error = objectiveFunction(params)
beta = params(1);
gamma = params(2);
delta = params(3);
alpha = params(4);
lambda = params(5);
mu = params(6);
% Solve the ODE with the current parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, beta, gamma, delta, alpha, lambda, mu, N), tspan, y0);
% Interpolate the model’s output to match the time points of observed data
model_values = interp1(t, y(:, 2:5), tspan);
% Calculate the sum of squared errors
error = sum((model_values – observed_data(:, 2:5)).^2, ‘all’);
end
% Initial guess for parameters [beta, gamma, delta, alpha, lambda, mu]
initial_params = [0.3, 0.1, 0.05, 0.02, 0.1, 0.1];
% Perform optimization using fminsearch
options = optimset(‘MaxFunEvals’, 1000, ‘MaxIter’, 1000);
optimized_params = fminsearch(@objectiveFunction, initial_params, options);
% Display optimized parameters
disp(‘Optimized parameters:’);
disp(optimized_params);
% Solve the system with optimized parameters
[t, y] = ode45(@(t, y) SITRModel(t, y, optimized_params(1), optimized_params(2), optimized_params(3), optimized_params(4), optimized_params(5), optimized_params(6), N), linspace(0, 160, 100), y0);
% Plot the solution with optimized parameters
figure;
plot(t, y(:, 1), ‘b-‘, t, y(:, 2), ‘r-‘, t, y(:, 3), ‘g-‘, t, y(:, 4), ‘m-‘, t, y(:, 5), ‘k-‘);
legend(‘Susceptible’, ‘Infectious’, ‘Isolated’, ‘Treated’, ‘Recovered’);
title(‘Fitted SITR Model for COVID-19’);
xlabel(‘Days’);
ylabel(‘Population’);
grid on; parse error MATLAB Answers — New Questions
جـلب الـحبيب الحمرية = 578385770 : 966 00 شـيخ روحـانـي قوي
جـلب الـحبيب الحمرية = 578385770 : 966 00 شـيخ روحـانـي قوي
جـلب الـحبيب الحمرية = 578385770 : 966 00 شـيخ روحـانـي قوي Read More
How to check if the HID command for connecting the device to Teams did not return correctly?
Hello!
We are developing a conference camera to connect Teams for remote meetings. The designed buttons are these (volume+ -, on/off hook) .
I grabbed a hid of a headphone connected to Teams to learn and debug the connection and disconnection of Teams meetings.
I have ported the same hid, which can be set to volume mute and other settings in Report3,
but Teams has been unable to answer.
When Teams calls 1 set_report 04 04 //ring 2
device feedback 02 03; 02 00 ; // 02 03 (Redial) (Hook Switch)
Devices that can answer will use this set_deport 04 05; 04 01 ;
But our device cannot receive set_deport 04 05; 04 01 ;
what wen receive is 04 00, which means the status is incorrect. What does it specifically represent? Why is this happening?
I haven’t found the reason. This is what we caught.
Item Tag (Value)
Raw Data
Usage Page (Vendor-Defined 2)
06 01 FF
Usage (Vendor-Defined 1)
09 01
Collection (Application)
A1 01
Collection (Logical)
A1 02
Logical Minimum (-128)
15 80
Logical Maximum (127)
25 7F
Report Size (8)
75 08
Report ID (16)
85 10
Report Count (15)
95 0F
Usage (Vendor-Defined 68)
09 44
Input (Data,Var,Abs,NWrp,Lin,NPrf,NNul,Bit)
81 22
Report ID (17)
85 11
Report Count (63)
95 3F
Usage (Vendor-Defined 69)
09 45
Input (Data,Var,Abs,NWrp,Lin,NPrf,NNul,Bit)
81 22
Report ID (80)
85 50
Report Count (15)
95 0F
Usage (Vendor-Defined 84)
09 54
Output (Data,Var,Abs,NWrp,Lin,NPrf,NNul,NVol,Bit)
91 22
Report ID (81)
85 51
Report Count (63)
95 3F
Usage (Vendor-Defined 85)
09 55
Output (Data,Var,Abs,NWrp,Lin,NPrf,NNul,NVol,Bit)
91 22
End Collection
C0
End Collection
C0
Usage Page (Telephony Devices)
05 0B
Usage (Headset)
09 05
Collection (Application)
A1 01
Logical Minimum (0)
15 00
Logical Maximum (1)
25 01
Report Size (1)
75 01
Report ID (2)
85 02
Report Count (3)
95 03
Usage (Redial)
09 24
Usage (Hook Switch)
09 20
Usage (Phone Mute)
09 2F
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)
81 06
Report Count (1)
95 01
Usage (Programmable Button)
09 07
Usage Page (Button)
05 09
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)
81 02
Report Count (4)
95 04
Input (Cnst,Ary,Abs)
81 01
Report ID (4)
85 04
Report Count (3)
95 03
Usage Page (LEDs)
05 08
Usage (Off-Hook)
09 17
We hope to return “ON-Hook”
Usage (Mute)
09 09
Usage (Ring)
09 18
Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)
91 02
Report Count (5)
95 05
Output (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)
91 03
Report ID (1)
85 01
Report Size (8)
75 08
Report Count (15)
95 0F
Usage Page
06 FF 07
Usage
09 00
Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)
81 06
Usage
09 00
Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)
91 02
End Collection
C0
Usage Page (Consumer Devices)
05 0C
Usage (Consumer Control)
09 01
Collection (Application)
A1 01
Logical Minimum (0)
15 00
Logical Maximum (1)
25 01
Report Size (1)
75 01
Report ID (3)
85 03
Report Count (8)
95 08
Usage (Volume Increment)
09 E9
Usage (Volume Decrement)
09 EA
Usage (Play/Pause)
09 CD
Usage (Stop)
09 B7
Usage (Scan Next Track)
09 B5
Usage (Scan Previous Track)
09 B6
Usage (Fast Forward)
09 B3
Usage (Rewind)
09 B4
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)
81 02
Report ID (5)
85 05
Report Count (1)
95 01
Usage (Mute)
09 E2
Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)
81 02
Report Count (7)
95 07
Input (Cnst,Ary,Abs)
81 01
End Collection
C0
Hello!We are developing a conference camera to connect Teams for remote meetings. The designed buttons are these (volume+ -, on/off hook) .I grabbed a hid of a headphone connected to Teams to learn and debug the connection and disconnection of Teams meetings. I have ported the same hid, which can be set to volume mute and other settings in Report3,but Teams has been unable to answer. When Teams calls 1 set_report 04 04 //ring 2device feedback 02 03; 02 00 ; // 02 03 (Redial) (Hook Switch)Devices that can answer will use this set_deport 04 05; 04 01 ;But our device cannot receive set_deport 04 05; 04 01 ;what wen receive is 04 00, which means the status is incorrect. What does it specifically represent? Why is this happening?I haven’t found the reason. This is what we caught. Item Tag (Value)Raw Data Usage Page (Vendor-Defined 2)06 01 FF Usage (Vendor-Defined 1)09 01 Collection (Application)A1 01 Collection (Logical)A1 02 Logical Minimum (-128)15 80 Logical Maximum (127)25 7F Report Size (8)75 08 Report ID (16)85 10 Report Count (15)95 0F Usage (Vendor-Defined 68)09 44 Input (Data,Var,Abs,NWrp,Lin,NPrf,NNul,Bit)81 22 Report ID (17)85 11 Report Count (63)95 3F Usage (Vendor-Defined 69)09 45 Input (Data,Var,Abs,NWrp,Lin,NPrf,NNul,Bit)81 22 Report ID (80)85 50 Report Count (15)95 0F Usage (Vendor-Defined 84)09 54 Output (Data,Var,Abs,NWrp,Lin,NPrf,NNul,NVol,Bit)91 22 Report ID (81)85 51 Report Count (63)95 3F Usage (Vendor-Defined 85)09 55 Output (Data,Var,Abs,NWrp,Lin,NPrf,NNul,NVol,Bit)91 22 End CollectionC0 End CollectionC0 Usage Page (Telephony Devices)05 0B Usage (Headset)09 05 Collection (Application)A1 01 Logical Minimum (0)15 00 Logical Maximum (1)25 01 Report Size (1)75 01 Report ID (2)85 02 Report Count (3)95 03 Usage (Redial)09 24 Usage (Hook Switch)09 20 Usage (Phone Mute)09 2F Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)81 06 Report Count (1)95 01 Usage (Programmable Button)09 07 Usage Page (Button)05 09 Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02 Report Count (4)95 04 Input (Cnst,Ary,Abs)81 01 Report ID (4)85 04 Report Count (3)95 03 Usage Page (LEDs)05 08 Usage (Off-Hook)09 17 We hope to return “ON-Hook” Usage (Mute)09 09 Usage (Ring)09 18 Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 02 Report Count (5)95 05 Output (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 03 Report ID (1)85 01 Report Size (8)75 08 Report Count (15)95 0F Usage Page06 FF 07 Usage09 00 Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)81 06 Usage09 00 Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)91 02 End CollectionC0 Usage Page (Consumer Devices)05 0C Usage (Consumer Control)09 01 Collection (Application)A1 01 Logical Minimum (0)15 00 Logical Maximum (1)25 01 Report Size (1)75 01 Report ID (3)85 03 Report Count (8)95 08 Usage (Volume Increment)09 E9 Usage (Volume Decrement)09 EA Usage (Play/Pause)09 CD Usage (Stop)09 B7 Usage (Scan Next Track)09 B5 Usage (Scan Previous Track)09 B6 Usage (Fast Forward)09 B3 Usage (Rewind)09 B4 Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02 Report ID (5)85 05 Report Count (1)95 01 Usage (Mute)09 E2 Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)81 02 Report Count (7)95 07 Input (Cnst,Ary,Abs)81 01 End CollectionC0 Read More
How can I find the set of vertices of hexagons which are adjacent to a random point?
I have a set of hexagons whose blue coordinates are known:
I have a random red point and I need to know the 4 (in some cases it would be 3) points which are immediately adjacent to it. These points are contained in the black box shown for illustration.
I tried to sort the blue points by measuring distances but I keep getting extra points (shown by black arrows) or missing the required points.I have a set of hexagons whose blue coordinates are known:
I have a random red point and I need to know the 4 (in some cases it would be 3) points which are immediately adjacent to it. These points are contained in the black box shown for illustration.
I tried to sort the blue points by measuring distances but I keep getting extra points (shown by black arrows) or missing the required points. I have a set of hexagons whose blue coordinates are known:
I have a random red point and I need to know the 4 (in some cases it would be 3) points which are immediately adjacent to it. These points are contained in the black box shown for illustration.
I tried to sort the blue points by measuring distances but I keep getting extra points (shown by black arrows) or missing the required points. mathematics, data MATLAB Answers — New Questions
شيخ روحاني لرد المطلقة:0097334028443
شيخ روحاني لرد المطلقة:0097334028443 استخدام رقية شرعية لرد المطلقة.
شيخ روحاني لرد المطلقة:0097334028443 استخدام رقية شرعية لرد المطلقة. Read More
شيخ روحاني الجميلية 5770 57838 =00966 جـلب الحـبيب ^ رد الـمطلقة ^ قطر
شيخ روحاني الجميلية 5770 57838 =00966 جـلب الحـبيب ^ رد الـمطلقة ^ قطر
شيخ روحاني الجميلية 5770 57838 =00966 جـلب الحـبيب ^ رد الـمطلقة ^ قطر Read More