Responded

Re: mean value in a specific region of a 4-d matrix

Anyone knows how to do this? I'd like to know how to get a spatial average in a specific region in each timestep.

3 years ago | 1672 views

Posted

mean value in a specific region of a 4-d matrix

I have a 4-d matrix (time, one_variable, Y_location, X_location) in matlab. Here is the 4-d matrix looks like: ans = 100 1...

3 years ago | 1672 views

Posted

calculate fractions from subcategory values and total values in a lat,lon matrix (netcdf file)

Hi - May I ask a question? I like to calculate the fraction from subcategory values and total subcategory values in a lat,lon ...

3 years ago | 1227 views

Posted

imagesc works, but not in using surf and mesh

Dear all, I tried this whole day, but I cannot get it works in using functions, surf and mesh. Actually, I do plot a correct f...

3 years ago | 1105 views

Question

how to read a time series data at a particular (x, y) grid cell in a netcdf file

Dear all, The netcdf file was composited a dimension of x = 570 and y = 480. How to extract a time series data at a partic...

3 years ago | 1 Answers | 0

Responded

Re: a cubic fitting curve in a set of (x, y, z) data ?

Hi Torsten, Yes. the 3d dataset looks like a narrow galaxy band (scatters) across the xyz plot. I'd like to just add a cubic fi...

3 years ago | 2235 views

Posted

a cubic fitting curve in a set of (x, y, z) data ?

Dear all, I have a set of scatter data (x, y, z). How to add a cubic fitting curve in this 3d plot? Thanks for the hint. Mic...

3 years ago | 2235 views

Posted

show some particular legend in a plot?

Dear all, I have a plot and like to show some particular legend in a plot. Could you please give me some help? Here is the sam...

4 years ago | 5601 views

Posted

a curve fit to find the values ?

Hi all, I have a dataset like below and how to find the values for each year based on a curve fit? %Year Conc. 1970 ...

4 years ago | 1410 views

Posted

how to add linear regression line and equation in the figure?

Hi all, I search a bit, but can't find an easy Matlab function for this. I like to add a linear regression line to my 1:1 scat...

4 years ago | 11004 views

Posted

file path string for load

Dear all, ing many files in with in the same folder? for example: a = load ('/data1/HD1/path/subpath/data/subdata/aaa.txt') ...

4 years ago | 31389 views

Posted

sum for two time series dataset???

Dear all, I like to sum up the observations of two time series datasets when both of them have observations based on YEAR and D...

4 years ago | 3431 views

Responded

Re: how to plot hourly and daily dataset together in the same datenum

hourly = (1:24*30)' daily = rand(1,30)' I like to plot them together and the date tick shows 2001/01/01 to 2001/01/30. Thanks, ...

4 years ago | 2313 views

Posted

how to plot hourly and daily dataset together in the same datenum figure

Hi all, I have two datasets at a hourly and daily time-step. I like to show them in the same figure. I have truble to get the...

4 years ago | 2313 views

Posted

how to calculate the increases in a accumulated dataset?

Hi all, Are there any easy way to calculate the difference between x(n+1) and x(n)? For example, I have a rainfall accumulatio...

4 years ago | 694 views

Posted

how to add date (year and Month) on x-axis for a series dataset?

Hi all, I have a dataset at a daily time step from 2000 to 2010. It does't come with timestamp, however the dataset was printed...

4 years ago | 3128 views

Posted

how to calculate NetCDF 4-D variable fraction over 3-D variable?

Hi all - I have two NetCDF dataset - one is 4-D (time, specific, lat, lon); another one is 3-D (time, lat, lon). If I like to ...

4 years ago | 1520 views

Posted

how to rescale x axis label using a simple linear equation ?

Hi - I have a lon_grid series for x axis label, however I want to rescale it based on a linear equation, lon = 120 - (lon_grid ...

4 years ago | 1619 views

Posted

how to move lines upward, which are currently covered by a surf?

Hi - I like to draw province boarder lines on the top of a mesh figure. However, the lines are hidden behind the mesh figure. ...

5 years ago | 1516 views

Posted

how to add additional political boundaries?

Dear all, Lately, I start to plot several netcdf format figures. I have two questions: (1) how to add canadian political bounda...

5 years ago | 1483 views

Posted

How to load csv file with ignoring the first 3 rows

Dear all, I have a csv file and I like to load it starting from the fourth row (i.e., ignore the first 3 rows). How can I do i...

5 years ago | 1390 views

Posted

insert a value in the begging of matrixes

Hi, ? They have different dimension. Here is the example: a = [3 3 3; 4 4 4; 5 5 5]; b = 1 the result should be: Thanks.

5 years ago | 647 views

Responded

Re: eval save text files without putting extension filename

Yes. Thanks for your reply. That helps. Could you please explain more about how to generate filename automatically using eval?!...

5 years ago | 2766 views

Posted

eval save text files without putting extension filename

Hi all, Here is my statement: for ii = year_1st:year_end end However, the output file names are always with "-ascii.mat." C...

5 years ago | 2766 views

Posted

how to modify the data precision?

Dear all, I have a large dataset with 7 columns as below showed. How to modify them to a desired data precision as below showe...

5 years ago | 1824 views

Responded

Re: error message on c(n) = cat(1,a(n,:),b(n,:))

Hi Steve, How to insert a column into c matrix? For example: ADD = [101 102 103; 104 105 106] c_new = [1 101 2 102 3 103;10 10...

5 years ago | 2126 views

Posted

how to insert columns on the fly?

Hi all, a = [1 2 3; 4 5 6; 7 8 9] b = [10 11 12; 13 14 15; 16 17 18] c = [99 98 97; 96 95 94; 93 92 91] Can I make the matrix ...

5 years ago | 565 views

Responded

Re: error message on c(n) = cat(1,a(n,:),b(n,:))

Hi Steve, I want the c looks like this: At n = 1, c = [1 2 3;10 11 12] ---> save to 1.txt At n = 2, c = [4 5 6;13 14 15] ---> s...

5 years ago | 2126 views

Responded

Re: error message on c(n) = cat(1,a(n,:),b(n,:))

Hi Steve, How to deal with this case? Thanks. a = [1 2 3;4 5 6;7 8 9]; b = [10 11 12;13 14 15;16 17 18]; for n = 1:3 c(n,:) = [a...

5 years ago | 2126 views

Responded

Re: How to append a new row of data to the current matrix?

Hi, Thanks for your guidance. That helps. I am wondering if you can guide me more in this situation. a = [1 2 3;4 5 6;7 8 9]; ...

5 years ago | 25126 views