I am an associate engineer in Engineering Development Group at Mathworks.

DISCLAIMER: Any advice or opinions here are on my own and in no way reflect that of Mathworks

Answered

Simulink Debugging for MATLAB function block not working in R2020a

I could not reproduce the issue as I don't have the model you are using .But in cases like in accelerator mode of simulation and...

Simulink Debugging for MATLAB function block not working in R2020a

I could not reproduce the issue as I don't have the model you are using .But in cases like in accelerator mode of simulation and...

10 months ago | 0

Answered

Error using Simulink.SimulationManager

The input ModelName to the Simulink.SimulationInput should be of type char and not string. model = 'trialprj';

Error using Simulink.SimulationManager

The input ModelName to the Simulink.SimulationInput should be of type char and not string. model = 'trialprj';

10 months ago | 0

| accepted

Answered

How can I modify the datetime ticks used in heatmaps

The below code helps CustomXLabels = string(x_time); % Replace all but the tenth elements by spaces CustomXLabels(mod(minute(...

How can I modify the datetime ticks used in heatmaps

The below code helps CustomXLabels = string(x_time); % Replace all but the tenth elements by spaces CustomXLabels(mod(minute(...

10 months ago | 0

| accepted

Answered

How can I select interactively some images with specific features while displaying them in a sequence?

You could try using image batch processor app.

How can I select interactively some images with specific features while displaying them in a sequence?

You could try using image batch processor app.

11 months ago | 0

Answered

Error using getappdata when Import excel with multiple sheets

The error occurs when the handle 'h' you are refering to is not a valid handle of a handle graphics object . handles.SheetsDat...

Error using getappdata when Import excel with multiple sheets

The error occurs when the handle 'h' you are refering to is not a valid handle of a handle graphics object . handles.SheetsDat...

11 months ago | 0

Answered

how to fix:Unable to perform assignment because the left and right sides have a different number of elements.

LSc(j-1) = LSc(j)-h6*(auxLSc1+2*(auxLSc2+auxLSc3)+auxLSc4); In this line of your code , auxLSc2,auxLSc3,auLSc4 are arrays of s...

how to fix:Unable to perform assignment because the left and right sides have a different number of elements.

LSc(j-1) = LSc(j)-h6*(auxLSc1+2*(auxLSc2+auxLSc3)+auxLSc4); In this line of your code , auxLSc2,auxLSc3,auLSc4 are arrays of s...

11 months ago | 0

Answered

How to solve for k in this model?

First solve the diffrerential equation and obtain function P as function of t and k using dsolve syms p(t) pm k lambda lambda...

How to solve for k in this model?

First solve the diffrerential equation and obtain function P as function of t and k using dsolve syms p(t) pm k lambda lambda...

11 months ago | 0

Answered

connecting switches to transformer

3 - phase transformer is a block from the Simscape Electrical Specialized Power Systems library whereas switch is a block in the...

connecting switches to transformer

3 - phase transformer is a block from the Simscape Electrical Specialized Power Systems library whereas switch is a block in the...

11 months ago | 1

| accepted

Answered

How can I set pramaters of Simscape Solver Configuration block?

You can find the answer here

How can I set pramaters of Simscape Solver Configuration block?

You can find the answer here

11 months ago | 1

| accepted

Answered

Reverse 2D-lookup table: issues iterating through loops

In your code provided, size of array s is [1 301]. for j = 1:size(s)-1 % first element of the size array is considered I...

Reverse 2D-lookup table: issues iterating through loops

In your code provided, size of array s is [1 301]. for j = 1:size(s)-1 % first element of the size array is considered I...

11 months ago | 0

| accepted

Answered

Why doesn't num2fixpt function return my expected counterpart fixed point value?

num2fixpt function does not convert double/float to a fixed point notation, instead it converts value to a nearest value represe...

Why doesn't num2fixpt function return my expected counterpart fixed point value?

num2fixpt function does not convert double/float to a fixed point notation, instead it converts value to a nearest value represe...

11 months ago | 0

| accepted

Answered

Why the amplitude of the 90 shifted phase signal when use the analytic signal block is not equal to the original signal?

You can try variable phase shift block in simulink. https://www.mathworks.com/help/simrf/ug/variable-phase-shift.html

Why the amplitude of the 90 shifted phase signal when use the analytic signal block is not equal to the original signal?

You can try variable phase shift block in simulink. https://www.mathworks.com/help/simrf/ug/variable-phase-shift.html

12 months ago | 0

Answered

Send Email using gmail failed

You also have to set the preferences through GMAIL to allow interaction with MATLAB. You can do it with the following link: htt...

Send Email using gmail failed

You also have to set the preferences through GMAIL to allow interaction with MATLAB. You can do it with the following link: htt...

1 year ago | 0

| accepted

Answered

Simulink error :Invalid setting of fixed step size

The error occurs because you have set the solver to fixed-step and specified the step size to be 0.001,which serves as the funda...

Simulink error :Invalid setting of fixed step size

The error occurs because you have set the solver to fixed-step and specified the step size to be 0.001,which serves as the funda...

1 year ago | 0

Answered

Zynq SDR Capture Length question!

You can just enable the property'EnableOversizeCapture' by setting it to true.In addition to the other arguments of capture func...

Zynq SDR Capture Length question!

You can just enable the property'EnableOversizeCapture' by setting it to true.In addition to the other arguments of capture func...

1 year ago | 0

| accepted

Answered

Substitute symbolic sub-expression in expression

Enclose the subexpresssion in braces as it contains more than one term. eq = Tnext - 2*Tn + Tprev == - (sigma*Tinf^4*h^2 + alph...

Substitute symbolic sub-expression in expression

Enclose the subexpresssion in braces as it contains more than one term. eq = Tnext - 2*Tn + Tprev == - (sigma*Tinf^4*h^2 + alph...

1 year ago | 0

| accepted

Answered

Conditional Indexing Using Specific Numbers in A Column

load('MyData.mat'); a=find(MyData(:,11)==5001); b=find(MyData(:,11)==6001); matrixA=MyData(a(1):b(end),:);

Conditional Indexing Using Specific Numbers in A Column

load('MyData.mat'); a=find(MyData(:,11)==5001); b=find(MyData(:,11)==6001); matrixA=MyData(a(1):b(end),:);

1 year ago | 0

Answered

Polyfit Vs Fit command: what are the differences?

Refer the below link to know the differences betwween fit and polyfit https://www.mathworks.com/matlabcentral/answers/81143-fit...

Polyfit Vs Fit command: what are the differences?

Refer the below link to know the differences betwween fit and polyfit https://www.mathworks.com/matlabcentral/answers/81143-fit...

1 year ago | 1

Answered

Problem in converting datetime to POSIX and then the same POSIX back to datetime

While converting the posixtime to datetime specify the TimeZone using name-value pair,If not specified the posix times are consi...

Problem in converting datetime to POSIX and then the same POSIX back to datetime

While converting the posixtime to datetime specify the TimeZone using name-value pair,If not specified the posix times are consi...

1 year ago | 0

| accepted

Answered

I need some Help coding a Database for Angles!

I have tried to understand what you want to achieved and tried to code it in a optimized way. for index = 1: 3 I = input ('E...

I need some Help coding a Database for Angles!

I have tried to understand what you want to achieved and tried to code it in a optimized way. for index = 1: 3 I = input ('E...

1 year ago | 0

Answered

How can I export data to excel from a GUI (created using GUIDE) using a push button

Create a cell array of all the variables and export the cell array to excel file which is created in the same directory using xl...

How can I export data to excel from a GUI (created using GUIDE) using a push button

Create a cell array of all the variables and export the cell array to excel file which is created in the same directory using xl...

1 year ago | 0

Answered

Selection data from Discrete Root Mean Square simulink

As you specified that your Discrete RMS Value block generates output [0;1.0977] ,make sure you set the Input port size of the se...

Selection data from Discrete Root Mean Square simulink

As you specified that your Discrete RMS Value block generates output [0;1.0977] ,make sure you set the Input port size of the se...

1 year ago | 0

| accepted

Answered

how do i calculate the partial sum of a fourier series?

There is not direct built-in function yet to do that .You can do that by your own code.Try the script below with your function ...

how do i calculate the partial sum of a fourier series?

There is not direct built-in function yet to do that .You can do that by your own code.Try the script below with your function ...

1 year ago | 0

Answered

How to change the color of uitable 'row-wise'?

You can make use of uistyle and addstyle functions Refer to the documnetation link below https://www.mathworks.com/help/matlab...

How to change the color of uitable 'row-wise'?

You can make use of uistyle and addstyle functions Refer to the documnetation link below https://www.mathworks.com/help/matlab...

1 year ago | 0

Answered

Matlab error in simulink for numerator of transfer function 'Unable to use a value of type tf as an index'

Here variable s represents the transfer function and cannot be used as an index to access the elements of the arrays num_th_Case...

Matlab error in simulink for numerator of transfer function 'Unable to use a value of type tf as an index'

Here variable s represents the transfer function and cannot be used as an index to access the elements of the arrays num_th_Case...

1 year ago | 0

| accepted

Answered

[ empty sym ] & "unable to find explicit solution" error when using dsolve for second order differential equation

syms y(t) [v] = odeToVectorField(diff(y,t,2)+0.15*diff(y,t)+y-y^3 == 0); M = matlabFunction(v,'vars', {'t','Y'}); t= [0 20];...

[ empty sym ] & "unable to find explicit solution" error when using dsolve for second order differential equation

syms y(t) [v] = odeToVectorField(diff(y,t,2)+0.15*diff(y,t)+y-y^3 == 0); M = matlabFunction(v,'vars', {'t','Y'}); t= [0 20];...

1 year ago | 0

Answered

How can I make a symbolic function with vector input?

a=sym('a',[1 3]); f= @(a)(a(1)^2+a(2)+a(3)*a(1)); k=[1 1 1]; f(k)

How can I make a symbolic function with vector input?

a=sym('a',[1 3]); f= @(a)(a(1)^2+a(2)+a(3)*a(1)); k=[1 1 1]; f(k)

1 year ago | 0

| accepted

Answered

Merging multiple .txt files into one NetCDF file

First,you can read the text files into tables of data using readtable. Merge the data of the 37 tables to a single table.Convert...

Merging multiple .txt files into one NetCDF file

First,you can read the text files into tables of data using readtable. Merge the data of the 37 tables to a single table.Convert...

1 year ago | 0

| accepted

Answered

Converting 2D plots into a 3D plot

As you have 3 vectors waterdepth,time and velocities, you can plot a 3D scatter plot by making use of scatter3 function. Refer ...

Converting 2D plots into a 3D plot

As you have 3 vectors waterdepth,time and velocities, you can plot a 3D scatter plot by making use of scatter3 function. Refer ...

1 year ago | 0