Answered
How do I take the average SST over a specific region and date.
lat=ncread('sst.mnmean.nc','lat'); %for reading the lat variable from .nc file lon=ncread('sst.mnmean.nc','lon'); sst=nc...

8 years ago | 2

Answered
how to interpolate between 2 samples??
I am unable to understand your question completely. But I can guide you at some extent. Hope this helps you. For 1D interpola...

8 years ago | 1

Question


Store the variable names from the data cell.
I have stored 4 matrices in A. A={name1,name2,name3,name4}; _name1_ has dimension 250*120. Same as _name2, name3 and nam...

8 years ago | 1 answer | 1

1

answer

Question


Error in creating the common colorbar for all suboplots
I am have plotted 4 subplots and want to put a common colorbar for all subplots. A has the maximum input of 5. B has maximum of...

8 years ago | 1 answer | 1

1

answer

Question


Error in storing the output of sprintf in a cell array
Why I am getting error Cell contents assignment to a non-cell array object. while storing _printf_ output in a cell arr...

8 years ago | 1 answer | 1

1

answer

Question


How can I change cell array into strings
A ["an"] ["bn"] ["cn"] ["sb"] How can I convert A into like this 'an' 'bn' 'cn' 'dn'

8 years ago | 1 answer | 1

1

answer

Question


reading the same variable in nc file with different variables name
I have 20 .nc files and want to read 'latitude' from each files. I have used dir('*.nc') to read all .nc files but the proble...

8 years ago | 1 answer | 1

1

answer

Question


finding a row in matrix
a=[1 2 3;5 8 9 ;5 6 4;1 2 5] I want to check whether a contains [5 6 4] in any row or not. How can I do this?

8 years ago | 1 answer | 1

1

answer

Question


editing in string array
a={'10','7','5','9','11','12','12','4'} I want to put 0 at the starting of all those whose length is 1. How can I do this e...

8 years ago | 1 answer | 1

1

answer

Question


how can I convert matrix to cell
A=[1 2 3;4 5 6;7 8 9] A = 1 2 3 4 5 6 7 8 9 How can I convert the ...

8 years ago | 1 answer | 2

1

answer

Question


Conversion of numeric cell to matrix
A={'0','1','2','3','4','5'} Can I convert this A into matrix form, because all are in numeric form.

8 years ago | 1 answer | 1

1

answer

Answered
how can i find the mean of two datasets
Firstly, you should to provide at least dimension of your latitude and elevation. For instance, Suppose the size of latitude is...

8 years ago | 2

Answered
Write the output to a text file
fileID=fopen('my_text.txt','w'); fprintf(fileID,'%6.0f\n',y'); fclose(fileID) On the second line, based on the ...

8 years ago | 1

Answered
Sum only consecutive positive numbers...
A = [1 2 -3 4 -5 6 7 -8 9 10 11 12]; A(A<=0)=nan; nansum(A)

8 years ago | 1

Answered
Error message "Index exceeds matrix dimension"
You have defined only one value of Y1, Y2, Y3 and t. Y1(nmin)=0; Y2(nmin)=1; Y3(nmin)=1; t(nmin)=0; t = ((nmin:...

8 years ago | 1

Question


Deleting a unit dimension of a matrix
My matrix size is 1*250*500; How can I change this matrix into 250*500.

8 years ago | 1 answer | 2

1

answer

Answered
Correlation between two matrices with different number of rows and columns
Try interpolating it in between point to make them into the same dimension. 119*177 size represent the ice drift and matrix B o...

8 years ago | 1

Answered
Problem defining anonymous functions with multiple inputs
You have not defined 'n' and 'x' variable in the list of inputs in the function. Try using this function [ a ] = my_fun...

8 years ago | 1

Question


Removing a blank string from a cell array
I want to read all words except ','. So I have used strsplit to split by ','. There are 3 words, but after splitting, it should ...

8 years ago | 1 answer | 1

1

answer

Question


Create a cell array of mixed dimension
a={'A','B','C';'D','E','F'}; b={'1';'2'}; How can I create a cell array of 2X4 which looks like '1' 'A' 'B'...

8 years ago | 1 answer | 0

1

answer

Question


Error using text command in normalized form
I wanted to write something on the MATLAB plot by using text command. I am getting an error while using the axis in the normaliz...

8 years ago | 1 answer | 0

1

answer

Question


Legends as pointers in matlab plot
I have plotted a India map and over that, I have used geoshow to show few stations. I have assigned all the plane stations by bl...

8 years ago | 1 answer | 0

1

answer

Question


Problem with rotation of the rectangle
I want to rotate the rectangle, which I have created using annotation, by 35 degree. How can I do this. [x,y]=borders('...

8 years ago | 1 answer | 0

1

answer

Question


plot India map at the background
I have plotted wind direction with the help of quiver command. How do put India boundaries at the background. I have tried wi...

8 years ago | 1 answer | 1

1

answer

Question


how should I copy the selected files to another folder whose name contains 'mytext'
I have length(F) files are there in a folder. This program gives the 'fname' which contains all the selected files whose name co...

8 years ago | 1 answer | 1

1

answer

Question


Spatial Correlation between two variables
How can I find the spatial correlation between two variables. For example: I have Latitude (having length 175) and longitude (...

8 years ago | 2 answers | 1

2

answers

Answered
How do I find the indices of the maximum (or minimum) value of my matrix?
Use this as a function and type [x,y]=minmat(A) to get the location of the minimum of matrix. for example: >> A=magic(5) ...

8 years ago | 3

Question


Running a matlab script from bash script
I have made a MATLAB program which takes the input file from a directory and gives the output with a plot. can i execute this ...

8 years ago | 1 answer | 0

1

answer

Question


How to write a grads executable file?
Here is my MATLAB code for saving a variable in .grd format, so that i can able to plot in grads with the help of control file. ...

8 years ago | 1 answer | 0

1

answer

Question


How to change the output file name with the same input file name but with a different extension ?
In line 1, I have read all files with .nc extension. And in the last fourth line, I want to save the output file with the same n...

8 years ago | 2 answers | 0

2

answers

Load more