I am an Application Support Engineer at Mathworks.

Disclaimer: Any articles/ ideas/ opinions here are my own and in no way reflect that of Mathworks.

Answered

How to use Grid search to find the optimal hyperparameters ?

Use the 'OptimizeHyperparameters' Name-Value pair argument to specify the Parameters to optimize when creating the 'Classificati...

How to use Grid search to find the optimal hyperparameters ?

Use the 'OptimizeHyperparameters' Name-Value pair argument to specify the Parameters to optimize when creating the 'Classificati...

4 months ago | 0

Answered

How do I interpolate values within a while loop?

You can use the interp1 function to interpolate the vector in the iteration when a new non zero value is added to the vector. Yo...

How do I interpolate values within a while loop?

You can use the interp1 function to interpolate the vector in the iteration when a new non zero value is added to the vector. Yo...

4 months ago | 0

| accepted

Answered

Problem while simulating control surfaces of an aircraft in simulink (Code Attached)

If there is a division by 0 or may be trigonometric infinity solutions. Here 'NaN' is the breakpoint. To solve these type of er...

Problem while simulating control surfaces of an aircraft in simulink (Code Attached)

If there is a division by 0 or may be trigonometric infinity solutions. Here 'NaN' is the breakpoint. To solve these type of er...

4 months ago | 0

Answered

How can I convert Stereo Image Rectification into a Simulink Model?

You can include MATLAB code in models that generate embeddable C code by using the MATLAB function block. Include MATLAB code ...

How can I convert Stereo Image Rectification into a Simulink Model?

You can include MATLAB code in models that generate embeddable C code by using the MATLAB function block. Include MATLAB code ...

4 months ago | 0

Answered

Recreating a one-mass model from study

Simulink provides Transfer Fcn block in the Simulink/Continuous Library. The Transfer Fcn block models a linear system by a tran...

Recreating a one-mass model from study

Simulink provides Transfer Fcn block in the Simulink/Continuous Library. The Transfer Fcn block models a linear system by a tran...

4 months ago | 0

Answered

PCA_Principal component analysis -Dimension reduction

The pca function returns the principal component coefficients, also known as loadings, for the n-by-p data matrix X. Rows of X c...

PCA_Principal component analysis -Dimension reduction

The pca function returns the principal component coefficients, also known as loadings, for the n-by-p data matrix X. Rows of X c...

4 months ago | 0

Answered

How to save each iteration of a nested for loop into a matrix

You are trying to create a result matrix which stores the max value of each row in each record. In what you are trying to do the...

How to save each iteration of a nested for loop into a matrix

You are trying to create a result matrix which stores the max value of each row in each record. In what you are trying to do the...

4 months ago | 0

| accepted

Answered

Some apps missing from app gallery in Simulink

Contact your sales representative to get detailed understanding of your license terms. If you don't know who your sales represen...

Some apps missing from app gallery in Simulink

Contact your sales representative to get detailed understanding of your license terms. If you don't know who your sales represen...

5 months ago | 0

| accepted

Answered

How to save different mat files from different folders in a cell array

If the goal is to store each mat file in a separate cell with the data of the variables each of the mat files concatenated into ...

How to save different mat files from different folders in a cell array

If the goal is to store each mat file in a separate cell with the data of the variables each of the mat files concatenated into ...

5 months ago | 0

| accepted

Answered

How should I do to use `readBinaryOccupancyGrid`?

OccupancyGrid is the custom MATLAB implementation of nav_msgs/OccupancyGrid type. readBinaryOccupancyGrid is a method of Occupan...

How should I do to use `readBinaryOccupancyGrid`?

OccupancyGrid is the custom MATLAB implementation of nav_msgs/OccupancyGrid type. readBinaryOccupancyGrid is a method of Occupan...

5 months ago | 0

Answered

Speed up a running code

The following provides information on tools within MATLAB that can help you optimize the performance of your code. 1. The first...

Speed up a running code

The following provides information on tools within MATLAB that can help you optimize the performance of your code. 1. The first...

5 months ago | 0

Answered

Calculating per year slope using daily time series data

Here is the workaround to get your desired B matrix. This code runs a loop through the TT1 to find the next time stamp of the 30...

Calculating per year slope using daily time series data

Here is the workaround to get your desired B matrix. This code runs a loop through the TT1 to find the next time stamp of the 30...

5 months ago | 0

Answered

graphing with a matrix using matlab

To plot the equation, refer to the code below. A = [1 0 0 3; 0 1 0 6; 0 0 1 5] B = A(:,end) %last column for a,b,c x =...

graphing with a matrix using matlab

To plot the equation, refer to the code below. A = [1 0 0 3; 0 1 0 6; 0 0 1 5] B = A(:,end) %last column for a,b,c x =...

5 months ago | 0

Answered

Matlab Fuzzy Logic Toolbox - OR statement in one input

The addrule function is supporting only one membership function for each input. Even if you add the rule with OR connectiion bet...

Matlab Fuzzy Logic Toolbox - OR statement in one input

The addrule function is supporting only one membership function for each input. Even if you add the rule with OR connectiion bet...

5 months ago | 0

Answered

restrict the number of threads MATLAB starts?

By default, MATLAB uses the multithreading capabilities of the computer on which it is running. You can specify the startup op...

restrict the number of threads MATLAB starts?

By default, MATLAB uses the multithreading capabilities of the computer on which it is running. You can specify the startup op...

5 months ago | 0

Answered

Target time on model status bar will not update.

