Community Profile

# Jon

##### Last seen: 1 jour ago
288 total contributions since 2013

View details...

Contributions in
View by

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

### 0

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

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

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 ...

3 jours ago | 0

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

Plotting using a for loop
You need to save your values to a vector you are just replacing a single scalar value

4 jours ago | 0

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 ...

4 jours ago | 0

| accepted

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

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...

14 jours ago | 0

| accepted

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...

14 jours ago | 0

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...

15 jours ago | 1

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

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

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

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

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

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

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

### 1

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 ...

22 jours ago | 0

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

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

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

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

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

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

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...

24 jours ago | 0

| accepted