Answered
How do I calculate seasonal means from monthly data?
I answered this for another poster some time back here: <http://www.mathworks.com/matlabcentral/answers/241277-mean-for-particu...

10 years ago | 1

| accepted

Answered
Any command in matlab equivilent to vech() in gauss
It's simply row-major vis a vis column-major Matlab storage order -- >> triu(x') ans = 11 21 31 0 22 ...

10 years ago | 0

Answered
How to find a file which was uploaded in 2008?
That doesn't say the file was uploaded in '08, only the paper was published then. Nor does it say who the author of the functio...

10 years ago | 0

| accepted

Answered
Saving data in a loop as a vector
Indeed, Matlab arrays are immutably 1-based...just compute an index... N=12; % generalize number terms... ...

10 years ago | 1

| accepted

Answered
How can I use a nested for loop to find multiple minimum values in a matrix array ?
What is the end result supposed to be??? It appears in the end you could just replace GGG(:,1:3)=0; and be done??? Or is this ...

10 years ago | 0

Answered
3d matrix element extraction
[~,~,p]=size(m); % array depth for generality ix=sub2ind(size(m),repmat(a,1,p),repmat(b,1,p),repmat(1:p,1,leng...

10 years ago | 0

| accepted

Answered
Poly1 fit error "Warning: Equation is badly conditioned. Removed repeated data points or try centering and scaling."
_"if I could get the fit to work with the weights of 1/(toterr^2)..."_ Why? The reason for using weighted regression is genera...

10 years ago | 0

| accepted

Answered
Error using vertcat Dimensions of matrices being concatenated are not consistent.
labels: 100x7 trainingLabels: 200x5char Presuming the _char_ is missing from _labels_ variable, you'll note they're 7 ch...

10 years ago | 0

| accepted

Answered
Eucliedan Distances In two Arrays
Given first/second sets are _X,Y_, respectively, [D,I]=pdist2(Y,X,'euclid','smallest',1); % doc pdist2 for details

10 years ago | 1

Answered
How do I plot a line graph from two for loops?
To animate a line as compute points, see the example at <http://www.mathworks.com/help/matlab/creating_plots/line-animation-of-s...

10 years ago | 0

Answered
How do I parse this complex text file with textscan?
OK, for your file I used a grep utility first to find the EOB markers and then computed the numbers for each group...within Matl...

10 years ago | 1

Answered
Plotting two or more fints, plot is splitting up, how to stop?
Turns out it's documented behavior... _"The plot command automatically creates subplots when multiple time series are encounter...

10 years ago | 0

| accepted

Answered
Creating uitable with multiple data types
Indeed, the error message is right--"you can't do that!" of trying to concatenate cell array and non-cell array values. You'l...

10 years ago | 1

| accepted

Answered
to read data from a txt file with specific format
fmt='%2d %1d %12.6f ... fid=fopen('yourfile.txt','r'); c=textscan(fid,fmt); fid=fclose(fid); should do it with the...

10 years ago | 0

Answered
Removing row from a matrix if value in row < previous value
Jan's point is valid; if the bad data are excessively corrupted removing the offending rows may only create a new set of offendi...

10 years ago | 1

Answered
how to write increment operator in matlab to read files one after antother..help
Just translate... for i=0:19 ... _i_ will take on the values in succession automagically and can be used in the loo...

10 years ago | 0

Answered
How can I "zoom in" in figure1 and see the same zoom of the x-axis in figure2.
Use *linkaxes*; see doc for details and (I'm pretty sure) example code...

10 years ago | 1

| accepted

Answered
straight line doesn't show in plot
Second posting today with same issue...serendipity strikes again!!! :) >> whos p thinsig* Name Size ...

10 years ago | 0

| accepted

Answered
How do I save a cell array that has both text and numeric data?
>> fmt=[repmat('%5d',1,3) '%8.4f ' '%s %5d\n']; >> fprintf(fmt,c{:}) 7 0 240 0.4360 cat dog mouse 10 >>

10 years ago | 1

| accepted

Answered
First:How can i make legend to show: x1 with circle and x2 with line? 2nd: How can i draw a line between x1 points ?
Your _x1_ is only a single point (at least for the _N_ I tried; didn't check logic thoroughly) so the *plot* command with a vect...

10 years ago | 0

| accepted

Answered
how do i create a vector from user inputs? this is what i have so far but it does not work.
Several issues-- # didn't create empty variable for _order_ # don't increment _i_ before trying to use it # compare to matc...

10 years ago | 0

Answered
How to extract variable from function
dlmwrite('yourDesiredOutputFilename.dat',MatlabVariableToWrite,\t); See doc dlmwrite % for details/examples, addition...

10 years ago | 0

Answered
How to extract value property pairs?
From functions, no...they aren't objects that can be queried externally(*). Most objects such as HG (Handle Graphics) have meth...

10 years ago | 0

Answered
how to store values in matrix from for loop?
Simply subscript (preallocate to save reallocation dynamically) the desired output variables... ... ix=0; % index for c...

10 years ago | 0

| accepted

Answered
How do I plot a sine function with each point having a z variable
scatter(x,y,5,z) hold on plot(x,y,'k-') latter two lines if want the line between points; otherwise forget it... ...

10 years ago | 0

| accepted

Answered
How to plot rastrigin function in matlab
Your scaling seems to be out of whack--adding 10+length(x) is creating a _Z_ of >> [min(Z(:)) max(Z(:))] ans = 1.0e+03...

10 years ago | 0

| accepted

Answered
How to set start date in line plot?
xl=xlim; % retrieve current limits xlim([datetime(2013,03,01) xl(2)]) % set beginning x-limit...

10 years ago | 0

| accepted

Answered
How to increase speed of xlsread and xlswrite?
Unless you can arrange it such that you make all changes in Excel at one time, *xls[read|write]* are going to be slow; nothing m...

10 years ago | 1

Load more