Answered
How can I loop through a csv file that holds annual precipitation data and find out how many dry events there are?
I presume you mean the first nonzero occurrences... mean(diff([0 find(r)])) % average between rainy days including first ...

13 years ago | 0

| accepted

Answered
How can I alter the speed of a wav file without altering its pitch?
Oh, tempo-changing...tough nut to crack starting blindly... <http://www.dspdimension.com/admin/time-pitch-overview/> <http...

13 years ago | 0

Answered
What is the performance difference of processing large csv files vs isf files?
Give it a try and see...no klew what an 'isf' format is, specifically. If it's an unformatted binary transfer it'll undoubtedly...

13 years ago | 0

Answered
Add a value in Matrix A from specific location in matrix B
Well, if you really don't know the spot at which to assign you're stuck. But, if that's just poorly chosen words and you mean y...

13 years ago | 0

| accepted

Answered
I want to write a function that allows me to input a certain number of guesses depending on the dimensions
function g=guess(f,N) % returns N+1 values as inputs from user g=zeros(N+1,1); for i=1:N+1 g(i)=input(['...

13 years ago | 0

| accepted

Answered
Adjusting x-axis to reflect psuedo-time using XTickLabel
OK, try this...looks like I think yours would given the aforementioned fact that the actual data range is so compacted into the ...

13 years ago | 1

| accepted

Answered
seeking help with a for loop syntax
For the loop solution you've got to fix the references to start at one. One way is sotoo-- SOC0=100; at=[5 11 11]; % arri...

13 years ago | 0

Answered
show content of a txt file in a static text.
Read the file into a character variable and display the variable. fid = fopen('file.txt', 'r'); c = fread(fid, inf, 'u...

13 years ago | 2

| accepted

Answered
How to put (tab delimited) text files together removing header text?
So, the answer is the same as originally given, then...use sotoo fmto=['%12.3f' repmat('%12.3f',1,nCols-1)]; fido=fope...

13 years ago | 0

| accepted

Answered
Adjusting x-axis to reflect psuedo-time using XTickLabel
OK, that can be done... >> x=[-146370,148830]; % the ranges you mentioned >> tix=x(1):diff(x)/4:x(2); % compu...

13 years ago | 0

Answered
How do I separate raw data in columns, effectively?
OK, I just went ahead with the above assumption...one way reading a group of three as a set-- >> fmt='Accel (mg), Mag (mGau...

13 years ago | 0

| accepted

Answered
Reading data into Matlab
Unless the overall file is huge, probably the easiest way to deal with this (and likely fastest as well) would be to simply read...

13 years ago | 0

Answered
How to create a time series for storing data in each time step
A) Use Matlab *datenum* serial date numbers w/ an arbitrary origin -- >> t=datenum(2010,1,1,8,[0:8*60],0); % 1Jan2010 8AM ...

13 years ago | 0

Answered
Decimal places in axis
Yeah, isn't that annoyingly ugly and klunky??? I first complained to TMW 20-some yr ago and they've not fixed it yet. Anyway...

13 years ago | 6

Answered
How can I read the contents of a large data array which has 7 columns, but has only 6 data entries every couple of lines?
Unfortunately, space-delimited files aren't very amenable to such shenanigans; one way would be to read the file on a line-by-li...

13 years ago | 0

Answered
Get the specific digit of a number
Wrong syntax for the combined logical operation and you're looking for what's left over to get the last digit, not the modulo va...

13 years ago | 0

Answered
Assigning a script to a variable
This actually appears to be a reasonable use of *eval*. Generally it is to be avoided but here your complexity is well controll...

13 years ago | 0

| accepted

Answered
How to get data from figure?
x = get(get(gca,'children'),'xdata'); % return the plot data y = get(get(gca,'children'),'ydata'); y=y(x(x==linspace(0,...

13 years ago | 0

Answered
Plot of a function
As Walter notes (and I missed in your original posting) since you've defined the time variable t as a vector going into the ...

13 years ago | 0

| accepted

Answered
Is there is a way I can select the minimum value from a matrix, and replace all numbers surrounding this minimum value (3 cells) by a specific number
[~,imin]=min(x(:)); % location of min (linear [im,jm]=ind2sub(size(x),imin); % convert to subscripts x(im-1:im+...

13 years ago | 1

| accepted

Answered
How to add a command to .p file
Short answer is "can't" unless you have the source from which the p-file was built.

13 years ago | 0

| accepted

Answered
Plotting time in x-axis
You need the x-axis variables to be in Matlab serial datenums and then used *datetick* to format. doc datenum % and friend...

13 years ago | 0

Answered
Help to optimize two parameters to model the response of a photodiode
doc lsqnonlin % and friends

13 years ago | 0

Answered
How to get details from header
Looks like a fixed format so just count lines and use the *textscan* ability to be called multiple times on same file... fi...

13 years ago | 0

| accepted

Answered
matrix input if mat(1) is > than mat(2)
function [specialmax] = specialmax(x) [r c]=size(x) t=x(1,:); for i=2:r for j=1:c specialma...

13 years ago | 0

Answered
Trouble using polyfit that separated straight fit from original data points
From doc polyfit [P,S,MU] = polyfit(X,Y,N) finds the coefficients of a polynomial in XHAT = (X-MU(1))/MU(2) where...

13 years ago | 0

| accepted

Answered
Convert dat file into fprintf using strtok, strrep and char functions
This is a job for *regexp()*... or just fix the input to *fprintf()*... >> c={'string-001-1983-string'}; >> d=textscan(...

13 years ago | 0

Answered
Creation of line between axis and point in scatterplot?
doc line % maybe??? There's a topic on animation techniques in the section on enhancing graphics that may be useful as well...

13 years ago | 2

Answered
How to split x-axis (6 years of timeseries) with datetick into monthly intervals?
... set(gca,'XTick',linspace(L(1),L(2),NumTicks)) ... Unless L and NumTicks are some very particular sets of values, ...

13 years ago | 0

Answered
XTICKLABEL and LATEX -- still not supported?
Nope, not yet...best you can do is to use *text* and write the labels manually at the desired locations. Whether somebody has p...

13 years ago | 0

| accepted

Load more