# C.G.

**Statistics**

**MATLAB Answers**

**58** Questions

**0** Answers

RANK**160.303**

of 257.685

REPUTATION**0**

CONTRIBUTIONS

**58** Questions

**0** Answers

ANSWER ACCEPTANCE **
44.83%
**

VOTES RECEIVED**0**

RANK

of 17.757

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 109.940

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Question

fit a sine wave to a set of data points

I have the dataset attached and the code below to try and fit a wave to the data. Im getting the following error which I can't g...

4 días ago | 2 answers | 0

### 2

answersQuestion

moving sum over multiple time windows

I have a dataset Q_opss, and I want to find the maximum moving sum of the dataset over lots of different windows. I have the co...

alrededor de 1 mes ago | 1 answer | 0

### 1

answerQuestion

logarithmic binning data in matlab

I have a dataset, and I have been told to bin the data using logarithmic binning. How would I go about logarithmic binning this...

2 meses ago | 1 answer | 0

### 1

answerQuestion

plotting a CDF with 2 logs axis

I have a time series of data, and I want to plot a CDF for this. I have plotted the cdf for this, but it is on normal axis. Is ...

2 meses ago | 1 answer | 0

### 1

answerQuestion

moving mean over 5 cells

I have a dataset where im trying to find the mean of every 5 cells and then divide this by 5 I have the code below, but I have ...

3 meses ago | 1 answer | 0

### 1

answerQuestion

error using etime (datevec)

I have a csv file with times for experiment start and end. I'm trying to use etime to work out the time difference but im gettin...

3 meses ago | 2 answers | 0

### 2

answersQuestion

error using textscan with csv files

I have been given a code to process some data in a csv file. When I run this I get the error below. Can anybody help? fid = fop...

3 meses ago | 1 answer | 0

### 1

answerQuestion

interpolating data to different sample rate

I have 2 data sets I want to correlate. One is sampled every second, and one is sampled at a much smaller interval (attached). I...

3 meses ago | 2 answers | 0

### 2

answersQuestion

resampling data into equal intervals

I have a dataset (attached) which has been sampled at unequal intervals, but for processing I need to resample this to every sec...

3 meses ago | 1 answer | 0

### 1

answerQuestion

saving figure with title as name of file

I have 4 .mat files. I extract the data from these, plot them and save each figure. Now, I want the title of the plot, and the ...

7 meses ago | 1 answer | 0

### 1

answerQuestion

looping through 2 .mat files

I have 2 matlab files with data in. Im trying to get my code to loop through both files and put the data into the 6 pre-assigned...

7 meses ago | 1 answer | 0

### 1

answerQuestion

making repetitive code less clunky

My code works, but its very long winded. I didnt know if there was a way this could be simplified to get the same outcome? I wa...

7 meses ago | 2 answers | 0

### 2

answersQuestion

plotting multiple vertical lines on a graph

Im currently using the code below to plot vertical lines on my graph at 0.5 intervals, but I want to change this to plot at ever...

7 meses ago | 1 answer | 0

### 1

answerQuestion

plotting a line of best fit using a for loop

I have the code to plot a line of best fit through my data but now I am trying to do this for multiple data sets in a for loop b...

7 meses ago | 1 answer | 0

### 1

answerQuestion

store multiple outputs into one matrix

My code currently produces 14 individual variables (x1-7 and y1-7), I am currently plotting these on a graph using hold on state...

7 meses ago | 1 answer | 0

### 1

answerQuestion

find maximum number in a range of data

I have a matrix T, and I have asked it to find all the rows where the value in column 5 is between 2 numbers and save these as S...

7 meses ago | 1 answer | 0

### 1

answerQuestion

find the lowest value in a selection of data

I have a matrix of data where I am working with columns 5 and 6. I have divided the data into sections based on the values of co...

7 meses ago | 1 answer | 0

### 1

answerQuestion

sum only consecutive 1's in matrix

I have a matrix of data where I want to go down each column in the matrix, and sum the occurences where 1's occur consectively. ...

7 meses ago | 2 answers | 0

### 2

answersQuestion

identifying if a number stays the same between files

I have 3 .csv files. I want to know if the numbers in column 5 of the first file stay the same or change between the next 2 file...

7 meses ago | 1 answer | 0

### 1

answerQuestion

finding numbers below a threshold and doing calculations on them

I have a model of a box filled with particles. I have the velocity and coordinates of each particle in the box. I have divided t...

7 meses ago | 1 answer | 0

### 1

answerQuestion

calculating angle between line of best fit and x axis

I have a set of coordinate points from a picture. I have used polyfit to find the line of best fit of these, but I want to find ...

7 meses ago | 2 answers | 0

### 2

answersQuestion

using imagesc to plot a matrix of data

I am trying to see how temperature varies with different input parameters. I have 2 input parameters which vary between 0.1-0....

7 meses ago | 1 answer | 0

### 1

answerQuestion

reshaping multiple data sets

I have a 50x4 double. I want to reshape each column of the matrix by taking the mean of every 10 elements. I have tried writin...

7 meses ago | 1 answer | 0

### 1

answerQuestion

looping through columns of a matrix and saving output

I have a matrix which is 1000x4. Each column is a different experiment run. I want to loop through each column of the matrix a...

7 meses ago | 1 answer | 0

### 1

answerQuestion

Array indices must be positive integers or logical values.

I keep getting issues saying 'Array indices must be positive integers or logical values', regarding the line ' c(1:(length(c)+...

8 meses ago | 2 answers | 0

### 2

answersQuestion

using cumsum for a vector

I have a variable GT2, which is a 1x900 double. I am trying to do a cumulative sum, where for each cell it does a cumulative su...

9 meses ago | 1 answer | 0

### 1

answerQuestion

converting an excel formula into matlab

I've written the formulas out that I require in excel, but now I want to put these into matlab. The current matlab code I have...

9 meses ago | 2 answers | 0

### 2

answersQuestion

Accessing elements in a structure

I have 2 matlab files, both containing 2 elements: velocity and points. i have loaded these two files into a structure, but now...

10 meses ago | 1 answer | 0

### 1

answerQuestion

indexing a loop to run through multiple files

I have experimental data in multiple csv files. Ive written the code I want and checked this works by only inputting 1 specifi...

10 meses ago | 1 answer | 0

### 1

answerQuestion

memory errors with large amounts of csv files

I am running a model which produces thousands of csv files which i need to read into matlab. This particular run generated 27,17...

alrededor de 1 año ago | 1 answer | 0