Answered

How to define RDT function in Matlab?

You need to call the function with its arguments. You just typed rdt on the command line. You must first assign the variables y...

How to define RDT function in Matlab?

You need to call the function with its arguments. You just typed rdt on the command line. You must first assign the variables y...

1 jour ago | 0

Question

How to ensemble average with periodic inputs using System ID toolbox?

I am using the System Identification Toolbox. In general, one advantage of using periodic input signals, such as PRBS, is the po...

1 jour ago | 0 answers | 0

Answered

Function Finds the Prime Factorization of An Integer Greater than 1

The matlab factor command does it one line. But maybe you have to do it yourself for a homework exercise? For example f = facto...

Function Finds the Prime Factorization of An Integer Greater than 1

The matlab factor command does it one line. But maybe you have to do it yourself for a homework exercise? For example f = facto...

1 jour ago | 0

| accepted

Answered

Find a number inside a matrix

There are probably more efficient ways to do this but one approach would be to utilize MATLAB's find function. If your matrix ...

Find a number inside a matrix

There are probably more efficient ways to do this but one approach would be to utilize MATLAB's find function. If your matrix ...

1 jour ago | 0

Answered

try ,catch, and continue commands in for loop, and storing for loop data in a matrix

It looks like you never assign C{k} unless there is an error. Maybe you should assign C{k} after the end statement that end the ...

try ,catch, and continue commands in for loop, and storing for loop data in a matrix

It looks like you never assign C{k} unless there is an error. Maybe you should assign C{k} after the end statement that end the ...

2 jours ago | 0

Answered

more non-singleton rhs dimensions

I'm thinking that you want to loop through your t values. You first assign t to the vector [30,60,90,120,150] but then reassign ...

more non-singleton rhs dimensions

I'm thinking that you want to loop through your t values. You first assign t to the vector [30,60,90,120,150] but then reassign ...

3 jours ago | 0

| accepted

Answered

Plotting using a for loop

You need to save your values to a vector you are just replacing a single scalar value

Plotting using a for loop

You need to save your values to a vector you are just replacing a single scalar value

3 jours ago | 0

Answered

Matrix dimensions must agree

Use strcmp for example if strcmp(Caso,'isotermico') A switch case expression can also be used nicely for this switch Caso ...

Matrix dimensions must agree

Use strcmp for example if strcmp(Caso,'isotermico') A switch case expression can also be used nicely for this switch Caso ...

3 jours ago | 0

| accepted

Answered

Why am I able to leave out the right-most arguments in a call to a function that doesn't need them under certain circumstances?

This is a feature. As long as you don't do a calculation within the function that needs the missing variables it will not throw ...

Why am I able to leave out the right-most arguments in a call to a function that doesn't need them under certain circumstances?

This is a feature. As long as you don't do a calculation within the function that needs the missing variables it will not throw ...

13 jours ago | 0

| accepted

Answered

EXTRACT TABLE FROM DATA

You may have a different number of columns each time through the loop. You can't just stack them on top of each other if they d...

EXTRACT TABLE FROM DATA

You may have a different number of columns each time through the loop. You can't just stack them on top of each other if they d...

13 jours ago | 0

| accepted

Answered

Why do I keep getting "Array indices must be positive integers logical value"

In general that error comes from trying to index an array with something other than a positive integer or a logical variable. So...

Why do I keep getting "Array indices must be positive integers logical value"

In general that error comes from trying to index an array with something other than a positive integer or a logical variable. So...

13 jours ago | 0

Answered

Phase Shift Sawtooth Wave

if you just want to shift it so that it starts at (0,0): tri = T_amp*sawtooth(T_freq*ft, .5) + T_amp; Note that with the above...

Phase Shift Sawtooth Wave

if you just want to shift it so that it starts at (0,0): tri = T_amp*sawtooth(T_freq*ft, .5) + T_amp; Note that with the above...

14 jours ago | 1

Answered

How to determine median pixel intensity for each pixel from x number of pictures

Suppose your images are each in a mRow by nCol array and you have numImages total number of images. If you put all of the images...

How to determine median pixel intensity for each pixel from x number of pictures

Suppose your images are each in a mRow by nCol array and you have numImages total number of images. If you put all of the images...

15 jours ago | 0

| accepted

Answered

how to plot magnitude and phase spectrum? my output function is

If you have the control system toolbox you could do something like: % define a discrete time system z^-5+z^-4+z^-3+z^..1 with a...

how to plot magnitude and phase spectrum? my output function is

If you have the control system toolbox you could do something like: % define a discrete time system z^-5+z^-4+z^-3+z^..1 with a...

17 jours ago | 0

Answered

How can you find the poles of a steady state system using c2d and the sampling frequency ?

Suppose you have a continuous plant model g and you discretize it with the sampling period ts % discretize gd = c2d(g,ts) %...

How can you find the poles of a steady state system using c2d and the sampling frequency ?

Suppose you have a continuous plant model g and you discretize it with the sampling period ts % discretize gd = c2d(g,ts) %...

17 jours ago | 0

