Respondida
How to plot from table
Going to a lot of trouble that doesn't seem needed in writing stuff out to files instead of just using the in-memory data direct...

más de 9 años hace | 0

| aceptada

Respondida
How to save the data when we are using dir('*.hdf')
While not your specific problem (at least yet), using the magic number of 365 for the loop isn't good practice; use for i=1...

más de 9 años hace | 2

| aceptada

Respondida
What are the row and column subscripts needed to access the 167th element of the fourth cell
All depends on what the array dimensions are; you don't need them anyway if you wish the Nth element, just use one-dimensional s...

más de 9 años hace | 0

Respondida
How can I read a text file as fixed width columns?
cw=[1 2 6 1 1 2 2 2 2 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5]; fmt=sprintf('%%%dd',cw); % file open preamble code here for open...

más de 9 años hace | 0

| aceptada

Respondida
Retrieve data from textfile
fmt=['{"metadata":{"date":"' '{%{M/d/yyyy hh:mm:ss a}D' '","TotalShrooms":{"AbsoluteTime": %f %*[^\n]']; % file open prea...

más de 9 años hace | 0

Respondida
Plot 3 lines using plotyy
[hAx hL1 hL2]=plotyy(x,[y(:) y2(:)],x,y1); *NB:* The colon on the _y_ is to ensure are column vectors for the concatenatio...

más de 9 años hace | 1

| aceptada

Respondida
Averaging points within data set
I can't read the image to tell what the data file name is, but given the data are just a linear sequence so don't have to do any...

más de 9 años hace | 1

Respondida
Function or Process For Time Series Correction
Many ways to do this depending...if have the Signal Processing TB, there's |resample| in it using a polyphase filter or there's ...

más de 9 años hace | 1

Respondida
Identifying Missing data years in and retaining years with maximum value
As noted in the comment, I wondered about <http://www.mathworks.com/help/robotics/ref/timeseries.html <timeseries>> ability to h...

más de 9 años hace | 0

| aceptada

Respondida
Calling max value of variable from another function
The _y_ in the function |example| has nothing to do with the _y_ from the |load y| command so the question is unclear as to why ...

más de 9 años hace | 0

| aceptada

Respondida
Projecting quarterly dates using datetime variables
OH! Wait! That comment re: Peter reminds me of a trick he did show earlier that may fixup the problem-- |dateshift|. Let's see...

más de 9 años hace | 0

| aceptada

Respondida
Values of selected array indices
V=A(sub2ind(size(A),ix(:,1),ix(:,2))); NB: I turned _i_ into _ix_. I also use _i_ in loop indices despite aliasing builti...

más de 9 años hace | 1

| aceptada

Respondida
how can i skiping a line in fscanf
*ADDENDUM* Update to reflect result of long subsequent conversation...dpb % file opening preamble here... data=[]; w...

más de 9 años hace | 2

| aceptada

Respondida
subplot log-scale set range
You can still use non-decade values for |ylim| even on log axes, by default the logic for data that spans a couple of decades wi...

más de 9 años hace | 0

Respondida
How to compute Spearman's rank correlation excluding specific values?
ix=(A>0) & (B>0); A=A(ix); B=B(ix); Do whatever with _A_, _B_; they will be returned as column vectors by the logical...

más de 9 años hace | 0

Respondida
How to delete row in matrix or cell in a for loop?
No, it is _not_ clear, sorry. Firstly, why are you converting perfectly good vectors to cell arrays? Second, use the Matla...

más de 9 años hace | 0

Respondida
How can I solve a problem with the wrong format of date
If you're going to use numeric variable to store the dates, then use them that way -- >> d=[200102 200103 200104 201303]; ...

más de 9 años hace | 0

| aceptada

Respondida
combine two double cells into 1
That's a little towards the advanced-beginner side... :) >> C=cellfun(@(c1,c2) unique([c1 c2]),C1,C2,'uniform',0); >> C{...

más de 9 años hace | 2

Respondida
How to assign a column of CATEGORICAL array to TABLE
Note what the error says -- can't augment a table by colon addressing except by another table or cell array. So, make a table a...

más de 9 años hace | 1

| aceptada

Respondida
getting rid of for loop in a function with long arrays
OK, once have some data to work with it's not too bad at all...it is virtually always really, really helpful to be able to have ...

más de 9 años hace | 3

| aceptada

Respondida
How do I fix this code to copy text from a number of text files to a bunch of other text files?
for i = 1:length(files) disp(fid1) fidI = fopen(files(i).name,'r'); file_name = [sprintf('%1.0f',i) '.txt']; %...

más de 9 años hace | 0

| aceptada

Respondida
How to separate daily historical data into groups based on month and day not year?
mde=grpstats(tbl.elev,day(tbl.date),@mode); where |tbl| is your table with fields |.date| and |.elev|. |date| is a |dat...

más de 9 años hace | 0

| aceptada

Respondida
search multiple results for multiple conditions
doc pdist

más de 9 años hace | 0

Respondida
How to use an index of a vector as a value in another matrix?
>> x=[1 1 2 2 3] ; >> m= [1 3 ; 1 4 ; 2 3 ; 2 4]; >> m(any(ismember(m,find(diff(x))),2),:)=[] m = 1 3 >>

más de 9 años hace | 2

Respondida
Adding top x-axis using yyaxis for grouped bar graphs
Set |xlim| and |xtick| values the same on the upper axis as the bottom. This can be done automagically by using |linkaxes| I...

más de 9 años hace | 0

Respondida
Plotting specified date intervals
What I'm suggesting... dn=datetime(['25-July-2017 9:00 AM'; '25-July-2017 12:30 PM']); % start/stop times day 1 dn=[dn...

más de 9 años hace | 1

| aceptada

Respondida
Renaming multilple .txt files
OK. To respond to the question raised... Well, that's the hard way...use d=dir('Z_X12_ABC*.txt'); % return all files ma...

más de 9 años hace | 0

| aceptada

Respondida
Cumtrapz with cell arrays in a double loop
Well, I've no idea what you're really trying to do, either, but setting a breakpoint at the line containing |cumtrapz| we find t...

más de 9 años hace | 0

Respondida
each iteration but same result
for i = 1:1:N beta = angle_disp(i)*pi/180; A = [... 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 -Py Px 0...

más de 9 años hace | 0

| aceptada

Respondida
Vibration Analysis by using Fast Fourier Transform
>> help fft fft Discrete Fourier transform. fft(X) is the discrete Fourier transform (DFT) of vector X. For matri...

más de 9 años hace | 0

| aceptada

Cargar más