I love all things code. However, Simulink is growing on me.

Professional Interests: Embedded Systems, FPGA, HDL, Code Generation

Answered

Linking projects together in Simulink project

There are a couple of options for what you are describing, depending on your needs. The easiest, would be to use what is called ...

Linking projects together in Simulink project

There are a couple of options for what you are describing, depending on your needs. The easiest, would be to use what is called ...

alrededor de 6 años ago | 0

Answered

how can i convert irregularly placed space data into 3d grid

Enkuneh, I just answered a very similar question about this same topic - irregular to regular 3D data transformation. Check o...

how can i convert irregularly placed space data into 3d grid

Enkuneh, I just answered a very similar question about this same topic - irregular to regular 3D data transformation. Check o...

alrededor de 6 años ago | 1

Answered

Creating a 3d volumetric matrix for irregular xyz data with multiple depths

Jenny, It seems like you just need to map your nodes to the input arguments for |scatteredinterpolant|. For an irregular grid...

Creating a 3d volumetric matrix for irregular xyz data with multiple depths

Jenny, It seems like you just need to map your nodes to the input arguments for |scatteredinterpolant|. For an irregular grid...

alrededor de 6 años ago | 5

Answered

Mutual array between matrixes ( complete )

I think that your algorithm description and examples values are contradictory, so its hard to answer this exactly. But, I will s...

Mutual array between matrixes ( complete )

I think that your algorithm description and examples values are contradictory, so its hard to answer this exactly. But, I will s...

alrededor de 6 años ago | 0

Answered

how to get values of a matrix in MATLAB where the indices are given in a MATRIX form?

Valeria, You can access a subset of the rows (but all of the columns) by converting the column indexes returned by |sort| int...

how to get values of a matrix in MATLAB where the indices are given in a MATRIX form?

Valeria, You can access a subset of the rows (but all of the columns) by converting the column indexes returned by |sort| int...

alrededor de 6 años ago | 1

Answered

How do I invoke a shadowed core MATLAB function (not built-in) from an overloaded function of same name

Julian, I think you had the right idea with the |run| command to call |print|, but use the fullpath instead of |cd| into the ...

How do I invoke a shadowed core MATLAB function (not built-in) from an overloaded function of same name

Julian, I think you had the right idea with the |run| command to call |print|, but use the fullpath instead of |cd| into the ...

alrededor de 6 años ago | 0

Answered

read a large prime number(which is in hexadecimal form) from a file and store that in a global variable(integer form)

Anil, Your prime number is a 192 character hexadecimal number, so that is roughly |2^768| in size. This is much bigger than t...

read a large prime number(which is in hexadecimal form) from a file and store that in a global variable(integer form)

Anil, Your prime number is a 192 character hexadecimal number, so that is roughly |2^768| in size. This is much bigger than t...

alrededor de 6 años ago | 1

Answered

Bootstrap with observations not being rows

Fernando, The function |bootstrp| will take in a column vector of |cells| as well as a standard vector/matrix of |doubles|. ...

Bootstrap with observations not being rows

Fernando, The function |bootstrp| will take in a column vector of |cells| as well as a standard vector/matrix of |doubles|. ...

alrededor de 6 años ago | 0

| accepted

Answered

create a loop using regexp

You can do this with regular expressions, but your name requirements seem simple enough to do with |dir| and |sprintf| instead. ...

create a loop using regexp

You can do this with regular expressions, but your name requirements seem simple enough to do with |dir| and |sprintf| instead. ...

alrededor de 6 años ago | 0

Answered

How can I plot trajectories on top of a map?

The Mapping toolbox has a number of great functions to help out with exactly this type of thing. If you just want the specifi...

How can I plot trajectories on top of a map?

The Mapping toolbox has a number of great functions to help out with exactly this type of thing. If you just want the specifi...

alrededor de 6 años ago | 1

| accepted

Answered

Accessing sparse matrix components in MATLAB

As far as I can tell (from looking through the documentation) there is not a quick and easy way to get access to sparse competen...

Accessing sparse matrix components in MATLAB

As far as I can tell (from looking through the documentation) there is not a quick and easy way to get access to sparse competen...

alrededor de 6 años ago | 0

Answered

Several draws from multivariate normal distribution

Cris, Since your |sigma| matrix is diagonal, there is no need to use a multivariate distribution - your variables are complet...

Several draws from multivariate normal distribution

Cris, Since your |sigma| matrix is diagonal, there is no need to use a multivariate distribution - your variables are complet...

alrededor de 6 años ago | 2

| accepted

Answered

Several draws from multivariate normal distribution

The function you are looking for is |mvnrnd|. You will still have to call |mvrnd| one distribution at a time, and hence looping ...

Several draws from multivariate normal distribution

The function you are looking for is |mvnrnd|. You will still have to call |mvrnd| one distribution at a time, and hence looping ...

alrededor de 6 años ago | 0

Answered

Plotting higher-dimensional data in two-dimensions which has already processed using supervised learning

James, I think what you might be looking for is |scatter| coupled with specifying the |MarkerColor| as a vector corresponding...

Plotting higher-dimensional data in two-dimensions which has already processed using supervised learning

James, I think what you might be looking for is |scatter| coupled with specifying the |MarkerColor| as a vector corresponding...

alrededor de 6 años ago | 0

| accepted

Answered

How to select specific rows with a certain range/certain value in another row?

Pinga, 1. To get |Data| as a 1x90 cell array, use the following code: Data = Data{1}(1:90) There are two ways to ref...

How to select specific rows with a certain range/certain value in another row?

Pinga, 1. To get |Data| as a 1x90 cell array, use the following code: Data = Data{1}(1:90) There are two ways to ref...

