Answered
Setting time on X-axis for over 24 hours
Time axes in Matlab are in either (traditional) *datenum* to use *datetick* or the newer time class (R2014?, maybe?). But, neit...

10 years ago | 0

Answered
Average certain rows in 3D matrix
Can you write an expression to select the desired rows? If so, simply ix=[4:6 9 11...]; % whatever is the logic to select...

10 years ago | 0

Answered
polynomials with increasing order
doc polyval *NB:* For higher orders numerics for polynomials get bad quickly. You can help somewhat by using the standard...

10 years ago | 0

Answered
How to change the direction of axis name?
xlabel('X-Direction','rotation',20) ylabel('Y-Direction','rotation',-20)

10 years ago | 1

| accepted

Answered
Remove the lines in-between two different error bar
N=length(mn); % size of vectors for augmented row errorbar(reshape([reshape(mn,2,[]);nan(1,N)],1,[]), ... resh...

10 years ago | 0

Answered
How Find last row in excel
Not determinable unless ActiveX/COM interaction is an Excel method. In "just Matlab" best you could do would be data=xlsrea...

10 years ago | 1

Answered
Subplotting error with velocity vs time graph
vel=dkm./thour; Need the dot operator here...

10 years ago | 0

| accepted

Answered
How to shift a matrix by a specified number of points
'Pends on what you want to happen w/ the rest of the data...it's trivial enough to simply augment a vector with zeros on either ...

10 years ago | 0

Answered
How to combine multiple csv into 1 csv file?
TMW hasn't implemented much in the way of the OS inside Matlab; use the OS instead... rootdir='C:\Users\Kenny\Desktop\skrip...

10 years ago | 0

Answered
Problem with plot array of signals(by row) and x axis
Problem is trying to put negative linearly-spaced values on a log axis; they don't fit all that well... The x-axis is the ord...

10 years ago | 0

Answered
How do I loop over .csv files with dates as the file name?
I suggest using matching *dir* pattern instead of building the specific file name (although that's easily-enough done by using t...

10 years ago | 0

Answered
How to fix this boxplot.. My data has so many values which are zero, i want to get rid of them in my analysis!
OK, on reflection I believe my previous comment actually is an Answer -- so deleted it and moved it with some refinements here. ...

10 years ago | 0

Answered
Importing data without knowing number of columns
There is _IF_ (the proverbial "big if") the data are all numeric; then *textscan* with an empty format field will automagically ...

10 years ago | 1

Answered
How to change the mean value in the box plot?
Building off of Cyclist's demo and the comments I made earlier-- x = randn(1000,3); boxplot(x) h = findobj(gca,'Tag',...

10 years ago | 0

Answered
how can I search an excel document and extract only the data I need
With Matlab itself, you can't. Read the file and do the selection from the data in memory; it'll bound to be much faster than i...

10 years ago | 0

Answered
How to write a function for a nxm matrix
_"divide rows by the sum of the column for any size matrix."_ x=bsxfun(@rdivide,x,sum(x)); *bsxfun* takes care of the si...

10 years ago | 0

| accepted

Answered
How can i add all column values in a pattern and save simultaneously?
Px=fliplr(cumsum(fliplr(C))); PS. In future, don't whine, it isn't becoming... :) *PPS* You can avoid one function c...

10 years ago | 0

| accepted

Answered
how can I multiply a vector by scalar?
You get the error because C isn't a vector but a cell _containing_ a vector. You can work around it by C=C{:}*2.7; % r...

10 years ago | 0

Answered
How to combine multiple arrays ?
C=reshape([a b c].',[],1);

10 years ago | 1

| accepted

Answered
How to plot this in matlab?
ix=gAll>yLim; % yLim would be -22 for the above wished-for case... x=[1:length(gAll)]; % x vector to plot to satisf...

10 years ago | 0

Answered
Importing same file name from multiple folders and find out maximum and minimum of each file?
Here's a location where the OS has better tools than have been carried over into Matlab. I'd do something like [~,d]=syste...

10 years ago | 0

Answered
Axis for Plotyy for Multiple plots
[hAx,hL1,hL2] = plotyy(x1,y1,x1,y2); set(hAx,'NextPlot','add') plot(hAx(1),x1,y3,'-r','LineWidth',1.5) plot(hAx(2),x1...

10 years ago | 0

| accepted

Answered
Removing rows based on numerical value
Presuming _"...only want to keep the rows that have zeros in the decimal places"_ means the integer-valued locations, then lose ...

10 years ago | 0

Answered
How do I get the calculation of results column Max, Max row and max?
The major work is done by the <http://www.mathworks.com/help/images/ref/radon.html <radon>> function from the Image Processing T...

10 years ago | 0

Answered
Changing Matrix value at odd position of row with reference to a certain column
ix=ismember(M,[1 0 0 0 0],'rows'); M(ix,:)=zeros(sum(ix),5); To generalize store the target and result vectors in arrays...

10 years ago | 0

Answered
How to read the data from a header file into single variables
Should get ya' started... >> c=textread('ma.txt','%s','delimiter','\n','whitespace',''); >> ix=~cellfun(@isempty,(strfin...

10 years ago | 2

| accepted

Answered
Text file for loop help
Glxc = textscan(fidi, '%s', 'Delimiter','|'); Why are you reading the numeric data as strings? Read it as numeric and the...

10 years ago | 0

Answered
Number of samples - how to calculate it?
8000 Hz --> 8000 samples/sec * 0.5 sec --> 4000 samples

10 years ago | 0

| accepted

Answered
empty matrix when using textscan
*textscan* uses *fopen/fclose* to open/close the file and the subsequent file handle, _*NOT*_ the actual file name. By using th...

10 years ago | 0

| accepted

Answered
Problems with regstats: more predictor variables than observations
In out(k,:)=regstats(RetAssets(k,i),RetMarket(k,:),'linear',{'beta','r','rsquare'}); RetAssets(k,i) is always only a sin...

10 years ago | 0

Load more