回答済み
Second y axis for the same dataset
OK as follow-up to my above comment -- try the following with some of your real data and let us know how it succeeds...w/o a rea...

10年以上 前 | 0

回答済み
Second y axis for the same dataset
Alternative to display overlapping data succinctly... for i=1:2, hAx(i)=subplot(1,2,i); end % create base left/right...

10年以上 前 | 0

回答済み
TXT Data Extraction Help
OK, had a little time to explore the data enough to figure out what appears to be going on...a simplistic way since there turns ...

10年以上 前 | 0

| 採用済み

回答済み
pause a running executable and continue other calculations in Matlab
You'll have to implement some sort of nonblocking semaphore into the Fortran code to allow it to release the CPU and then have a...

10年以上 前 | 0

| 採用済み

回答済み
Link data with datenum
Alternatively to Per's solution via interpolation, if you want to aggregate data as you've mentioned and average over the time p...

10年以上 前 | 0

回答済み
How to set the position of x/y-ticklabel closer/further away from the axis
Not by anything other than writing your own labels where you want them via *text*, no. You could change appearance somewhat wit...

10年以上 前 | 0

| 採用済み

回答済み
How to assign A or B or C to a Variable?
You do _*NOT*_ want to do this...for why and alternatives, see the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variab...

10年以上 前 | 1

回答済み
Is it possible to label (the last) minor tick?
Just an editorial aside -- they're 'major', not 'mayor' ticks... But, the answer to the question is "no can do" -- there's no...

10年以上 前 | 0

| 採用済み

回答済み
ABOT THE DIFFRENCE BTWN 64BIT MATLAB AND 32 BIT MATLAB
Default numeric variables in Matlab are _*double*_ precision in all versions; only addressing range is expanded with indexing by...

10年以上 前 | 2

回答済み
extracting positive numbers?
x=x(x>0); Look for "logical addressing" in documentation...

10年以上 前 | 0

| 採用済み

回答済み
Fill blank spaces from lagged data with NaN
Instead of selecting the first N points, GRACEcrop = Approx1z(1:(96-m),j); just set the last _m_ to NaN... Approx1...

10年以上 前 | 0

| 採用済み

回答済み
How to vectorize for loops?
To simplify, I presume copy the plane slice to a 2D array to eliminate the _k_ index from the expressions. The following duplic...

10年以上 前 | 1

| 採用済み

回答済み
Selecting specific data from raw data based on conditions
Using _"logical addressing"_ is generally an efficient technique. I use a helper function I call *iswithin* to remove the compl...

10年以上 前 | 1

| 採用済み

回答済み
Are these expressions equivalent? (seeing greater errors in vectorized expression)
Well, it isn't so easy to see; but the two expressions are _not_ the same thing...I was wrong in my conjecture earlier in not ha...

10年以上 前 | 0

| 採用済み

回答済み
ksdensity doesn't return a pdf which sums to 1 and has problems at the boundary
Not necessarily, no. It'll depend on the range of the underlying estimated pdf covered in the input range of the data as well a...

10年以上 前 | 0

回答済み
In a function with multiple outputs, if one output is empty does that output still need to be calculated within the function?
[a,b] = functionname(c) List of steps to calculate a if nargout > 1 List of steps to calculate b end ...

10年以上 前 | 1

| 採用済み

回答済み
Extracting number with exponential from cell array
Use the appropriate format string in *textscan* to read as numeric instead of character. You don't show the file format but mat...

10年以上 前 | 0

回答済み
how to convert a matrix to a cell?
c=mat2cell(m,ones(1,size(m,1)),2*ones(1,size(m,2)/2)); doc mat2cell % for details...

10年以上 前 | 0

| 採用済み

回答済み
How can i draw the probability distribution function of a vector that I already calculated ?
doc ecdf % Statistics toolbox'en

10年以上 前 | 0

回答済み
confused regarding scaling of axis for an array?
doc interp1

10年以上 前 | 0

回答済み
How do I make the user input values into a matrix?
doc input >> x=input('Enter an array of values in []: ') Enter an array of values in []: [1 2 3 -8 2:pi:12] x = 1....

10年以上 前 | 0

| 採用済み

回答済み
problem in using textscan to import data from csv
Filling a field with asterisks is Fortran convention if output magnitude exceeds available width for a field; possibly can you r...

10年以上 前 | 0

回答済み
Time converted to a str
Again, pasting a (partial even) row of text with the actual field of interest would relieve confusion regarding the form, but pr...

10年以上 前 | 0

| 採用済み

回答済み
How to use unique function to get data only when the number in one row increases
>> [a [true;diff(a)>0]] ans = 1 1 1 0 1 0 2 1 3 1 4 1 5 ...

10年以上 前 | 0

| 採用済み

回答済み
I have a monthly time series data in matrix form with 4 columns. I want to sum up always the 3 row elements of the columns. 1-3,3-6,6-9,... ,to get quaterly data. How can I do this in matlab ?
I are complete years, then reshape(sum(reshape(x,3,[])),numel(x)/(3*size(x,2)),[]) If lacking complete year, operate on ...

10年以上 前 | 0

| 採用済み

回答済み
Search for a part of a string in cell of cell array
It's a cellstr array, and yes, it can be confusing how to address them. The _content_ of the cell is a character string referen...

10年以上 前 | 1

回答済み
How to count sequential NaN values
Presuming I get your intent, >> sum(diff([zeros(1,3);isnan(x)])==1) ans = 1 2 1 >> *ADDENDUM* Locat...

10年以上 前 | 0

回答済み
How can I evaluate a function that is a function of other functions but all relate to the same parameter such as x
Just write it like any other Matlab expression... f1=@(x) C1*x.^2; f2=@(x) C2*f1(x); f3=@(x) C3*f1(x).*f2(x); This...

11年弱 前 | 0

回答済み
MATLAB Graphs (Arbitrary X-Axis)
Oh, ok, I did misread the question, sorry... hAx2=axes('Position',get(gca,'Position'),'XAxisLocation','top'); xlim(hAx2,...

11年弱 前 | 1

| 採用済み

回答済み
How to change the legend colored linewidth, not the width of box outline
Save the optional _object_h_ handle for the line and text objects in the legend axes and set their properties. You'll have to q...

11年弱 前 | 3

さらに読み込む