Answered

Loops vs. Vectorization

It may be useful for you to know that for example M = [3 5 7] == [2; 3; 4;] % row vector == column vector gives a matrix 3×3...

Loops vs. Vectorization

It may be useful for you to know that for example M = [3 5 7] == [2; 3; 4;] % row vector == column vector gives a matrix 3×3...

17 jours ago | 2

| accepted

Answered

Plot Root Locus for PD-Controller

I don't think you can do it directly with the rlocus command which is just for a variable overall open loop gain. One way to do...

Plot Root Locus for PD-Controller

I don't think you can do it directly with the rlocus command which is just for a variable overall open loop gain. One way to do...

18 jours ago | 0

Answered

How can I implement lsqcurvefit function on my equations?

From your description, it sound like you want to find the solution to a system of 5 equations (in I assume 5 unknowns). In this ...

How can I implement lsqcurvefit function on my equations?

From your description, it sound like you want to find the solution to a system of 5 equations (in I assume 5 unknowns). In this ...

18 jours ago | 0

| accepted

Answered

finding the mean based on a specific value in other column

Lets say you have put your data into an array X. Find a logical index where the rows match your criteria using: criteria = [52...

finding the mean based on a specific value in other column

Lets say you have put your data into an array X. Find a logical index where the rows match your criteria using: criteria = [52...

20 jours ago | 0

Question

How to programmatically change tunable masked parameters while a simulation is running?

I would like to programmatically change masked parameters while a simulation is running. I have made the parameters "tunable" ...

21 jours ago | 1 answer | 0

Answered

Getting directly range of value from MATLAB table?

I'm not sure what you mean by not using indexing. In case this helps here is one way to do it. Suppose you have a table T, with ...

Getting directly range of value from MATLAB table?

I'm not sure what you mean by not using indexing. In case this helps here is one way to do it. Suppose you have a table T, with ...

21 jours ago | 0

Answered

How do you find the best path in a grid or matrix of dimensions MxN?

You should be able to write a recursive function to do this. The function would provide the next row and column to move to give...

How do you find the best path in a grid or matrix of dimensions MxN?

You should be able to write a recursive function to do this. The function would provide the next row and column to move to give...

22 jours ago | 1

Answered

How do I assign a number to an image in a cell array?

If you have a number of characteristics and don't want to have some elaborate encoding for how these are all specified I would p...

How do I assign a number to an image in a cell array?

If you have a number of characteristics and don't want to have some elaborate encoding for how these are all specified I would p...

22 jours ago | 0

Answered

Error "Function definitions are not permitted in this context" in matlab R2014a

You can not define functions on the command line. Open up a new file and edit it there On the MATLAB menu bar HOME>New>Function...

Error "Function definitions are not permitted in this context" in matlab R2014a

You can not define functions on the command line. Open up a new file and edit it there On the MATLAB menu bar HOME>New>Function...

22 jours ago | 0

| accepted

Answered

Plotting outputs at certain simulation time

The exact details depend upon what format you are using to save your Simulink output. It can be saved as a Simulink dataset, an ...

Plotting outputs at certain simulation time

The exact details depend upon what format you are using to save your Simulink output. It can be saved as a Simulink dataset, an ...

22 jours ago | 0

| accepted

Answered

Graph behaviours in Simulink

I don't think you should be using the derivative block. I don't see that in the original diagram. Also it makes no sense to diff...

Graph behaviours in Simulink

I don't think you should be using the derivative block. I don't see that in the original diagram. Also it makes no sense to diff...

22 jours ago | 0

Answered

How do you pull select columns from dozens of .csv files in a directory and make one long vector with all the values?

% I'll assume that your files are named follwing some meaningful pattern, e.g. data01.csv, data02.csv, ...You can adapt using yo...

How do you pull select columns from dozens of .csv files in a directory and make one long vector with all the values?

% I'll assume that your files are named follwing some meaningful pattern, e.g. data01.csv, data02.csv, ...You can adapt using yo...

23 jours ago | 0

Answered

How to draw a histogram of my data?

I'm not really sure what you are trying to make a histogram of. It looks like you just want to know how many equally spaced valu...

How to draw a histogram of my data?

I'm not really sure what you are trying to make a histogram of. It looks like you just want to know how many equally spaced valu...

23 jours ago | 0

| accepted

Answered

How to plot 3D surface from 2D array?

There is also a MATLAB function called streamtube https://www.mathworks.com/help/matlab/ref/streamtube.html which seems closely ...

How to plot 3D surface from 2D array?

There is also a MATLAB function called streamtube https://www.mathworks.com/help/matlab/ref/streamtube.html which seems closely ...

23 jours ago | 0

Answered

how i can import specific rows from excel and than use that row in equations MATLAB .

You can use the matlab command readmatrix to get the data in from Excel (type doc readmatrix on the command line for details) T...

how i can import specific rows from excel and than use that row in equations MATLAB .

You can use the matlab command readmatrix to get the data in from Excel (type doc readmatrix on the command line for details) T...

25 jours ago | 0