Answered
Regarding finding peak values from vectors; how do I find only the max value and also write this in a loop with changing string variable names?
1) Is there a way to tell the find peaks function that I only want the highest peak? Sure... [pks, loc]=findpeaks(v,'npeak...

13 years ago | 0

Answered
about functions and arguments
First before getting into the problems in the code itself, you have created a new variable SUM that aliases the builtin Matlab f...

13 years ago | 0

| accepted

Answered
X and Y Axis font size
set(gca,'fontsize',8) % say...default here is 10 NB: get(gca) will return current settings/values for all properties...

13 years ago | 0

| accepted

Answered
I data has unnecessary spaces and lines
I'm not regexp whiz so I'd do sotoo.. >> type joe.dat 46 Carbon - cs C -3.4 2.7 1.6 C 1.3 4...

13 years ago | 0

| accepted

Answered
How Can I Get MATLAB To Parse Data From 2 Arrays?
First round the time columns to 2 digits -- probably easiest way to do this is to just make use of the i/o runtime... A(:,2)=...

13 years ago | 0

| accepted

Answered
How do I make this into a function?
Doesn't look like it needs any inputs. If you want outputs returned of the data structure, say, instead of just having everyt...

13 years ago | 0

| accepted

Answered
How does this error relate to strcat function (Error: Index exceeds matrix dimensions)?
Actually, otomh I don't see why that particular error message w/o the actual session to poke around in to see specifics at the t...

13 years ago | 0

Answered
plotting the outcomes of a matrix
OK, an example of b) above to demonstrate try the following... N=20; x=1:100; L=length(x); y=rand(N,L)/N; v=[0:...

13 years ago | 0

| accepted

Answered
Problem with matrix size when using importdata
What did you use to read the file? Obviously, when the record length changes in the middle, this is going to confuse any of t...

13 years ago | 0

Answered
i want to quantize the matrix values in terms of 0s and 1s...plz help me
>> a = [ 12 21 13; 32 45 67; 43 22 91 ] a = 12 21 13 32 45 67 43 22 91 >> for i=1...

13 years ago | 0

Answered
Hi, I'm trying to find a program line which will make matlab dump numbers that don't respond to an if statement.
If you want to abort the loop see doc break If you want to keep going then as Walter notes the empty ELSE clause skips e...

14 years ago | 0

Answered
xcor and rms vectorization!
Well, first of all, you don't need to copy the original data... num_windows = 1000; segment_size = length(data) / num_wimdow...

14 years ago | 0

Answered
??? Error using ==> plot Vectors must be the same lengths.
Apparently ForceHandle isn't a valid axis handle; hence plot() thinks the x,y data are the handle and the x vector. Use ishan...

14 years ago | 0

Answered
Reading data from different data files
Use dir() w/ appropriate wild card for the subset of names desired then process the resulting list... d=dir('Fx_1_*'); f...

14 years ago | 0

Answered
Translate a plot across its axes
If values are (x,y1) and (x,y2) then plot(x,y1,[x+x(end)-x(1)],[y2+y1(end)-y1(1)]) --

14 years ago | 0

Answered
Accessing global variable from function
Hmmm....I did a test first, why did it error? Oh, drat. I mistyped 'global' as 'globals' and didn't notice; just that it error...

14 years ago | 0

Answered
Accessing global variable from function
Remove the trailing ';' from the global statement--ML thinks dirs; should be a variable name but the semi-colon isn't valid char...

14 years ago | 0

Answered
Scan a text file for some data
Basically, doc textscan You can parse the file given what you know that is fixed format and what fields you wish to retrie...

14 years ago | 0