Category: Matlab
Category Archives: Matlab
Centralized vs Decentralized Training for Multi Agent Reinforcement Learning
What exactly are the differences in centralized and decentralized training for multi agent reinforcement learning? Is centralized learning the same as the paradigm of CTDE (centralized training and decentralized execution) that is seen in much of the multi agent RL literature? When I run centralized training , the main difference I notice is that it appears that all agents are receiving the same Q0 value, which I believe means they have the same critic. I see that both methods are used in the tutorials, so I’m trying to get a clearer picture of what the differences are and when to use one versus the other.What exactly are the differences in centralized and decentralized training for multi agent reinforcement learning? Is centralized learning the same as the paradigm of CTDE (centralized training and decentralized execution) that is seen in much of the multi agent RL literature? When I run centralized training , the main difference I notice is that it appears that all agents are receiving the same Q0 value, which I believe means they have the same critic. I see that both methods are used in the tutorials, so I’m trying to get a clearer picture of what the differences are and when to use one versus the other. What exactly are the differences in centralized and decentralized training for multi agent reinforcement learning? Is centralized learning the same as the paradigm of CTDE (centralized training and decentralized execution) that is seen in much of the multi agent RL literature? When I run centralized training , the main difference I notice is that it appears that all agents are receiving the same Q0 value, which I believe means they have the same critic. I see that both methods are used in the tutorials, so I’m trying to get a clearer picture of what the differences are and when to use one versus the other. reinforcement learning MATLAB Answers — New Questions
The simulation time set by reinforcement learning is inconsistent with the training time
The simulation time set by reinforcement learning is inconsistent with the training time。The simulation time set by reinforcement learning is inconsistent with the training time。 The simulation time set by reinforcement learning is inconsistent with the training time。 reinforcement learning MATLAB Answers — New Questions
References to multi-agent reinforcement learning schemes in the reinforcement learning toolbox
Can somebody provide several references on multi-agent reinforcement learning schemes in reinforcement learning toolbox?Can somebody provide several references on multi-agent reinforcement learning schemes in reinforcement learning toolbox? Can somebody provide several references on multi-agent reinforcement learning schemes in reinforcement learning toolbox? reinforcement learning, muti-agent MATLAB Answers — New Questions
Training CNN with custom miniBatchDatastore thows cryptic error
I am trying to train a CNN model for a classification task. The input to the model is a `1x1024x2` frame and I have the following network:
layers =
28×1 Layer array with layers:
1 ‘Input Layer’ Image Input 1×1024×2 images
2 ‘CNN1’ 2-D Convolution 16 1×8 convolutions with stride [1 1] and padding ‘same’
3 ‘BN1’ Batch Normalization Batch normalization
4 ‘ReLU1’ ReLU ReLU
5 ‘MaxPool1’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
6 ‘CNN2’ 2-D Convolution 24 1×8 convolutions with stride [1 1] and padding ‘same’
7 ‘BN2’ Batch Normalization Batch normalization
8 ‘ReLU2’ ReLU ReLU
9 ‘MaxPool2’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
10 ‘CNN3’ 2-D Convolution 32 1×8 convolutions with stride [1 1] and padding ‘same’
11 ‘BN3’ Batch Normalization Batch normalization
12 ‘ReLU3’ ReLU ReLU
13 ‘MaxPool3’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
14 ‘CNN4’ 2-D Convolution 48 1×8 convolutions with stride [1 1] and padding ‘same’
15 ‘BN4’ Batch Normalization Batch normalization
16 ‘ReLU4’ ReLU ReLU
17 ‘MaxPool4’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
18 ‘CNN5’ 2-D Convolution 64 1×8 convolutions with stride [1 1] and padding ‘same’
19 ‘BN5’ Batch Normalization Batch normalization
20 ‘ReLU5’ ReLU ReLU
21 ‘MaxPool5’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
22 ‘CNN6’ 2-D Convolution 96 1×8 convolutions with stride [1 1] and padding ‘same’
23 ‘BN6’ Batch Normalization Batch normalization
24 ‘ReLU6’ ReLU ReLU
25 ‘AP1’ 2-D Average Pooling 1×32 average pooling with stride [1 1] and padding [0 0 0 0]
26 ‘FC1’ Fully Connected 24 fully connected layer
27 ‘SoftMax’ Softmax softmax
28 ‘Output’ Classification Output crossentropyex
I’m using a custom minibatch dataset to train the model. The read funtion returns the following table structure:
i’m using these training options:
% Specify training options
options = trainingOptions(‘sgdm’, …
‘MiniBatchSize’, miniBatchSize, …
‘MaxEpochs’, 10, …
‘Verbose’, true, …
‘Plots’, ‘training-progress’);
% Train the network
net = trainNetwork(mbds, layers, options);
and i get the following error:
Error using trainNetwork
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Caused by:
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
I’ve been stuck on this for a while now, and theres no way to inspect the trainNetwork code to properly debug. I’d appreciate your suggestions. Thank you.
Paul Osinowo
Graduate Student
University of StrathclydeI am trying to train a CNN model for a classification task. The input to the model is a `1x1024x2` frame and I have the following network:
layers =
28×1 Layer array with layers:
1 ‘Input Layer’ Image Input 1×1024×2 images
2 ‘CNN1’ 2-D Convolution 16 1×8 convolutions with stride [1 1] and padding ‘same’
3 ‘BN1’ Batch Normalization Batch normalization
4 ‘ReLU1’ ReLU ReLU
5 ‘MaxPool1’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
6 ‘CNN2’ 2-D Convolution 24 1×8 convolutions with stride [1 1] and padding ‘same’
7 ‘BN2’ Batch Normalization Batch normalization
8 ‘ReLU2’ ReLU ReLU
9 ‘MaxPool2’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
10 ‘CNN3’ 2-D Convolution 32 1×8 convolutions with stride [1 1] and padding ‘same’
11 ‘BN3’ Batch Normalization Batch normalization
12 ‘ReLU3’ ReLU ReLU
13 ‘MaxPool3’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
14 ‘CNN4’ 2-D Convolution 48 1×8 convolutions with stride [1 1] and padding ‘same’
15 ‘BN4’ Batch Normalization Batch normalization
16 ‘ReLU4’ ReLU ReLU
17 ‘MaxPool4’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
18 ‘CNN5’ 2-D Convolution 64 1×8 convolutions with stride [1 1] and padding ‘same’
19 ‘BN5’ Batch Normalization Batch normalization
20 ‘ReLU5’ ReLU ReLU
21 ‘MaxPool5’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
22 ‘CNN6’ 2-D Convolution 96 1×8 convolutions with stride [1 1] and padding ‘same’
23 ‘BN6’ Batch Normalization Batch normalization
24 ‘ReLU6’ ReLU ReLU
25 ‘AP1’ 2-D Average Pooling 1×32 average pooling with stride [1 1] and padding [0 0 0 0]
26 ‘FC1’ Fully Connected 24 fully connected layer
27 ‘SoftMax’ Softmax softmax
28 ‘Output’ Classification Output crossentropyex
I’m using a custom minibatch dataset to train the model. The read funtion returns the following table structure:
i’m using these training options:
% Specify training options
options = trainingOptions(‘sgdm’, …
‘MiniBatchSize’, miniBatchSize, …
‘MaxEpochs’, 10, …
‘Verbose’, true, …
‘Plots’, ‘training-progress’);
% Train the network
net = trainNetwork(mbds, layers, options);
and i get the following error:
Error using trainNetwork
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Caused by:
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
I’ve been stuck on this for a while now, and theres no way to inspect the trainNetwork code to properly debug. I’d appreciate your suggestions. Thank you.
Paul Osinowo
Graduate Student
University of Strathclyde I am trying to train a CNN model for a classification task. The input to the model is a `1x1024x2` frame and I have the following network:
layers =
28×1 Layer array with layers:
1 ‘Input Layer’ Image Input 1×1024×2 images
2 ‘CNN1’ 2-D Convolution 16 1×8 convolutions with stride [1 1] and padding ‘same’
3 ‘BN1’ Batch Normalization Batch normalization
4 ‘ReLU1’ ReLU ReLU
5 ‘MaxPool1’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
6 ‘CNN2’ 2-D Convolution 24 1×8 convolutions with stride [1 1] and padding ‘same’
7 ‘BN2’ Batch Normalization Batch normalization
8 ‘ReLU2’ ReLU ReLU
9 ‘MaxPool2’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
10 ‘CNN3’ 2-D Convolution 32 1×8 convolutions with stride [1 1] and padding ‘same’
11 ‘BN3’ Batch Normalization Batch normalization
12 ‘ReLU3’ ReLU ReLU
13 ‘MaxPool3’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
14 ‘CNN4’ 2-D Convolution 48 1×8 convolutions with stride [1 1] and padding ‘same’
15 ‘BN4’ Batch Normalization Batch normalization
16 ‘ReLU4’ ReLU ReLU
17 ‘MaxPool4’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
18 ‘CNN5’ 2-D Convolution 64 1×8 convolutions with stride [1 1] and padding ‘same’
19 ‘BN5’ Batch Normalization Batch normalization
20 ‘ReLU5’ ReLU ReLU
21 ‘MaxPool5’ 2-D Max Pooling 1×2 max pooling with stride [1 2] and padding [0 0 0 0]
22 ‘CNN6’ 2-D Convolution 96 1×8 convolutions with stride [1 1] and padding ‘same’
23 ‘BN6’ Batch Normalization Batch normalization
24 ‘ReLU6’ ReLU ReLU
25 ‘AP1’ 2-D Average Pooling 1×32 average pooling with stride [1 1] and padding [0 0 0 0]
26 ‘FC1’ Fully Connected 24 fully connected layer
27 ‘SoftMax’ Softmax softmax
28 ‘Output’ Classification Output crossentropyex
I’m using a custom minibatch dataset to train the model. The read funtion returns the following table structure:
i’m using these training options:
% Specify training options
options = trainingOptions(‘sgdm’, …
‘MiniBatchSize’, miniBatchSize, …
‘MaxEpochs’, 10, …
‘Verbose’, true, …
‘Plots’, ‘training-progress’);
% Train the network
net = trainNetwork(mbds, layers, options);
and i get the following error:
Error using trainNetwork
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
Caused by:
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
I’ve been stuck on this for a while now, and theres no way to inspect the trainNetwork code to properly debug. I’d appreciate your suggestions. Thank you.
Paul Osinowo
Graduate Student
University of Strathclyde deep learning, cnn MATLAB Answers — New Questions
Adding a column to a UITable and then using it.
After a few hours of trying I finally was able to add a column to a UITable
A = zeros([1 size(app.StimInputTable.Data,1)]);
app.StimInputTable.Data.Var4 = A’; % Have to make A a column vector!
for ii = 1:size(app.StimInputTable.Data,1)
app.StimInputTable.Var4(ii) = …
app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
But now…
assigning a value to Our new column Var4 gives me
Unrecognized method, property, or field ‘Var4’ for class ‘matlab.ui.control.Table’.
It know what app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
is so now put it in Var4! How hard can that be?
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ ____
4 5 0 0
5 4 1 0
2 3 2 0
3 2 5 0
I can do it 1 row at a time from theCommand window:
K>> app.StimInputTable.Data
ii = 1 (etc)
K>> app.StimInputTable.Data.Var4(ii) = app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii)
Although the "answer" I get is my whole
app =
MouseOdor4 with properties:
MouseOdor: [1×1 Figure]
all the properties of the whole app I won’t bore you with
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ _______
4 5 0 1
5 4 1 2
2 3 2 0.66667
3 2 5 2.5
Look it worked!
Next step if you don’t mind anwering is to sort the table by the Var4 columnAfter a few hours of trying I finally was able to add a column to a UITable
A = zeros([1 size(app.StimInputTable.Data,1)]);
app.StimInputTable.Data.Var4 = A’; % Have to make A a column vector!
for ii = 1:size(app.StimInputTable.Data,1)
app.StimInputTable.Var4(ii) = …
app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
But now…
assigning a value to Our new column Var4 gives me
Unrecognized method, property, or field ‘Var4’ for class ‘matlab.ui.control.Table’.
It know what app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
is so now put it in Var4! How hard can that be?
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ ____
4 5 0 0
5 4 1 0
2 3 2 0
3 2 5 0
I can do it 1 row at a time from theCommand window:
K>> app.StimInputTable.Data
ii = 1 (etc)
K>> app.StimInputTable.Data.Var4(ii) = app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii)
Although the "answer" I get is my whole
app =
MouseOdor4 with properties:
MouseOdor: [1×1 Figure]
all the properties of the whole app I won’t bore you with
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ _______
4 5 0 1
5 4 1 2
2 3 2 0.66667
3 2 5 2.5
Look it worked!
Next step if you don’t mind anwering is to sort the table by the Var4 column After a few hours of trying I finally was able to add a column to a UITable
A = zeros([1 size(app.StimInputTable.Data,1)]);
app.StimInputTable.Data.Var4 = A’; % Have to make A a column vector!
for ii = 1:size(app.StimInputTable.Data,1)
app.StimInputTable.Var4(ii) = …
app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
But now…
assigning a value to Our new column Var4 gives me
Unrecognized method, property, or field ‘Var4’ for class ‘matlab.ui.control.Table’.
It know what app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii);
is so now put it in Var4! How hard can that be?
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ ____
4 5 0 0
5 4 1 0
2 3 2 0
3 2 5 0
I can do it 1 row at a time from theCommand window:
K>> app.StimInputTable.Data
ii = 1 (etc)
K>> app.StimInputTable.Data.Var4(ii) = app.StimInputTable.Data.Var3(ii)/app.StimInputTable.Data.Var2(ii)
Although the "answer" I get is my whole
app =
MouseOdor4 with properties:
MouseOdor: [1×1 Figure]
all the properties of the whole app I won’t bore you with
K>> app.StimInputTable.Data
ans =
4×4 table
Var1 Var2 Var3 Var4
____ ____ ____ _______
4 5 0 1
5 4 1 2
2 3 2 0.66667
3 2 5 2.5
Look it worked!
Next step if you don’t mind anwering is to sort the table by the Var4 column add column to table MATLAB Answers — New Questions
Where to find the coordinates info of image labelar’s bounding boxes?
How can I check the coornates info of the image labeler below?How can I check the coornates info of the image labeler below? How can I check the coornates info of the image labeler below? matlab, machine learning, image labeler MATLAB Answers — New Questions
Is the error initializing Java Preferences Failed in matlabrc important?
I’m a student and tried downloading a pirated version of matlab, which obviously didn’t work. I then removed that program from my computer, and downloaded the trial version of matlab. However, when I load up matlab, the above error appears.
Wondering what will be affected by it, and how can I get rid of that error.I’m a student and tried downloading a pirated version of matlab, which obviously didn’t work. I then removed that program from my computer, and downloaded the trial version of matlab. However, when I load up matlab, the above error appears.
Wondering what will be affected by it, and how can I get rid of that error. I’m a student and tried downloading a pirated version of matlab, which obviously didn’t work. I then removed that program from my computer, and downloaded the trial version of matlab. However, when I load up matlab, the above error appears.
Wondering what will be affected by it, and how can I get rid of that error. error, java, preferences, startup, library MATLAB Answers — New Questions
How can I plot the following data? Do I have to convert it first to another form?
Hey All,
I’m trying to plot various graphs of the following data but I have no clue where to start. I’ve tried something like the following type of code.
x=zeros(1,10);
x(2:4) =1;
y= linspace(0,10,10);
plot(y,x)
But also tried:
plot(filledData(:,1,filledData(:,2))
I apologize if this is too much, complete beginner. Second day at it.
Thank you all,
JJHey All,
I’m trying to plot various graphs of the following data but I have no clue where to start. I’ve tried something like the following type of code.
x=zeros(1,10);
x(2:4) =1;
y= linspace(0,10,10);
plot(y,x)
But also tried:
plot(filledData(:,1,filledData(:,2))
I apologize if this is too much, complete beginner. Second day at it.
Thank you all,
JJ Hey All,
I’m trying to plot various graphs of the following data but I have no clue where to start. I’ve tried something like the following type of code.
x=zeros(1,10);
x(2:4) =1;
y= linspace(0,10,10);
plot(y,x)
But also tried:
plot(filledData(:,1,filledData(:,2))
I apologize if this is too much, complete beginner. Second day at it.
Thank you all,
JJ double, data, plot, plotting MATLAB Answers — New Questions
MATLAB app designer, how to update value of a property in declared callback function
Hello all,
I am rather new to MATLAB, and therefore a little unfamiliar with the app designer, apologies in advance.
I am trying to write a code that tracks the position of a stepper motor over serial communication. Currently, I have the setup such that it will callback the readSerialData Function everytime the terminator "CR" is reached.
Ideally I would like to access the value read. I wanted to save this value to the motorPos property of the app for use in separate functions later down the line. However, from tests, it seems that the value of app.motorPos does not update and remains the initial value of 0, as defined in the startup function. While it does display the correct value in the command window (from the disp(app.arduino) function), the value of the property app.arduino seem to remain 0, when called upon in later functions.
How should I go about updating the value of property motorPos?
Thanks,
Yuandi Wu
properties (Access = public)
arduino
motorPos
end
methods (Access = private)
function readSerialData(app,src)
app.motorPos = readline(src);
disp(app.motorPos);
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
delete(instrfindall);
app.arduino = serialport ("COM3", 9600, "Timeout", 0.1);
app.arduino.DataBits = 8;
configureTerminator(app.arduino,"CR")
configureCallback(app.arduino,"terminator",@readSerialData)
%initially, upon startup, display these values
app.motorPos = ‘0’;
disp(app.motorPos)
endHello all,
I am rather new to MATLAB, and therefore a little unfamiliar with the app designer, apologies in advance.
I am trying to write a code that tracks the position of a stepper motor over serial communication. Currently, I have the setup such that it will callback the readSerialData Function everytime the terminator "CR" is reached.
Ideally I would like to access the value read. I wanted to save this value to the motorPos property of the app for use in separate functions later down the line. However, from tests, it seems that the value of app.motorPos does not update and remains the initial value of 0, as defined in the startup function. While it does display the correct value in the command window (from the disp(app.arduino) function), the value of the property app.arduino seem to remain 0, when called upon in later functions.
How should I go about updating the value of property motorPos?
Thanks,
Yuandi Wu
properties (Access = public)
arduino
motorPos
end
methods (Access = private)
function readSerialData(app,src)
app.motorPos = readline(src);
disp(app.motorPos);
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
delete(instrfindall);
app.arduino = serialport ("COM3", 9600, "Timeout", 0.1);
app.arduino.DataBits = 8;
configureTerminator(app.arduino,"CR")
configureCallback(app.arduino,"terminator",@readSerialData)
%initially, upon startup, display these values
app.motorPos = ‘0’;
disp(app.motorPos)
end Hello all,
I am rather new to MATLAB, and therefore a little unfamiliar with the app designer, apologies in advance.
I am trying to write a code that tracks the position of a stepper motor over serial communication. Currently, I have the setup such that it will callback the readSerialData Function everytime the terminator "CR" is reached.
Ideally I would like to access the value read. I wanted to save this value to the motorPos property of the app for use in separate functions later down the line. However, from tests, it seems that the value of app.motorPos does not update and remains the initial value of 0, as defined in the startup function. While it does display the correct value in the command window (from the disp(app.arduino) function), the value of the property app.arduino seem to remain 0, when called upon in later functions.
How should I go about updating the value of property motorPos?
Thanks,
Yuandi Wu
properties (Access = public)
arduino
motorPos
end
methods (Access = private)
function readSerialData(app,src)
app.motorPos = readline(src);
disp(app.motorPos);
end
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
delete(instrfindall);
app.arduino = serialport ("COM3", 9600, "Timeout", 0.1);
app.arduino.DataBits = 8;
configureTerminator(app.arduino,"CR")
configureCallback(app.arduino,"terminator",@readSerialData)
%initially, upon startup, display these values
app.motorPos = ‘0’;
disp(app.motorPos)
end appdesigner, serial MATLAB Answers — New Questions
Object detection using camera
Is there any other function available other than "Sensor" function which will provide information about camera objects detectionIs there any other function available other than "Sensor" function which will provide information about camera objects detection Is there any other function available other than "Sensor" function which will provide information about camera objects detection camera object detection MATLAB Answers — New Questions
Is it possible to save uifigure with a uitable when deployed as a standalone application?
I have a script that I compile as a standalone application. This compiled standalone application is run on a crontab. The script produces many files inlcuding text files and mulitple figures. One of the figures is is a uifigure with a uitable. I cannot figure out a way to save that uifigure when the application is deployed and run on the crontab. Is it possible to create and save uifigures/uitables when the standalone application is executed on a crontab? I have tried commands suchs as exportapp, screenshot/imwrite, etc. I am also not receiving any errors. All of the output files and figures are created and saved except the one uifigure. Any help is appreciated.I have a script that I compile as a standalone application. This compiled standalone application is run on a crontab. The script produces many files inlcuding text files and mulitple figures. One of the figures is is a uifigure with a uitable. I cannot figure out a way to save that uifigure when the application is deployed and run on the crontab. Is it possible to create and save uifigures/uitables when the standalone application is executed on a crontab? I have tried commands suchs as exportapp, screenshot/imwrite, etc. I am also not receiving any errors. All of the output files and figures are created and saved except the one uifigure. Any help is appreciated. I have a script that I compile as a standalone application. This compiled standalone application is run on a crontab. The script produces many files inlcuding text files and mulitple figures. One of the figures is is a uifigure with a uitable. I cannot figure out a way to save that uifigure when the application is deployed and run on the crontab. Is it possible to create and save uifigures/uitables when the standalone application is executed on a crontab? I have tried commands suchs as exportapp, screenshot/imwrite, etc. I am also not receiving any errors. All of the output files and figures are created and saved except the one uifigure. Any help is appreciated. uifigure, uitable, matlab compiler MATLAB Answers — New Questions
Impedance Calculator of powergui block of a three-phase filter not displaying expected results
I am not getting the expected results of Impedance Calculator function of the powergui block. I am trying to measure the frequency response of a 13th harmonic filter. The resonance frequency is 780 Hz; therefore, I would expect the imedance the lowest at 780 Hz. The powergui impedance calculator does not reflect this result.
I set the Inductance and Capacitance values to a resonance frequency of 780 Hz.
Since the filter is tuned to the 13 harmonic (780 Hz), I would expect the impedance to the lowest value at 780 Hz like I drew in the red.I am not getting the expected results of Impedance Calculator function of the powergui block. I am trying to measure the frequency response of a 13th harmonic filter. The resonance frequency is 780 Hz; therefore, I would expect the imedance the lowest at 780 Hz. The powergui impedance calculator does not reflect this result.
I set the Inductance and Capacitance values to a resonance frequency of 780 Hz.
Since the filter is tuned to the 13 harmonic (780 Hz), I would expect the impedance to the lowest value at 780 Hz like I drew in the red. I am not getting the expected results of Impedance Calculator function of the powergui block. I am trying to measure the frequency response of a 13th harmonic filter. The resonance frequency is 780 Hz; therefore, I would expect the imedance the lowest at 780 Hz. The powergui impedance calculator does not reflect this result.
I set the Inductance and Capacitance values to a resonance frequency of 780 Hz.
Since the filter is tuned to the 13 harmonic (780 Hz), I would expect the impedance to the lowest value at 780 Hz like I drew in the red. impedance calculation MATLAB Answers — New Questions
how to remove background from thermal image. i want to remove the background from the image. just want forground image
Post Content Post Content remove background pixel, thermal image MATLAB Answers — New Questions
tdmswriteprop write error code for long digits
see below captures, the same code write TDMS properties, correct in 2022b, but error code in 2023b and 2024a version.see below captures, the same code write TDMS properties, correct in 2022b, but error code in 2023b and 2024a version. see below captures, the same code write TDMS properties, correct in 2022b, but error code in 2023b and 2024a version. tdms MATLAB Answers — New Questions
I can’t delete the file obtained with matlab
…..
writecell(bu,hhh,’Delimiter’,’ ‘);
when I kill writecell process (using ctrl+c) in matlab i receive this error and if i try to delete file
i receive this error:
The operation could not be completed because the file is open in matlab R2024a…..
writecell(bu,hhh,’Delimiter’,’ ‘);
when I kill writecell process (using ctrl+c) in matlab i receive this error and if i try to delete file
i receive this error:
The operation could not be completed because the file is open in matlab R2024a …..
writecell(bu,hhh,’Delimiter’,’ ‘);
when I kill writecell process (using ctrl+c) in matlab i receive this error and if i try to delete file
i receive this error:
The operation could not be completed because the file is open in matlab R2024a i can’t delete the file obtained with matlab MATLAB Answers — New Questions
adaptive histogram equalization- clahe
hello. for a project i need to write alon the "adapthisteq" function.
i have a problem with the connecting of the tiles and the colors as you can see.
does someone have an idea how i can make it better? thanks!!hello. for a project i need to write alon the "adapthisteq" function.
i have a problem with the connecting of the tiles and the colors as you can see.
does someone have an idea how i can make it better? thanks!! hello. for a project i need to write alon the "adapthisteq" function.
i have a problem with the connecting of the tiles and the colors as you can see.
does someone have an idea how i can make it better? thanks!! image processing, histogram, image MATLAB Answers — New Questions
i could like to create a debounce block in simulink
if the input is false and the previous out is false then the counter = counter – dec, if the input is false and the previous out is true then the counter = counter + inc ,if the input is true and the previous out is false then the counter = counter + inc ,if the input is true and the previous out is true then the counter = counter – dec, and if the previous out is true and the counter is greater than reset thershold then the output is false and the counter is 0, if the previous out is false and the counter is greater than set thershold then the out is true and the counter is 0 else out is previous out and the counter is equal to counter. Note: counter = 0 – The block can also output the counter. – if R (Reset) =1, the output is set to Init_Out. For every blocks, INC=1 and DEC=1. USING RULES NFR AUTEMSLIB DEBOUNCE 01/01 In, Out. Init Out and R are Boolean variables. The Cntr. SET_THR, RESET_THR, have no unit and an accuracy of 1. The range of Cntr has to be the same as the one defined under the block. The range of SET_THR, RESET_THR, Inc and Dec is [0..254] or [0..65534] if the range of Cntr is respectively [0..255]ог [0..65535].if the input is false and the previous out is false then the counter = counter – dec, if the input is false and the previous out is true then the counter = counter + inc ,if the input is true and the previous out is false then the counter = counter + inc ,if the input is true and the previous out is true then the counter = counter – dec, and if the previous out is true and the counter is greater than reset thershold then the output is false and the counter is 0, if the previous out is false and the counter is greater than set thershold then the out is true and the counter is 0 else out is previous out and the counter is equal to counter. Note: counter = 0 – The block can also output the counter. – if R (Reset) =1, the output is set to Init_Out. For every blocks, INC=1 and DEC=1. USING RULES NFR AUTEMSLIB DEBOUNCE 01/01 In, Out. Init Out and R are Boolean variables. The Cntr. SET_THR, RESET_THR, have no unit and an accuracy of 1. The range of Cntr has to be the same as the one defined under the block. The range of SET_THR, RESET_THR, Inc and Dec is [0..254] or [0..65534] if the range of Cntr is respectively [0..255]ог [0..65535]. if the input is false and the previous out is false then the counter = counter – dec, if the input is false and the previous out is true then the counter = counter + inc ,if the input is true and the previous out is false then the counter = counter + inc ,if the input is true and the previous out is true then the counter = counter – dec, and if the previous out is true and the counter is greater than reset thershold then the output is false and the counter is 0, if the previous out is false and the counter is greater than set thershold then the out is true and the counter is 0 else out is previous out and the counter is equal to counter. Note: counter = 0 – The block can also output the counter. – if R (Reset) =1, the output is set to Init_Out. For every blocks, INC=1 and DEC=1. USING RULES NFR AUTEMSLIB DEBOUNCE 01/01 In, Out. Init Out and R are Boolean variables. The Cntr. SET_THR, RESET_THR, have no unit and an accuracy of 1. The range of Cntr has to be the same as the one defined under the block. The range of SET_THR, RESET_THR, Inc and Dec is [0..254] or [0..65534] if the range of Cntr is respectively [0..255]ог [0..65535]. debounce, matlabfunction, simulink, counter MATLAB Answers — New Questions
I want to write data at the end of every nth line of a text file
I have a long text file which contains several thousands of the following type of data
a0 =
333222
323312
310132
a1=
33222
323312
310132
a2=
133222
323312
310132
a3=
233222
323312
310132
a4=
303222
323312
310132
a5=
313222
323312
310132
a6=
323222
323312
310132
:
:
a2776=…
And I want to add at the end of evry 4th line a letter c and save back that modified file in txt format. After modification it should look like that
a0 =
333222
323312
310132c
a1=
33222
323312
310132c
a2=
133222
323312
310132c
a3=
233222
323312
310132c
a4=
303222
323312
310132c
a5=
313222
323312
310132c
a6=
323222
323312
310132c
:
:
:
a2776=…I have a long text file which contains several thousands of the following type of data
a0 =
333222
323312
310132
a1=
33222
323312
310132
a2=
133222
323312
310132
a3=
233222
323312
310132
a4=
303222
323312
310132
a5=
313222
323312
310132
a6=
323222
323312
310132
:
:
a2776=…
And I want to add at the end of evry 4th line a letter c and save back that modified file in txt format. After modification it should look like that
a0 =
333222
323312
310132c
a1=
33222
323312
310132c
a2=
133222
323312
310132c
a3=
233222
323312
310132c
a4=
303222
323312
310132c
a5=
313222
323312
310132c
a6=
323222
323312
310132c
:
:
:
a2776=… I have a long text file which contains several thousands of the following type of data
a0 =
333222
323312
310132
a1=
33222
323312
310132
a2=
133222
323312
310132
a3=
233222
323312
310132
a4=
303222
323312
310132
a5=
313222
323312
310132
a6=
323222
323312
310132
:
:
a2776=…
And I want to add at the end of evry 4th line a letter c and save back that modified file in txt format. After modification it should look like that
a0 =
333222
323312
310132c
a1=
33222
323312
310132c
a2=
133222
323312
310132c
a3=
233222
323312
310132c
a4=
303222
323312
310132c
a5=
313222
323312
310132c
a6=
323222
323312
310132c
:
:
:
a2776=… add data to the end of every nth line of a text fi MATLAB Answers — New Questions
DWT or MODWT with custom frequency bands
Dear all,
I am analyzing time-series data with a special interest in frequency-band specific crosscorrelation. In the past, I have used modwt and modwtcorr to do so. In my example, the signal is 4001 samples long and the sampling frequency is 20 kHz. When creating the standard filterbank (dwtfilterbank), I am given 10 levels with specific bands (in Hz) [5000 10000; 2500 5000; 1250 2500; 625 1250; 312.5 625; 156.25 312.5; 78.125 156.25; 39.0625 78.125; 19.53125 39.0625; 0 19.53125], coming from the following code:
%determine number of levels
max_levels = wmaxlev(4001,’sym4′)
%design filterbank
fb_dwt = dwtfilterbank(‘SignalLength’,4001,’SamplingFrequency’,20000,’Level’,max_levels)
%extract frequency bands
bands = dwtpassbands(fb_dwt)
I have highlighted the bands of interest to me. Upon further investigation, I would be more interested in shifting these bands towards 50 – 100, 100 – 300 and 300 – 600 Hz. Is it possible to design a filterbank for modwt or dwt that considers this and permits later cross-correlation analysis (such as modwtcorr)? This would be extremely helpful for me.
Thank you very much, and best,
MichaelDear all,
I am analyzing time-series data with a special interest in frequency-band specific crosscorrelation. In the past, I have used modwt and modwtcorr to do so. In my example, the signal is 4001 samples long and the sampling frequency is 20 kHz. When creating the standard filterbank (dwtfilterbank), I am given 10 levels with specific bands (in Hz) [5000 10000; 2500 5000; 1250 2500; 625 1250; 312.5 625; 156.25 312.5; 78.125 156.25; 39.0625 78.125; 19.53125 39.0625; 0 19.53125], coming from the following code:
%determine number of levels
max_levels = wmaxlev(4001,’sym4′)
%design filterbank
fb_dwt = dwtfilterbank(‘SignalLength’,4001,’SamplingFrequency’,20000,’Level’,max_levels)
%extract frequency bands
bands = dwtpassbands(fb_dwt)
I have highlighted the bands of interest to me. Upon further investigation, I would be more interested in shifting these bands towards 50 – 100, 100 – 300 and 300 – 600 Hz. Is it possible to design a filterbank for modwt or dwt that considers this and permits later cross-correlation analysis (such as modwtcorr)? This would be extremely helpful for me.
Thank you very much, and best,
Michael Dear all,
I am analyzing time-series data with a special interest in frequency-band specific crosscorrelation. In the past, I have used modwt and modwtcorr to do so. In my example, the signal is 4001 samples long and the sampling frequency is 20 kHz. When creating the standard filterbank (dwtfilterbank), I am given 10 levels with specific bands (in Hz) [5000 10000; 2500 5000; 1250 2500; 625 1250; 312.5 625; 156.25 312.5; 78.125 156.25; 39.0625 78.125; 19.53125 39.0625; 0 19.53125], coming from the following code:
%determine number of levels
max_levels = wmaxlev(4001,’sym4′)
%design filterbank
fb_dwt = dwtfilterbank(‘SignalLength’,4001,’SamplingFrequency’,20000,’Level’,max_levels)
%extract frequency bands
bands = dwtpassbands(fb_dwt)
I have highlighted the bands of interest to me. Upon further investigation, I would be more interested in shifting these bands towards 50 – 100, 100 – 300 and 300 – 600 Hz. Is it possible to design a filterbank for modwt or dwt that considers this and permits later cross-correlation analysis (such as modwtcorr)? This would be extremely helpful for me.
Thank you very much, and best,
Michael discrete wavelet transform, filterbank, cross-correlation, signal processing, wavelet MATLAB Answers — New Questions
How to show time and current at y axis at the same time
How can you show the time and current values on y axis at the same timeHow can you show the time and current values on y axis at the same time How can you show the time and current values on y axis at the same time image analysis MATLAB Answers — New Questions