Question

Principal Component Analysis Reconstructing Centred Data

Hi, I have the following dataset which I have performed PCA on: DATASET = 10.0000 6.0000 11.0000 4.0000 8....

1 month ago | 0 answers | 0

Question

Find flattest line from matrix of vectors plotted against x values

Hi there, I have a matrix of y-axis coordinates, which I'm plotting against a constant set of x-axis coordinates. I want to det...

4 months ago | 1 answer | 0

Question

'The 'Start' matrix must have the same number of columns as X.' - Error when using Kmeans

Hi, I want to carry out an iteration of k-means clustering. I am using the tutorial found at https://uk.mathworks.com/help/sta...

4 months ago | 0 answers | 0

Question

Can't loop k-clustering gap stat function

Hi folks, I want to loop the following function 20 times to determine the mode of the "OptimalK" output from the evalclusters...

4 months ago | 0 answers | 0

Question

Call first row from zero-padded matrix - only call the non-zero values

Hi folks, I have a zero-padded matrix. I'm aware A(:,1) would call the first row of matrix A, but I want to only call the val...

8 months ago | 1 answer | 0

Question

Remove empty rows from matrix

Hi folks, I have the following matrix: 0.6857 0.1248 0.9636 1.0884 0.4807 0.6077 0.3644 0 ...

8 months ago | 1 answer | 0

Question

Save variable from each run through of a loop into .mat file?

Hi folks, I have my looped function if true for Z = 1:length(ev_longitude) x1 = -4:10; ...

8 months ago | 1 answer | 0

Question

Save variable in workspace but remove from memory?

Hi folks, I've managed to loop my function to (correctly) determine the distance travelled by each line through the grid cell...

9 months ago | 1 answer | 0

Question

Convert cell array to two row vector

Hi folks, I have the following cell array: hvix = [2x1 double] [2x8 double] [2x15 double] [2x1 d...

9 months ago | 2 answers | 0

Question

Store sets of values as indices in a matrix?

Hi, I have a function which produces a set of horizontal and vertical graph axes intercepts. There are 120 sets of these int...

9 months ago | 1 answer | 0

Question

Reshape matrix whilst maintaining pairs ordering

Hi, I have a 2 x 120 matrix which I'm trying to reshape to a 120 x 2 matrix. To do this I'm using the following code: y =...

9 months ago | 1 answer | 0

Answered

Loop to carry out calculation for pairs 1 and 2, then pairs 2 and 3 and so on.

Cheers folks! Works great.

Loop to carry out calculation for pairs 1 and 2, then pairs 2 and 3 and so on.

Cheers folks! Works great.

9 months ago | 0

Question

Loop to carry out calculation for pairs 1 and 2, then pairs 2 and 3 and so on.

Hi, I have two 8x1 matrices. One matrix is list of longitude coordinates (Final_Longitude_Values). The other matrix is the co...

9 months ago | 3 answers | 0

Question

Calculate how far a line travels through each square in a grid created using the meshm function

Hi, I have plotted a grid using the meshm function over a map with earthquakes and seismic stations plotted. Between each earthq...

10 months ago | 0 answers | 0

Question

Overlay a grid on a map

Hi, I have produced a map (using the worldmap function) with latitude limits of 55 to 65 and longitude limits of -5 to 10. I ...

11 months ago | 0 answers | 0

Question

Plot travel path of earthquake to a seismological station

Hi, I have 4 column vectors: Station latitude, station longitude, earthquake epicentre latitude and earthquake epicentre long...

11 months ago | 0 answers | 0

Question

Merge two columns of a cell array into one

Hi, I have two columns of cell values: <</matlabcentral/answers/uploaded_files/105933/Untitled.png>> I want to merge t...

1 year ago | 1 answer | 0

Question

Plotting text on the x-axis for residual analysis

Hi, I want to plot residuals against station name with station name on the x-axis. The x-axis values are in a 192x1 cell arra...

1 year ago | 1 answer | 0

Question

Determine averages for duplicate values

Hi, I have a cell array (11708 x 1) called "merged" where each value is the station name and the channel. I also have the re...

1 year ago | 1 answer | 0

Question

Find values outside of a range when calculating residuals.

Hi, I'm trying to find all my residuals above 3 and below minus 3 and extract the corresponding records to an excel sheet. I kno...

1 year ago | 1 answer | 0

Question

Plot categorical data as data labels on an x,y plot

Hi, I've plotted distance on the x-axis and acceleration on the y-axis. These values are from a string array. Within this...

1 year ago | 0 answers | 0

Question

Removal of spike at beginning of filtered signal time series plot

Hi, I have several plots of a filtered signal, all of which have a spike at the beginning which I would like to remove. Is th...

1 year ago | 1 answer | 0

Question

Sum all answers from structured array field

Hi, I'm trying to sum all values from one field of a structured array: (X(k(1:end)).NumberSamples) ans = 369...

1 year ago | 1 answer | 0