Community Profile # Robert

### Flinders University

Active since 2014

#### Statistics

• #### Content Feed

View by

Question

Make legend circles/squares instead of lines
I Have the following code, which produces the attached image. What I would like to do is have the lines in the legend as squares...

5 years ago | 1 answer | 0

### 1

Question

Problems with legend using imagesc
I have the following code, I have adapted it from another code and I think that is where I am getting stuck. basically I have...

5 years ago | 1 answer | 0

### 1

Question

I have 3 netcdf files all from the same source. 2 of them are loading fine using ncload (after running the nc toolbox) but one h...

6 years ago | 1 answer | 0

### 1

Question

Finding Annual Amplidute for each of multiple years
I have 12 years of monthly temperature data (144 points). I want to find the annual amplitude, the max value minus the min value...

6 years ago | 1 answer | 0

### 1

Question

For loop isn't working, unsure as to why
In the following code, 'forrest', 'shrub', 'sav', 'grass' and 'agri' have all been initialized at 35*43 matrices of NaNs. 'lu...

6 years ago | 2 answers | 0

### 2

Question

imagesc make all negatives values black
I have the following code which is part of a subplot series. I want to change it so that all negative values become a certain co...

6 years ago | 1 answer | 0

### 1

Question

Imagesc split pixel into 2 different colours?
I am using imagesc to plot a map. There are 8 possible variables that can be included in a pixel, hence the plot is of values 1-...

6 years ago | 1 answer | 0

### 1

Question

Match NaN's in one Matrix to another
Consider 2 matrices A = [1, 2, 3, 4; 5, 6, 7, 8] B = [NaN NaN 1 1; NaN 1 1 NaN] How can...

6 years ago | 1 answer | 0

### 1

Question

If isnan(x) make columns also NaN
I have a horizontal array or data 1:1505 made of Nans and 1s (inA4) I also have a matrix of data 96:1505 (Approx4) Where e...

6 years ago | 2 answers | 0

### 2

Question

Stepwisefit changing yy variable...
I have written a code for a stepwise regression. Usually there would be one yy variable and multiple xx variables. Part of the d...

6 years ago | 0 answers | 0

### 0

Question

How can I stack multiple Matrices in 1 2D matrix?
I have a 3D Matrix (96,35,43) I want to change it to (3360,43) so that each 35x43 matrix is below the previous How can I d...

6 years ago | 1 answer | 0

### 1

Question

Stepwise fit wont run through loop, can't find a way around the problem.
You will see from my code below That I load some data, then in a for loop a adjust it according to a pre-determined lag and run ...

6 years ago | 0 answers | 0

### 0

Question

Fill blank spaces from lagged data with NaN
I have a code which lags one data set in relation to another. The lag is determined based on r^2 values previously figured out. ...

6 years ago | 1 answer | 0

### 1

Question

Add a 2D matrix to a 3D matrix in a specific location
Say I have 2 Matrices A = 10x10x10 B = 10x10 I want to ad B to A at a certain dimension e.g. (:,:,6) such that A beco...

6 years ago | 2 answers | 0

### 2

Question

Writing outputs from a 3D matrix loop
I have a 3D matrix 35,43,144 I want to run the following code such that it performs the function element by element through t...

6 years ago | 1 answer | 0

### 1

Question

Looping through a 3D matrix
I have a 3D matrix 35,43,144 I want to run the following code such that it performs the function element by element through t...

6 years ago | 1 answer | 0

### 1

Question

Adding matrices to a 3D matrix in a specific order
Say I have a 3D matrix 50x50x100 Now I want to add another matrix to make it 50x50x101, however I want the new matrix to go i...

6 years ago | 1 answer | 0

### 1

Question

How can I make elements in a matrix NAN where they don't match that of another matrix?
suppose I have a matrix A = [1,2,NaN 4,5,6] and B = [12,3,4 4,5,67] I want C = [12,3,NaN ...

6 years ago | 1 answer | 0

### 1

Question

dlmwrite with specific titles in loop
I have the following code %96 Matrices are loaded above and grouped as "A1" A1Janstack = cat (3,A11,A113,A125,A137,A14...

6 years ago | 1 answer | 0

### 1

Question

Subtracting multiple matrices from the same matrix
I have a 3D matrix (35,43,144) and a 2D matrix (35,43) I need to produce 144 new 35x43 matrices by subtracting the 2D matrix ...

6 years ago | 1 answer | 0

### 1

Question

imagesc Make all zeros white and all <zeros grey
I asked a very similar question a few hours ago and was given the answer I was looking for at the time, but I have jsut realized...

7 years ago | 1 answer | 0

### 1

Question

imagesc make all zeros white?
I have the following code. The output is a matrix and I want all of the zeros to be displayed as white. How can I do this? ...

7 years ago | 1 answer | 0

### 1

Question

Error on line 28 of a 9 line code?
I have 365 text files of data, one for each day of the year. I have this code to create 12 new text files, monthly averages. ...

7 years ago | 2 answers | 0

### 2

Question

Running a validation model using Stepwisefit
I have produced the following code. It does 1505 stepwise regression with 8 predictor variables (a regression for every pixel of...

7 years ago | 1 answer | 0

### 1

Question

Using 1s and 0s to change data to NaN
Suppose I have 2 arrays A = [1,2,3,4,5,6,7,8] B = [0,1,1,0,1,0,0,1] I only want to keep the numbers that match 1s in ...

7 years ago | 1 answer | 0

### 1

Question

index out of bounds because... can't solve error
I am performing a stepwise regression and looping through data, this performs 6 stepwise regressions. I then try to output some...

7 years ago | 1 answer | 0

### 1

Question

How can I read all text files in a folder without making a struct?
Using the function x = dir ('*.txt') gives a struct (1x127) I want to read my 127 text files (matrices) in individually, not ...

7 years ago | 1 answer | 0

### 1

Question

Splitting a Matrix and saving results
I have a matrix (35x5461). I need to split it into 127 matrices of (35x43) Then each matrix needs to be saved as an ascii wit...

7 years ago | 1 answer | 0

### 1

Question

Too many output arguments error in my code
I have the following code, I am trying to get all of the wavelet approximations out (it works fine with details, but not approxi...

7 years ago | 1 answer | 0