回答済み
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...

9年以上 前 | 1

| 採用済み

回答済み
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 ...

9年以上 前 | 0

回答済み
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...

9年以上 前 | 0

| 採用済み

回答済み
Hi, For example If I give input as a= [-2,6,9,-1,11]; , I'm getting a correct output of ans = -3 7 10 0 12, but sometimes for other input vectors, for example a=[-2,7,11,-1,1.4]; I'm getting ans = 2 and many times output are not correct
You're missing the subscript on the case elseif rounding(i) >= 1 && rounding(i) <3 gradesRounded = Exam_Grades(3);...

9年以上 前 | 1

| 採用済み

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

9年以上 前 | 1

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

| 採用済み

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

10年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

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

10年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

さらに読み込む