Month: September 2024
How to use LSTM to solve seq2seq problem in MATLAB?
I’m struggling with a seq2seq problem. That is: input 200 past values and use LSTM network to predict next 10 values at one time(winthout using closed loop forecasting).And I tried writing the code as shown below. But it will report an error: Invalid training data. For regression tasks, responses must be a vector, a matrix, or a 4-D array of real numeric responses. Responses must not contain NaNs.
inputSize = 5; % Number of input features
numTimeSteps = 200; % Number of time steps
numSamples = 100; % Number of samples
% Create random input data, a cell array of size [5, 200]
X = cell(numSamples, 1);
for i = 1:numSamples
X{i} = rand(inputSize, numTimeSteps);
end
outputSize = 1; % Number of output features for each time step
outputTimeSteps = 10; % Number of output time steps
numSamples = 100; % Number of samples
% Create random output data, a cell array of size [1, 10]
Y = cell(numSamples, 1);
for i = 1:numSamples
Y{i} = rand(outputSize, outputTimeSteps);
end
numHiddenUnits1 = 128; % Number of hidden units in the first LSTM layer
numHiddenUnits2 = 64; % Number of hidden units in the second LSTM layer
outputSize = 1; % Number of output features
layers = [
sequenceInputLayer(inputSize) % Input layer, number of input features is 5
lstmLayer(numHiddenUnits1, ‘OutputMode’, ‘last’) % First LSTM layer, outputs the last time step
fullyConnectedLayer(numHiddenUnits2) % Fully connected layer, transforms the input dimensions for the second LSTM layer
functionLayer(@(X) repmat(X, [1, outputTimeSteps]), ‘Name’, ‘replicate10’) % Expand the output of the last time step to 10 time steps
lstmLayer(numHiddenUnits2, ‘OutputMode’, ‘sequence’) % Second LSTM layer, outputs a sequence of 10 time steps
fullyConnectedLayer(outputSize) % Fully connected layer, number of output features is 1
regressionLayer]; % Regression layer, used for regression tasks
% Training options
options = trainingOptions(‘adam’, …
‘MaxEpochs’, 50, …
‘MiniBatchSize’, 32, …
‘Shuffle’, ‘every-epoch’, …
‘Verbose’, false);
% Train the network
net = trainNetwork(X, Y, layers, options);
Now I have two questions:
(1) What data format should be used for the input and output of the model during training? Cell arrays or 3D arrays?
(2) How to control the time expansion steps of the input and output for each layer (input layer, LSTM layer, fully connected layer) in an LSTM network?I’m struggling with a seq2seq problem. That is: input 200 past values and use LSTM network to predict next 10 values at one time(winthout using closed loop forecasting).And I tried writing the code as shown below. But it will report an error: Invalid training data. For regression tasks, responses must be a vector, a matrix, or a 4-D array of real numeric responses. Responses must not contain NaNs.
inputSize = 5; % Number of input features
numTimeSteps = 200; % Number of time steps
numSamples = 100; % Number of samples
% Create random input data, a cell array of size [5, 200]
X = cell(numSamples, 1);
for i = 1:numSamples
X{i} = rand(inputSize, numTimeSteps);
end
outputSize = 1; % Number of output features for each time step
outputTimeSteps = 10; % Number of output time steps
numSamples = 100; % Number of samples
% Create random output data, a cell array of size [1, 10]
Y = cell(numSamples, 1);
for i = 1:numSamples
Y{i} = rand(outputSize, outputTimeSteps);
end
numHiddenUnits1 = 128; % Number of hidden units in the first LSTM layer
numHiddenUnits2 = 64; % Number of hidden units in the second LSTM layer
outputSize = 1; % Number of output features
layers = [
sequenceInputLayer(inputSize) % Input layer, number of input features is 5
lstmLayer(numHiddenUnits1, ‘OutputMode’, ‘last’) % First LSTM layer, outputs the last time step
fullyConnectedLayer(numHiddenUnits2) % Fully connected layer, transforms the input dimensions for the second LSTM layer
functionLayer(@(X) repmat(X, [1, outputTimeSteps]), ‘Name’, ‘replicate10’) % Expand the output of the last time step to 10 time steps
lstmLayer(numHiddenUnits2, ‘OutputMode’, ‘sequence’) % Second LSTM layer, outputs a sequence of 10 time steps
fullyConnectedLayer(outputSize) % Fully connected layer, number of output features is 1
regressionLayer]; % Regression layer, used for regression tasks
% Training options
options = trainingOptions(‘adam’, …
‘MaxEpochs’, 50, …
‘MiniBatchSize’, 32, …
‘Shuffle’, ‘every-epoch’, …
‘Verbose’, false);
% Train the network
net = trainNetwork(X, Y, layers, options);
Now I have two questions:
(1) What data format should be used for the input and output of the model during training? Cell arrays or 3D arrays?
(2) How to control the time expansion steps of the input and output for each layer (input layer, LSTM layer, fully connected layer) in an LSTM network? I’m struggling with a seq2seq problem. That is: input 200 past values and use LSTM network to predict next 10 values at one time(winthout using closed loop forecasting).And I tried writing the code as shown below. But it will report an error: Invalid training data. For regression tasks, responses must be a vector, a matrix, or a 4-D array of real numeric responses. Responses must not contain NaNs.
inputSize = 5; % Number of input features
numTimeSteps = 200; % Number of time steps
numSamples = 100; % Number of samples
% Create random input data, a cell array of size [5, 200]
X = cell(numSamples, 1);
for i = 1:numSamples
X{i} = rand(inputSize, numTimeSteps);
end
outputSize = 1; % Number of output features for each time step
outputTimeSteps = 10; % Number of output time steps
numSamples = 100; % Number of samples
% Create random output data, a cell array of size [1, 10]
Y = cell(numSamples, 1);
for i = 1:numSamples
Y{i} = rand(outputSize, outputTimeSteps);
end
numHiddenUnits1 = 128; % Number of hidden units in the first LSTM layer
numHiddenUnits2 = 64; % Number of hidden units in the second LSTM layer
outputSize = 1; % Number of output features
layers = [
sequenceInputLayer(inputSize) % Input layer, number of input features is 5
lstmLayer(numHiddenUnits1, ‘OutputMode’, ‘last’) % First LSTM layer, outputs the last time step
fullyConnectedLayer(numHiddenUnits2) % Fully connected layer, transforms the input dimensions for the second LSTM layer
functionLayer(@(X) repmat(X, [1, outputTimeSteps]), ‘Name’, ‘replicate10’) % Expand the output of the last time step to 10 time steps
lstmLayer(numHiddenUnits2, ‘OutputMode’, ‘sequence’) % Second LSTM layer, outputs a sequence of 10 time steps
fullyConnectedLayer(outputSize) % Fully connected layer, number of output features is 1
regressionLayer]; % Regression layer, used for regression tasks
% Training options
options = trainingOptions(‘adam’, …
‘MaxEpochs’, 50, …
‘MiniBatchSize’, 32, …
‘Shuffle’, ‘every-epoch’, …
‘Verbose’, false);
% Train the network
net = trainNetwork(X, Y, layers, options);
Now I have two questions:
(1) What data format should be used for the input and output of the model during training? Cell arrays or 3D arrays?
(2) How to control the time expansion steps of the input and output for each layer (input layer, LSTM layer, fully connected layer) in an LSTM network? lstm, seq2seq, multi step MATLAB Answers — New Questions
Newton method for solving a nonlinear system of equations!
Hello,
I am trying to write a function that solves a non linear system of equations. In my exercise I have 2,3 and 4 dimensional equation system. I am not allowed to use fsolve function. I also have a function called "Score4" which is suppose to calculate the score of my function ( should be around 1 if the code that I wrote is correct).
Below you will find the score and the code that I wrote.
Thank you in advance for your time.
function [score,error,details] = Score4()
%% Parameter
% 2 dimensional equation system
A{1} = @(x)[4*cos(x(1)),2*cos(x(1)+x(2));
5*sin(x(1)),1*sin(x(1)+x(2))];
x0{1} = [0,0]’;
y{1} = [2,3]’;
y0{1} = [-1,1]’;
% 3 dimensional equation system
A{2} = @(x)[1,0,0;0,cos(x(1)),-sin(x(2));0,sin(x(2))^2,cos(x(1))];
x0{2} = [0;0];
y0{2} = [1;2;3];
y{2} = [1;0;1];
% 4 dimensional transformation matrix with 5d input
A{3} = @(x)[cos(x(1)),sin(x(1)),0,-x(3);
-sin(x(1))*cos(x(4)),cos(x(1))*cos(x(4)),sin(x(4))*sin(x(5)),-x(2)*sin(x(4))*cos(x(5));
sin(x(4))*sin(x(1)),-cos(x(1))*sin(x(4)),cos(x(4))*sin(x(5)),-x(2)*cos(x(4))*cos(x(5));
0,0,0,1];
x0{3} = [0;0;0;0;0];
y0{3} = [1;3;2;1];
y{3} = [1;2;-1;1];
%% Score Berechnung
score = 0;
error = ”;
details = struct();
try
% Iteration ueber testcases
for i = 1:3
% Aufstellen des nullstellenproblems
RootProblem = @(z) A{i}(z)*y0{i}-y{i};
T = 0;
% Mitteln ueber Zeit
timer = tic();
for j = 1:10
x = nlinSolve(RootProblem,x0{i});
end
T = toc(timer)/10;
output = A{i}(x)*y0{i}-y{i};
Err = norm(output);
Sc = (Err+0.01)*(T+0.5);
score = score+Sc;
details.([‘time’,num2str(i)]) = T;
details.([‘error’,num2str(i)]) = Err;
end
score = 0.017 / score;
catch err
score = 0;
error = err.message;
end
end
To solve this problem I was thinking to use Newton method but I am having a lot of problems. Can someone give me some suggestions how to improve my code and what am I doing wrong. My code is as follows:
function x = nlinSolve (g,x0)
select = @(g,r,c) g(r,c);
G1 = @(x)select(g(x), 1, 1); % selecting the first row of g(x)
G2 = @(x)select(g(x), 2, 1); % selecting the second row
G3 = @(x)select(g(x), 3, 1);
G4 = @(x)select(g(x), 4, 1);
G5 = @(x)select(g(x), 5, 1);
x = x0; % x0 initial guess which is given in the score function
for m=1:10
%calculating Jacobian
for k=1:numel(x)
for n =1: numel(x)
Jakobian(k,n)= Derivative(eval([‘G’,num2str(k)]),x,x(n),n);
end
end
x = x-inv(Jakobian)*g(x); % Newton formula to find roots
end
end
function J = Derivative(G,x,xm,m)
% the funciton that calculates the derivative using numerical method
e = 0.0001;
x1=x;
x2=x;
x1(m) = xm;
x2(m) = xm+e;
J = (G(x2)-G(x1))/e;
end
Now this code is clearly not working, I am messing up something. Also the score should be around 1 at the end.
If anyone can help me that would be more than appritiated.Hello,
I am trying to write a function that solves a non linear system of equations. In my exercise I have 2,3 and 4 dimensional equation system. I am not allowed to use fsolve function. I also have a function called "Score4" which is suppose to calculate the score of my function ( should be around 1 if the code that I wrote is correct).
Below you will find the score and the code that I wrote.
Thank you in advance for your time.
function [score,error,details] = Score4()
%% Parameter
% 2 dimensional equation system
A{1} = @(x)[4*cos(x(1)),2*cos(x(1)+x(2));
5*sin(x(1)),1*sin(x(1)+x(2))];
x0{1} = [0,0]’;
y{1} = [2,3]’;
y0{1} = [-1,1]’;
% 3 dimensional equation system
A{2} = @(x)[1,0,0;0,cos(x(1)),-sin(x(2));0,sin(x(2))^2,cos(x(1))];
x0{2} = [0;0];
y0{2} = [1;2;3];
y{2} = [1;0;1];
% 4 dimensional transformation matrix with 5d input
A{3} = @(x)[cos(x(1)),sin(x(1)),0,-x(3);
-sin(x(1))*cos(x(4)),cos(x(1))*cos(x(4)),sin(x(4))*sin(x(5)),-x(2)*sin(x(4))*cos(x(5));
sin(x(4))*sin(x(1)),-cos(x(1))*sin(x(4)),cos(x(4))*sin(x(5)),-x(2)*cos(x(4))*cos(x(5));
0,0,0,1];
x0{3} = [0;0;0;0;0];
y0{3} = [1;3;2;1];
y{3} = [1;2;-1;1];
%% Score Berechnung
score = 0;
error = ”;
details = struct();
try
% Iteration ueber testcases
for i = 1:3
% Aufstellen des nullstellenproblems
RootProblem = @(z) A{i}(z)*y0{i}-y{i};
T = 0;
% Mitteln ueber Zeit
timer = tic();
for j = 1:10
x = nlinSolve(RootProblem,x0{i});
end
T = toc(timer)/10;
output = A{i}(x)*y0{i}-y{i};
Err = norm(output);
Sc = (Err+0.01)*(T+0.5);
score = score+Sc;
details.([‘time’,num2str(i)]) = T;
details.([‘error’,num2str(i)]) = Err;
end
score = 0.017 / score;
catch err
score = 0;
error = err.message;
end
end
To solve this problem I was thinking to use Newton method but I am having a lot of problems. Can someone give me some suggestions how to improve my code and what am I doing wrong. My code is as follows:
function x = nlinSolve (g,x0)
select = @(g,r,c) g(r,c);
G1 = @(x)select(g(x), 1, 1); % selecting the first row of g(x)
G2 = @(x)select(g(x), 2, 1); % selecting the second row
G3 = @(x)select(g(x), 3, 1);
G4 = @(x)select(g(x), 4, 1);
G5 = @(x)select(g(x), 5, 1);
x = x0; % x0 initial guess which is given in the score function
for m=1:10
%calculating Jacobian
for k=1:numel(x)
for n =1: numel(x)
Jakobian(k,n)= Derivative(eval([‘G’,num2str(k)]),x,x(n),n);
end
end
x = x-inv(Jakobian)*g(x); % Newton formula to find roots
end
end
function J = Derivative(G,x,xm,m)
% the funciton that calculates the derivative using numerical method
e = 0.0001;
x1=x;
x2=x;
x1(m) = xm;
x2(m) = xm+e;
J = (G(x2)-G(x1))/e;
end
Now this code is clearly not working, I am messing up something. Also the score should be around 1 at the end.
If anyone can help me that would be more than appritiated. Hello,
I am trying to write a function that solves a non linear system of equations. In my exercise I have 2,3 and 4 dimensional equation system. I am not allowed to use fsolve function. I also have a function called "Score4" which is suppose to calculate the score of my function ( should be around 1 if the code that I wrote is correct).
Below you will find the score and the code that I wrote.
Thank you in advance for your time.
function [score,error,details] = Score4()
%% Parameter
% 2 dimensional equation system
A{1} = @(x)[4*cos(x(1)),2*cos(x(1)+x(2));
5*sin(x(1)),1*sin(x(1)+x(2))];
x0{1} = [0,0]’;
y{1} = [2,3]’;
y0{1} = [-1,1]’;
% 3 dimensional equation system
A{2} = @(x)[1,0,0;0,cos(x(1)),-sin(x(2));0,sin(x(2))^2,cos(x(1))];
x0{2} = [0;0];
y0{2} = [1;2;3];
y{2} = [1;0;1];
% 4 dimensional transformation matrix with 5d input
A{3} = @(x)[cos(x(1)),sin(x(1)),0,-x(3);
-sin(x(1))*cos(x(4)),cos(x(1))*cos(x(4)),sin(x(4))*sin(x(5)),-x(2)*sin(x(4))*cos(x(5));
sin(x(4))*sin(x(1)),-cos(x(1))*sin(x(4)),cos(x(4))*sin(x(5)),-x(2)*cos(x(4))*cos(x(5));
0,0,0,1];
x0{3} = [0;0;0;0;0];
y0{3} = [1;3;2;1];
y{3} = [1;2;-1;1];
%% Score Berechnung
score = 0;
error = ”;
details = struct();
try
% Iteration ueber testcases
for i = 1:3
% Aufstellen des nullstellenproblems
RootProblem = @(z) A{i}(z)*y0{i}-y{i};
T = 0;
% Mitteln ueber Zeit
timer = tic();
for j = 1:10
x = nlinSolve(RootProblem,x0{i});
end
T = toc(timer)/10;
output = A{i}(x)*y0{i}-y{i};
Err = norm(output);
Sc = (Err+0.01)*(T+0.5);
score = score+Sc;
details.([‘time’,num2str(i)]) = T;
details.([‘error’,num2str(i)]) = Err;
end
score = 0.017 / score;
catch err
score = 0;
error = err.message;
end
end
To solve this problem I was thinking to use Newton method but I am having a lot of problems. Can someone give me some suggestions how to improve my code and what am I doing wrong. My code is as follows:
function x = nlinSolve (g,x0)
select = @(g,r,c) g(r,c);
G1 = @(x)select(g(x), 1, 1); % selecting the first row of g(x)
G2 = @(x)select(g(x), 2, 1); % selecting the second row
G3 = @(x)select(g(x), 3, 1);
G4 = @(x)select(g(x), 4, 1);
G5 = @(x)select(g(x), 5, 1);
x = x0; % x0 initial guess which is given in the score function
for m=1:10
%calculating Jacobian
for k=1:numel(x)
for n =1: numel(x)
Jakobian(k,n)= Derivative(eval([‘G’,num2str(k)]),x,x(n),n);
end
end
x = x-inv(Jakobian)*g(x); % Newton formula to find roots
end
end
function J = Derivative(G,x,xm,m)
% the funciton that calculates the derivative using numerical method
e = 0.0001;
x1=x;
x2=x;
x1(m) = xm;
x2(m) = xm+e;
J = (G(x2)-G(x1))/e;
end
Now this code is clearly not working, I am messing up something. Also the score should be around 1 at the end.
If anyone can help me that would be more than appritiated. newton method, nonlinear system of equations, matlab MATLAB Answers — New Questions
I can not use the command‘plot’,what should I do?
error information:
错误使用 plot
查找类 matlab.graphics.chart.primitive.Line 时出错。
But I cannot find the’primitive’ floder. What should I do if I want to use ‘plot’ normally?
ps:The executed program is as follows, which is a simple piece of code.
x = linspace(0,2*pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1,x,y2)
title(‘y1=sin(x), y2=cos(x)’)
xlabel(‘X(m)’)
ylabel(‘Y(m)’)error information:
错误使用 plot
查找类 matlab.graphics.chart.primitive.Line 时出错。
But I cannot find the’primitive’ floder. What should I do if I want to use ‘plot’ normally?
ps:The executed program is as follows, which is a simple piece of code.
x = linspace(0,2*pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1,x,y2)
title(‘y1=sin(x), y2=cos(x)’)
xlabel(‘X(m)’)
ylabel(‘Y(m)’) error information:
错误使用 plot
查找类 matlab.graphics.chart.primitive.Line 时出错。
But I cannot find the’primitive’ floder. What should I do if I want to use ‘plot’ normally?
ps:The executed program is as follows, which is a simple piece of code.
x = linspace(0,2*pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1,x,y2)
title(‘y1=sin(x), y2=cos(x)’)
xlabel(‘X(m)’)
ylabel(‘Y(m)’) plot MATLAB Answers — New Questions
How do I check if a subsystem handle is for a stateflow chart
Hello,
I am trying to write a script that parses my model identifying all subsystems for subsequent processing/modifications via the script.
However, when I have a handle that actually corresponds to a stateflow chart I need to switch to using the stateflow API but how can I easily check if a subsystem handle is a stateflow chart?Hello,
I am trying to write a script that parses my model identifying all subsystems for subsequent processing/modifications via the script.
However, when I have a handle that actually corresponds to a stateflow chart I need to switch to using the stateflow API but how can I easily check if a subsystem handle is a stateflow chart? Hello,
I am trying to write a script that parses my model identifying all subsystems for subsequent processing/modifications via the script.
However, when I have a handle that actually corresponds to a stateflow chart I need to switch to using the stateflow API but how can I easily check if a subsystem handle is a stateflow chart? subsystem handle MATLAB Answers — New Questions
Use only the schema without using pre-trained weights
I want to use RESnet-50 without using pre-trained weights by deep learning Toolbox,how can i do?I want to use RESnet-50 without using pre-trained weights by deep learning Toolbox,how can i do? I want to use RESnet-50 without using pre-trained weights by deep learning Toolbox,how can i do? deep learning, deep learning toolbox MATLAB Answers — New Questions
Blinkit Customer Service Phone Number +91 81 673 96291, Email, Help Center
There are discussions about sitting for an exam or certification and in some cases, having certification is the requirement to get hired to a company. However , there are following arguments:
There are discussions about sitting for an exam or certification and in some cases, having certification is the requirement to get hired to a company. However , there are following arguments: Read More
Configure the session lock behavior for Azure Virtual Desktop
Hi
I want to config Configure the session lock behavior on Win10 but in intune All my win 10 VM get that policy is not applicable.
When i look at https://learn.microsoft.com/en-us/azure/virtual-desktop/configure-session-lock-behavior?tabs=intune
I see that i did all right
I have Win 10 22h2
Update installed
KB5042056
KB5015684
KB5041580
KB5014032
KB5028380
KB5037995
KB5039336
KB5041579
Hi I want to config Configure the session lock behavior on Win10 but in intune All my win 10 VM get that policy is not applicable. When i look at https://learn.microsoft.com/en-us/azure/virtual-desktop/configure-session-lock-behavior?tabs=intune I see that i did all rightI have Win 10 22h2Update installed KB5042056KB5015684KB5041580KB5014032KB5028380KB5037995KB5039336KB5041579 Read More
How to get the days for re-authenticate from Azure directory
Hello Community,
I was trying to fetch the time for which a device authentication can be trusted.
The problem is that there is no conditional policy set and the policies for token issuance, and lifetime return an empty array using Graph API (pretty sure, they are not set either).
I see the number of days required to re-authenticate using a particular device here.
Is there a way to extract this “30” days interval using Graph API?
Thank you.
Hello Community,I was trying to fetch the time for which a device authentication can be trusted.The problem is that there is no conditional policy set and the policies for token issuance, and lifetime return an empty array using Graph API (pretty sure, they are not set either). I see the number of days required to re-authenticate using a particular device here. Is there a way to extract this “30” days interval using Graph API?Thank you. Read More
Copilot Usage Report APIs Available
In MC877369, Microsoft announced the availability of three Copilot usage reports in the Graph usage reports API to track usage of Copilot for Microsoft 365 in the apps enabled for Copilot, like Outlook, Excel, Word, PowerPoint, Loop, etc. The data available in the Copilot usage reports isn’t very informative and you might be better off using audit records to analyze what’s happening.
https://office365itpros.com/2024/09/13/copilot-usage-report-api/
In MC877369, Microsoft announced the availability of three Copilot usage reports in the Graph usage reports API to track usage of Copilot for Microsoft 365 in the apps enabled for Copilot, like Outlook, Excel, Word, PowerPoint, Loop, etc. The data available in the Copilot usage reports isn’t very informative and you might be better off using audit records to analyze what’s happening.
https://office365itpros.com/2024/09/13/copilot-usage-report-api/ Read More
How to clone Windows 10 HDD to SSD free without software?
I have a backup PC running Windows 10 and it becomes very slowly when editing videos. I doubt it is the issue with the internal hard drive. So I bought a new compatible SSD and want to move all staff to the new SSD. Does anyone know an easy way to clone Windows 10 HDD to SSD for free without software?
I hope all personal data and apps will be copied to the new SSD so I don’t do any additional settings and installation once the migration process is done.
Appreciated if you could shed some light on this issue.
I have a backup PC running Windows 10 and it becomes very slowly when editing videos. I doubt it is the issue with the internal hard drive. So I bought a new compatible SSD and want to move all staff to the new SSD. Does anyone know an easy way to clone Windows 10 HDD to SSD for free without software? I hope all personal data and apps will be copied to the new SSD so I don’t do any additional settings and installation once the migration process is done. Appreciated if you could shed some light on this issue. Read More
Windows 2022 product key change doesn’t work
Hi, I’m new here.
I was forced to reinstall windows 2022 server STD on server. Now the problem is that the product key that Dell gave me, doesn’t work and I’m not able to activate the operating system.
What can I do to solve?
Thanks a lot
best regards.
Edo
Hi, I’m new here.I was forced to reinstall windows 2022 server STD on server. Now the problem is that the product key that Dell gave me, doesn’t work and I’m not able to activate the operating system.What can I do to solve?Thanks a lotbest regards.Edo Read More
environment of a ROV in simscape
i exported my rov model from solidwork as you can see in the picture bilow i added a transforme sensor and a scoop so that i can see my rov under the influence of gravity but now i want to see my rov in the simulation move in the 3 axes x y z when i searched in internet it says that i need to creet and environment for my rov but i dont know how to do it would you please help mei exported my rov model from solidwork as you can see in the picture bilow i added a transforme sensor and a scoop so that i can see my rov under the influence of gravity but now i want to see my rov in the simulation move in the 3 axes x y z when i searched in internet it says that i need to creet and environment for my rov but i dont know how to do it would you please help me i exported my rov model from solidwork as you can see in the picture bilow i added a transforme sensor and a scoop so that i can see my rov under the influence of gravity but now i want to see my rov in the simulation move in the 3 axes x y z when i searched in internet it says that i need to creet and environment for my rov but i dont know how to do it would you please help me simscape MATLAB Answers — New Questions
2D MIMO virtual antenna array with different tx and rx antennas
Hi All!
I am trying to build up an antenna object, which consists of 3 TX and 4 RX antennas, which would eventually end up as a 2D 12 element virtual antenna array. The TX and RX antennas would have different design, therefore I need to import different characteristics for TX and RX.
My plan is to check and optimize the virtual antenna array pattern, however, I cannot combine the TX and RX array as a virtual array.
I can also combine the TX and RX patterns, but as far as I know, that is just the magnitude, and not the phase. I want to make sure, that the TX and RX phase pattern is properly taken into account.
Here is the code I have so far (the antennas are not real, just a simulated patch and vivaldi antenna data, I won’t even use vivaldi antenna in the future). All the filepath and sensor positions info is deleted.
Many thanks in advance!
clear all;
clc;
%% Parameters
Freq = 62e9;
c = 3e8;
Lambda = c/Freq;
Phi = [0:2:360];
Theta = [0:2:180];
%% Create TX array
% Add Patch element
PatchMagPat = readmatrix(‘VVV.csv’);
PatchPhasePat = readmatrix(‘WWW.csv’);
PatchMag = reshape(PatchMagPat(:, 3), length(Phi), length(Theta))’;
PatchPhase = reshape(PatchPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Patch = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,PatchMag,’PhasePattern’,PatchPhase);
txarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
txradiator = phased.Radiator(‘Sensor’,txarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c);
%% Create RX array
% Add Vivaldi element
VivaldiMagPat = readmatrix(‘XXX.csv’);
VivaldiPhasePat = readmatrix(‘YYY.csv’);
VivaldiMag = reshape(VivaldiMagPat(:, 3), length(Phi), length(Theta))’;
VivaldiPhase = reshape(VivaldiPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Vivaldi = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,VivaldiMag,’PhasePattern’,VivaldiPhase);
rxarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
rxcollector = phased.Collector(‘Sensor’,rxarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c);Hi All!
I am trying to build up an antenna object, which consists of 3 TX and 4 RX antennas, which would eventually end up as a 2D 12 element virtual antenna array. The TX and RX antennas would have different design, therefore I need to import different characteristics for TX and RX.
My plan is to check and optimize the virtual antenna array pattern, however, I cannot combine the TX and RX array as a virtual array.
I can also combine the TX and RX patterns, but as far as I know, that is just the magnitude, and not the phase. I want to make sure, that the TX and RX phase pattern is properly taken into account.
Here is the code I have so far (the antennas are not real, just a simulated patch and vivaldi antenna data, I won’t even use vivaldi antenna in the future). All the filepath and sensor positions info is deleted.
Many thanks in advance!
clear all;
clc;
%% Parameters
Freq = 62e9;
c = 3e8;
Lambda = c/Freq;
Phi = [0:2:360];
Theta = [0:2:180];
%% Create TX array
% Add Patch element
PatchMagPat = readmatrix(‘VVV.csv’);
PatchPhasePat = readmatrix(‘WWW.csv’);
PatchMag = reshape(PatchMagPat(:, 3), length(Phi), length(Theta))’;
PatchPhase = reshape(PatchPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Patch = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,PatchMag,’PhasePattern’,PatchPhase);
txarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
txradiator = phased.Radiator(‘Sensor’,txarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c);
%% Create RX array
% Add Vivaldi element
VivaldiMagPat = readmatrix(‘XXX.csv’);
VivaldiPhasePat = readmatrix(‘YYY.csv’);
VivaldiMag = reshape(VivaldiMagPat(:, 3), length(Phi), length(Theta))’;
VivaldiPhase = reshape(VivaldiPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Vivaldi = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,VivaldiMag,’PhasePattern’,VivaldiPhase);
rxarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
rxcollector = phased.Collector(‘Sensor’,rxarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c); Hi All!
I am trying to build up an antenna object, which consists of 3 TX and 4 RX antennas, which would eventually end up as a 2D 12 element virtual antenna array. The TX and RX antennas would have different design, therefore I need to import different characteristics for TX and RX.
My plan is to check and optimize the virtual antenna array pattern, however, I cannot combine the TX and RX array as a virtual array.
I can also combine the TX and RX patterns, but as far as I know, that is just the magnitude, and not the phase. I want to make sure, that the TX and RX phase pattern is properly taken into account.
Here is the code I have so far (the antennas are not real, just a simulated patch and vivaldi antenna data, I won’t even use vivaldi antenna in the future). All the filepath and sensor positions info is deleted.
Many thanks in advance!
clear all;
clc;
%% Parameters
Freq = 62e9;
c = 3e8;
Lambda = c/Freq;
Phi = [0:2:360];
Theta = [0:2:180];
%% Create TX array
% Add Patch element
PatchMagPat = readmatrix(‘VVV.csv’);
PatchPhasePat = readmatrix(‘WWW.csv’);
PatchMag = reshape(PatchMagPat(:, 3), length(Phi), length(Theta))’;
PatchPhase = reshape(PatchPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Patch = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,PatchMag,’PhasePattern’,PatchPhase);
txarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
txradiator = phased.Radiator(‘Sensor’,txarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c);
%% Create RX array
% Add Vivaldi element
VivaldiMagPat = readmatrix(‘XXX.csv’);
VivaldiPhasePat = readmatrix(‘YYY.csv’);
VivaldiMag = reshape(VivaldiMagPat(:, 3), length(Phi), length(Theta))’;
VivaldiPhase = reshape(VivaldiPhasePat(:, 3), length(Phi), length(Theta))’;
AntElem_Vivaldi = phased.CustomAntennaElement(‘PatternCoordinateSystem’,’phi-theta’,’PhiAngles’,Phi,’ThetaAngles’,Theta, …
‘MagnitudePattern’,VivaldiMag,’PhasePattern’,VivaldiPhase);
rxarray = phased.ConformalArray(‘Element’,AntElem_Patch,…
‘ElementPosition’,’???’);
rxcollector = phased.Collector(‘Sensor’,rxarray,’OperatingFrequency’,Freq,…
‘PropagationSpeed’,c); radar, phased array MATLAB Answers — New Questions
Need the ability for multiple customers to self-sign up for a single event
I am currently using the calendly app to allow employees to sign up for group meetings with various managers(staff in booking). I would like to stop using this paid app and use something that is already integrated in my outlook calendar.
I need the bookings app to have the functionality for up to 6 employees (customers) to self-sign up for pre-set event times, given only a common link – not an individual invite.
Is this in the works?
With this in place, I believe the bookings app can then send reminders, allow customers to cancel or reschedule, allow managers/staff to cancel or reschedule.
I am currently using the calendly app to allow employees to sign up for group meetings with various managers(staff in booking). I would like to stop using this paid app and use something that is already integrated in my outlook calendar.I need the bookings app to have the functionality for up to 6 employees (customers) to self-sign up for pre-set event times, given only a common link – not an individual invite. Is this in the works? With this in place, I believe the bookings app can then send reminders, allow customers to cancel or reschedule, allow managers/staff to cancel or reschedule. Read More
Regarding the Paste value with copy formula
Dear,
I have a concern about pasting values with the “copy” formula. When we use the shortcut Ctrl+arrow key to navigate, it takes us to the last cell, skipping any empty cells in between. However, when we paste a blank value using the copy formula, this shortcut doesn’t work the same way and considers the last cell where we pasted the value. Why is that? Can you please help me understand this?
Thanks,
Kuldeep Kumar
Dear,I have a concern about pasting values with the “copy” formula. When we use the shortcut Ctrl+arrow key to navigate, it takes us to the last cell, skipping any empty cells in between. However, when we paste a blank value using the copy formula, this shortcut doesn’t work the same way and considers the last cell where we pasted the value. Why is that? Can you please help me understand this? Thanks,Kuldeep Kumar Read More
How to convert NTFS to FAT32 without losing data on Windows 11/10?
Hi all,
I have an external hard drive formatted by NTFS. I bought a new Mac recently but writing to NTFS is not supported by Mac. FAT32 is supported by both Windows 11 PC and Mac. Is it possible to convert NTFS to FAT32 without losing data on Windows 11/10 PC ?
It is a 4T drive and formatting is not the choice. I can’t afford to lose so much data. Please kindly make a suggestion if you know how to do this.
Thanks
Hi all, I have an external hard drive formatted by NTFS. I bought a new Mac recently but writing to NTFS is not supported by Mac. FAT32 is supported by both Windows 11 PC and Mac. Is it possible to convert NTFS to FAT32 without losing data on Windows 11/10 PC ? It is a 4T drive and formatting is not the choice. I can’t afford to lose so much data. Please kindly make a suggestion if you know how to do this. Thanks Read More
How do I download YT videos directly to my laptop Windows 10/11?
Hi everyone, I’m preparing the opening remarks for a speech recently and need to download a YT video and save it directly to my Windows 10 laptop. I’ve tried some online download tools, but they have too many ads, are slow, and interrupt halfway through the download. Now I’m in urgent need of a stable, simple, and secure tool that can download YT videos directly to my local computer, preferably in HD quality. Can anyone recommend a good method? Thank you very much!
Hi everyone, I’m preparing the opening remarks for a speech recently and need to download a YT video and save it directly to my Windows 10 laptop. I’ve tried some online download tools, but they have too many ads, are slow, and interrupt halfway through the download. Now I’m in urgent need of a stable, simple, and secure tool that can download YT videos directly to my local computer, preferably in HD quality. Can anyone recommend a good method? Thank you very much! Read More
Custom fields in new booking email confirmation
Is it possible for all the custom fields from the booking to be included in the ‘New Booking’ confirmation email that is sent?
All this info is included on the email that the customer gets, so unsure why it’s not included in the confirmation email too.
Is it possible for all the custom fields from the booking to be included in the ‘New Booking’ confirmation email that is sent? All this info is included on the email that the customer gets, so unsure why it’s not included in the confirmation email too. Read More
Content Type Auto-Labelling
I’ve setup some retention labels and set them to auto apply to content types, however I now have some documents in the library where the label has applied and some where it hasn’t, so I know the rule is correct.
The documents are a mixture of ones created within the library and ones moved from another library with matching content types. It just seems very random as to which ones it labels and which it doesn’t. Documentation was created and moved by the same person, so not a licence thing. We’ve waited over 10 days to just see if it’s a timing thing, but no difference.
Any suggestions?
I’ve setup some retention labels and set them to auto apply to content types, however I now have some documents in the library where the label has applied and some where it hasn’t, so I know the rule is correct. The documents are a mixture of ones created within the library and ones moved from another library with matching content types. It just seems very random as to which ones it labels and which it doesn’t. Documentation was created and moved by the same person, so not a licence thing. We’ve waited over 10 days to just see if it’s a timing thing, but no difference. Any suggestions? Read More
Help needed to make a 3d contour plot
Hello. I have around 50K data points (x,y,z co-ordinates of each point) and the value of a function at each of these points. I want to make a filled contour plot of this function on the 3d surface that would so be formed by joining all the data points. I have tried various functions like contour3, tricontour, scatter3, surf etc but nothing seems to work. If it matters, the value of the function is in no way dependent on the co-ordinates of the point.
As an example to clear things up, <http://imgur.com/tmW4X5b this> is what I want to plot.Hello. I have around 50K data points (x,y,z co-ordinates of each point) and the value of a function at each of these points. I want to make a filled contour plot of this function on the 3d surface that would so be formed by joining all the data points. I have tried various functions like contour3, tricontour, scatter3, surf etc but nothing seems to work. If it matters, the value of the function is in no way dependent on the co-ordinates of the point.
As an example to clear things up, <http://imgur.com/tmW4X5b this> is what I want to plot. Hello. I have around 50K data points (x,y,z co-ordinates of each point) and the value of a function at each of these points. I want to make a filled contour plot of this function on the 3d surface that would so be formed by joining all the data points. I have tried various functions like contour3, tricontour, scatter3, surf etc but nothing seems to work. If it matters, the value of the function is in no way dependent on the co-ordinates of the point.
As an example to clear things up, <http://imgur.com/tmW4X5b this> is what I want to plot. contour, contour3, surf, surf3, 3d plots, plot MATLAB Answers — New Questions