Hello, You can enable the target time updating by executing the below MATLAB command in the MATLAB command window as the error ...

Target time on model status bar will not update.

Hello, You can enable the target time updating by executing the below MATLAB command in the MATLAB command window as the error ...

5 months ago | 0

Answered

Input Process Settings fitnet not working properly

Hi Aditya, Unfortunately, this seems likely to be a bug. I have brought this issue to the notice of our developers. They wil...

Input Process Settings fitnet not working properly

Hi Aditya, Unfortunately, this seems likely to be a bug. I have brought this issue to the notice of our developers. They wil...

6 months ago | 0

| accepted

Answered

lstm regression (Initial learning rate and training options)

The parameter is 'InitialLearnRate' and not 'InitialLearningRate'. check Solver Options section of the trainingOptions function...

lstm regression (Initial learning rate and training options)

The parameter is 'InitialLearnRate' and not 'InitialLearningRate'. check Solver Options section of the trainingOptions function...

6 months ago | 0

| accepted

Answered

Perform Co-Simulation between Simulink and Gazebo

The multiSensorPluginTest.world is located in /home/user/src/GazeboPlugin/world folder. This world file includes the Gazebo plug...

Perform Co-Simulation between Simulink and Gazebo

The multiSensorPluginTest.world is located in /home/user/src/GazeboPlugin/world folder. This world file includes the Gazebo plug...

6 months ago | 1

Answered

How to Make Simpsons Rule UDF

It is a valid simpsons rule implementation. Let me break the line down. sr=(h/3)*(f(x(1))+2*sum(f(x(3:2:end-2)))+4*sum(f(x(2:2:...

How to Make Simpsons Rule UDF

It is a valid simpsons rule implementation. Let me break the line down. sr=(h/3)*(f(x(1))+2*sum(f(x(3:2:end-2)))+4*sum(f(x(2:2:...

6 months ago | 0

Answered

How to use the steepest descent method to solve a function to find the unknown parameters value

You have to post the error you are facing and post the code using the editor as it is hard to read this way. I have tried to ru...

How to use the steepest descent method to solve a function to find the unknown parameters value

You have to post the error you are facing and post the code using the editor as it is hard to read this way. I have tried to ru...

6 months ago | 0

Answered

How to clear CurrentCharacter

You can use a temporary figure to check for key press. Refer to the code below for a workaround if Z == 1 if ZZ == 1 ...

How to clear CurrentCharacter

You can use a temporary figure to check for key press. Refer to the code below for a workaround if Z == 1 if ZZ == 1 ...

6 months ago | 0

Answered

How bayesopt find kernel parameters

By default the optimize parameter is set to 0 for the fitrgp KernelFunction and KernelScale hyperparmeters. Refer to the below c...

How bayesopt find kernel parameters

By default the optimize parameter is set to 0 for the fitrgp KernelFunction and KernelScale hyperparmeters. Refer to the below c...

7 months ago | 0

Answered

Help with loop and tracking values.

Hi, you are trying to find the values of "zeta2" for which the values in "B" are <= 0.05 for the last 151 rows(concluded this fr...

Help with loop and tracking values.

Hi, you are trying to find the values of "zeta2" for which the values in "B" are <= 0.05 for the last 151 rows(concluded this fr...

7 months ago | 0

Answered

How to import data from excel to be used on a 3-D lookup table in Simulink?

Hi, You can create a spreadsheetDatastore object to read data from multiple sheets into MATLAB. Refer to the example code below...

How to import data from excel to be used on a 3-D lookup table in Simulink?

Hi, You can create a spreadsheetDatastore object to read data from multiple sheets into MATLAB. Refer to the example code below...

7 months ago | 0

Answered

Aggregate multiple CSV files as an average for each cell individually and result in one CSV file with different rows in each source file.

Hi Sherwan, Here is the solution to your problem. I have made changes to the solution you posted. files = ls ('E:\test\*.csv')...

Aggregate multiple CSV files as an average for each cell individually and result in one CSV file with different rows in each source file.

Hi Sherwan, Here is the solution to your problem. I have made changes to the solution you posted. files = ls ('E:\test\*.csv')...

7 months ago | 0

| accepted

Answered

Modelling Open Circuit Test of Single Phase Transformer using Simulink

Hello, You will have to install Simscape and Simscape electrical from the simulink add-on explorer to access the transformer bl...

Modelling Open Circuit Test of Single Phase Transformer using Simulink

Hello, You will have to install Simscape and Simscape electrical from the simulink add-on explorer to access the transformer bl...

7 months ago | 0

Answered

evalin data dictionary design data unable to use parameters on rhs of expression

The "evalin" function for data dictionary section does not support the expressions where the value contains data entries as of n...

evalin data dictionary design data unable to use parameters on rhs of expression

The "evalin" function for data dictionary section does not support the expressions where the value contains data entries as of n...

8 months ago | 1

| accepted

Answered

Matlab Function into Python

You can call user scripts from python in the same way. You have to save the MATLAB script in the current folder and call it from...

Matlab Function into Python

You can call user scripts from python in the same way. You have to save the MATLAB script in the current folder and call it from...

8 months ago | 0

Answered

manually label data from a variable while looping through and save the labelled data in a new variable

Hi, you would like to review each plot in the loop and store the good samples. To do this, you can use "pushbutton" style proper...

manually label data from a variable while looping through and save the labelled data in a new variable

Hi, you would like to review each plot in the loop and store the good samples. To do this, you can use "pushbutton" style proper...

8 months ago | 1

| accepted