alrededor de 6 años ago | 0

| accepted

Answered

Control Simulibk step size through an internal coondition

Anfanger, In order for the parameters |MinStep| and |MaxStep| to be enabled, the solver |Type| must be |VariableStep|. If y...

Control Simulibk step size through an internal coondition

Anfanger, In order for the parameters |MinStep| and |MaxStep| to be enabled, the solver |Type| must be |VariableStep|. If y...

alrededor de 6 años ago | 0

Answered

Comparing accuracy of symbolic computation with matlabFunction

Hari, It seems you have answered your own question here, but just to clarify on the issue of accuracy, I will add a little to...

Comparing accuracy of symbolic computation with matlabFunction

Hari, It seems you have answered your own question here, but just to clarify on the issue of accuracy, I will add a little to...

alrededor de 6 años ago | 1

| accepted

Answered

How to get rid of zeros in data?

I think you were on the right track with Conversion_Eff=Conversion_Eff(Conversion_Eff~=0); Accel=Accel(Conversion_Eff~=...

How to get rid of zeros in data?

I think you were on the right track with Conversion_Eff=Conversion_Eff(Conversion_Eff~=0); Accel=Accel(Conversion_Eff~=...

alrededor de 6 años ago | 0

| accepted

Answered

Switch block need help

Adham, The documentation for this block is a bit confusing. Think of it as an |if-else|, which may make more sense if you hav...

Switch block need help

Adham, The documentation for this block is a bit confusing. Think of it as an |if-else|, which may make more sense if you hav...

alrededor de 6 años ago | 0

| accepted

Answered

How to implement a simulink model to perform Matrix multiplication ?

Matrix multiplication in Simulink is almost as easy as it is in MATLAB itself. See the block diagram below: <</matlabcentra...

How to implement a simulink model to perform Matrix multiplication ?

Matrix multiplication in Simulink is almost as easy as it is in MATLAB itself. See the block diagram below: <</matlabcentra...

alrededor de 6 años ago | 1

Answered

How can I use fprintf to save a txt file with different size matrix ?

One way you might do this is to use |if-else| statements around your |fprintf|, like this: fprintf(fid, '%d\t', Ultratimefin...

How can I use fprintf to save a txt file with different size matrix ?

One way you might do this is to use |if-else| statements around your |fprintf|, like this: fprintf(fid, '%d\t', Ultratimefin...

alrededor de 6 años ago | 2

| accepted

Answered

Placing a Title on Bounding Box

What you are looking for is either |annotation|. You can also you |sprintf| to get the string formatted with the information yo...

Placing a Title on Bounding Box

What you are looking for is either |annotation|. You can also you |sprintf| to get the string formatted with the information yo...

alrededor de 6 años ago | 2

Answered

Is there a faster way to plot wireframe cubes from their centers and sizes?

If all you need is truly a wireframe cube, then you can speed things up a quite a bit by using only lines and avoiding patches a...

Is there a faster way to plot wireframe cubes from their centers and sizes?

If all you need is truly a wireframe cube, then you can speed things up a quite a bit by using only lines and avoiding patches a...

alrededor de 6 años ago | 0

Answered

I have some force data and corresponding time data. How to remove vibration signal from force data?

Since there is a "gap" between your desired signal and the unwanted vibrations, the simplest way to do what you are describing i...

I have some force data and corresponding time data. How to remove vibration signal from force data?

Since there is a "gap" between your desired signal and the unwanted vibrations, the simplest way to do what you are describing i...

alrededor de 6 años ago | 0

Answered

How can I plot two arrays with different number of columns in one figure with different colours?

MATLAB uses (row,column) indexing, so I think you've got it backwards in your examples A and B :) But, assuming you want to...

How can I plot two arrays with different number of columns in one figure with different colours?

MATLAB uses (row,column) indexing, so I think you've got it backwards in your examples A and B :) But, assuming you want to...

alrededor de 6 años ago | 0

Answered

how to plot struct data?

The |simout| structure has |simout.signals|, |simout.time| and |simout.blockName| fields. The |simout.signals| field also has a...

how to plot struct data?

The |simout| structure has |simout.signals|, |simout.time| and |simout.blockName| fields. The |simout.signals| field also has a...

alrededor de 6 años ago | 3

| accepted

Answered

Multiple Text files to Labeled matrix/array

It sounds like you really should be using a |table| data type. Take a look at some of the examples on the document page here: ...

Multiple Text files to Labeled matrix/array

It sounds like you really should be using a |table| data type. Take a look at some of the examples on the document page here: ...

alrededor de 6 años ago | 0

Answered

Adjusting the numbers in a string

Will, You can use |sprinf| to create the file name strings and |%03d| to get up to 3 leading zeros. For example >> spri...

Adjusting the numbers in a string

Will, You can use |sprinf| to create the file name strings and |%03d| to get up to 3 leading zeros. For example >> spri...

alrededor de 6 años ago | 1

Answered

How to reshape a vector without knowing the dimensions?

Using |reshape| with only 2 dimensions specified will work only if the number of elements is such that the 3rd dimension fits ex...

How to reshape a vector without knowing the dimensions?

Using |reshape| with only 2 dimensions specified will work only if the number of elements is such that the 3rd dimension fits ex...

alrededor de 6 años ago | 1

| accepted

Answered

How to calculate integral of a function ?

The function name that you are looking for is |integral| not |int|. Changing this should get your code working. You can see the...

How to calculate integral of a function ?

The function name that you are looking for is |integral| not |int|. Changing this should get your code working. You can see the...

alrededor de 6 años ago | 0