Answered
Counter Values Are Not Changing, MATLAB
Probably because size(res_t,1) is either empty or 0 so the loop never executes. You say "when compiled"; is that a e...

12 years ago | 0

| accepted

Answered
Hi I am getting error of unexpected matlab operator in line5 and let me know how to solve it??
... for k+1=1:Nh for m+1=1:Nx ... are illegal syntax. If you mean for _k_ and _m_ to start from 2, then w...

12 years ago | 2

Answered
How do I determine the number of headerlines in a text document?
TMW has already done it for you... doc importdata

12 years ago | 2

Answered
How to group the corresponding elements of an array?
Well, I don't have the *table* object here so can't; but without it the outline of what I'd do is sotoo... %Parameters Dr...

12 years ago | 2

Answered
Plotting for particular values of x-coordinate
You basically answered the question in the question... xi = [-0.02:0.01:0.02]; Now you'll have to ensure that the value...

12 years ago | 1

Answered
read from multiple text file and store in a 3D array
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> I _strongly_ recommend the *dir* s...

12 years ago | 1

Answered
How can i define MinSize, i am getting an error?
... I= dir([image_path,'*.jpg']); [h w]=MinSize(I); ... Of course you got the error-- _I_ is the directory structure r...

12 years ago | 1

| accepted

Answered
How do i get the Full Width Half Maximum (FWHM) from a matrix with 2 collumns and n-rows?
wHM=fwhm(PaData(:,1),PaData(:,2));

12 years ago | 0

Answered
Ouputting data from a function to an array
_... the xyz coordinates (in a particular range) from the resulting surface fit_ You had to have the coordinates to do the fi...

12 years ago | 0

Answered
Columns with at least one zero element
idx=~all(M);

12 years ago | 0

Answered
Taking the mean of a 3D matrix
Couple of ways...if have Stat Toolbox, use *nanmean* x=X; % just to not destroy original x(x<150)=nan; ...

12 years ago | 0

Answered
Datestr problem with Hour
_What am I doing wrong?_ for ii = 1:7 datestr(dateVal, 'mm/dd/yyyy HH:MM:SS') dateVal = dateVal + 1/24; ......

12 years ago | 3

Answered
How can i pass 'MinSize' and 'MaxSize' name-value pairs into the object's constructor?
I've no clue on what *vision.CascadeObjectDetector* is, but faceDetector = vision.CascadeObjectDetector( h=20,w=20, ... ...

12 years ago | 3

| accepted

Answered
Data fitting and slop
That's what is known as "piecewise" or "broken-stick" regression model. To incorporate the breakpoint into the model is often c...

12 years ago | 2

| accepted

Answered
Reading a file and deleting lines of data that were written incorrectly
Sequential files are, well, "sequential". There is no way to open a sequential file at given record and Matlab doesn't implem...

12 years ago | 3

| accepted

Answered
How to count wind direction by year
Assuming you have (or can create) an array that has column containing year and another for direction (I'll use _w_ for the wind ...

12 years ago | 1

| accepted

Answered
interp2 problem: input grid is not a valid meshgrid
As noted in the comment, your data set doesn't meet the requirements of *interp2* of a uniform mesh in both directions. Use *T...

12 years ago | 3

Answered
y-axis only absolute values
Sure, plot(x,abs(y)) I'm guessing that's not what you mean, precisely, however. If you mean instead to simply display ...

12 years ago | 4

Answered
Could anyone explain me what a line like this works?
If I interpret the question correctly I suspect the problem is you're confusing the name used as dummy arguments and in a functi...

12 years ago | 0

| accepted

Answered
Subset of time series of fixed length?
_...the average values of the indices between 87 to 91 (fixed length 5) is less than 0.5..._ I'll presume you mean the averag...

12 years ago | 1

Answered
Show row and column number by the side of each point in scatterplot
With that many points don't think you'll have anything close to enough room to show 'em all, but it's a pretty trivial exercise-...

12 years ago | 2

Answered
Multi Subplot for loop
How about *plotyy* instead? But, since suplots are numbered from L to R by row, they're 1 2 3 4 5 6 in your w...

12 years ago | 1

Answered
the goto fortran90 command convert to matlab
_...essentially the "go to" does what it says._ Precisely. It is a Matlab *break* with a target location that changes execut...

12 years ago | 1

Answered
Help on loop to read images from a folder
See the FAQ... <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> I recommend the *dir* solution ...

12 years ago | 1

| accepted

Answered
Remove elements appearing sequentially in a larger text.
OK, try this...this is a "deadahead" looping solution to build the vector from the information provided --it can be made to look...

12 years ago | 2

Answered
compute event rate and plot histogram
W/o a lot more effort, you'll lose some precision w/ Matlab *datenum* but for human consumption it may be sufficient. >> tu...

12 years ago | 1

Answered
the goto fortran90 command convert to matlab
The other Fortran solution is better refactoring than what I had posted earlier (with the correction of the oversight of missing...

12 years ago | 2

| accepted

Answered
How do I obtain size data from multi loaded text files?
Well, I misspoke on *eval*; to use the command-line form the filename can't be in a variable so that's the only way to do it. ...

12 years ago | 1

| accepted

Answered
Remove elements appearing sequentially in a larger text.
_...Point is that I want to remove i.e every third and seventh row in these datasets..._ If the data are regular in line loca...

12 years ago | 2

| accepted

Answered
How do I obtain size data from multi loaded text files?
files = dir('*.txt'); for i=1:length(files) eval(['load ' files(i).name ' -ascii']); No need for *eval* here, just wr...

12 years ago | 1

Load more