Answered
How to get a linear trendline/line of best fit with a fixed y-intercept?
Just build the design matrix and use \ is the simple way; |*cfit*| can do it in Curve Fitting TB if you set the specific model a...

9 years ago | 1

| accepted

Answered
change the y-axis value size
You didn't show the code used to create the plot but the answer in general is to first save the handles to the two axes so you c...

9 years ago | 0

Answered
CFTool: how to get output and use those data
I'll grant the CF Tool is really opaque in many ways, fer shure...this is perhaps the most of the many dark corners... When y...

9 years ago | 1

Answered
How to convert dates and times from txt to numbers?
OK, with the updated information on what is wanted the overall code is accumulated here in one spot instead of in the string of ...

9 years ago | 0

Answered
Isolating segments of data in one column using time integrals from the next column
Logical addressing to the rescue!!! :) >> for i=1:length(interval) c{i}=data(iswithin(data(:,2),interval(1,1),inter...

9 years ago | 0

| accepted

Answered
Using a loop with a cell array
[~,~,raw]=xlsread('File Wk1edited_Original.xlsx '); ix=cellfun(@isempty,strfind(raw(:,10),'unknown')); raw(~ix,:)=[]; ...

9 years ago | 0

Answered
How do I extract data from a .dat file contain multiple tables?
Read the full file into character array and then search for the RPM line; that will give you a set of sections within which to i...

9 years ago | 1

Answered
Datenum Reversal Drifts away from Original Time
Stephen's spot on; unless both the acquisition and whatever is recording timestamps are interrupt-driven and the processing is o...

9 years ago | 0

Answered
Plot a large array of doubles
for n = 0:1000000 ... Pi(n) = currentPi; end ... plot(n,Pi); _n_ is just a single value of 1000000, the ...

9 years ago | 0

Answered
Plot trend line from data imported from excel
It's not much more than Excel altho a "trendline" is generally considered linear and certainly the orange curve isn't going to b...

9 years ago | 0

Answered
How to convert dates and times from txt to numbers?
I'd suggest using |*table*| for such data/analyses. I put your first file into a local file _'kpl.txt'_ and manipulated it with...

9 years ago | 0

Answered
fprintf in nested for loops
_"Able to get the file opening to work"_ Well, no, not really. What you've done is alias |*sprintf*| to a variable by assign...

9 years ago | 1

| accepted

Answered
How can I plot a bar chart with 4 different y-axis and standard deviation?
OK, I ran your function -- it gets thru the barplot ok but barfs on the errorbar with size mismatch. Wasn't sure what your inte...

9 years ago | 2

Answered
Keep only the first mention of a number in a cell array
>> [u,ia]=unique(C); >> C_new=cell(size(C); C_new(ia)=u >> C_new(ia)=u C_new = '00173' [] [] '00355'...

9 years ago | 0

| accepted

Answered
Lagged/Cross Correlations with missing values
isOK=isfinite(A) & isfinite(B); % both rows finite (neither NaN) [r,lag]=xcorr(A(isOK),B(isOK),'coeff');

9 years ago | 1

| accepted

Answered
How to use a GUI to create and name a text file
Use [fname,pname]=uigetfile('*.txt'); instead for prepackaged file dialog. See doc uigetfile % for details, more o...

9 years ago | 0

Answered
How to obtain integer solutions only with fsolve?
Can add constraints to *|fsolve|* but can't force it to be integer-valued. That is a mixed-integer linear programming problem; ...

9 years ago | 0

Answered
Suppose I have 5 traces of action potential with different peaks. I would like to plot all those 5 traces on the same plot so that all the peaks are same. Basically I would like to plot on the normalized scale.
Well, another shot in the dark...putting the two traces you posted before together... VV=[Vv1 Vv2(2:end)]; T=[Ti1 Ti2(2:end)...

9 years ago | 0

Answered
How do I convert xtick label to real time? Time is from 18:00 to 23:50 with every 10 minutes interval, so axes for X is from 1 to 36.
Which release? Post HG2, use |*datetime*| for x axis variable and |*plot*| is time-aware. Prior, use |*datenum*| for x axis va...

9 years ago | 0

| accepted

Answered
Suppose I have 5 traces of action potential with different peaks. I would like to plot all those 5 traces on the same plot so that all the peaks are same. Basically I would like to plot on the normalized scale.
If all are same length so have each trace in a column in an array, say _data_, then dataNorm=bsxfun(@rdivide, data, max(data...

9 years ago | 1

| accepted

Answered
How to delete all *.xlsx files in a folder that contain a specific string within the file?
You'll have to simply iterate over the collection of files, reading each and searching for the string and then delete that file ...

9 years ago | 0

| accepted

Answered
MATLAB invalid field name
_" how to solve this and maintain the field name with "/" ?"_ No can do. The '/' is simply not an allowable character in a v...

9 years ago | 0

Answered
For loop: max iterations exceeded
Has nothing whatsoever to do with the |*for*| loop; it _is_ in the inner iteration of whatever function it is that you're callin...

9 years ago | 1

Answered
How to enhance the performance of for-loops and cell-arrays (related to statistical calculations)?
S = 'runoff.txt'; O = 'runoff_observed.txt'; D = 'C:\Users\heute\model\results\model_standalone\'; d = dir(fullfile(D...

9 years ago | 1

| accepted

Answered
Perform function on each vector within an array
outcomes = Columns 1 through 3 [1x63 double] [1x246 double] [1x153 double] ... _"First, I'd like to perfor...

9 years ago | 1

| accepted

Answered
Counting number of rows in a field of structure
Well, that's an ambiguous question if ever were one...certainly for a given structure/field combination |*size*| works; we need ...

9 years ago | 1

Answered
How can I get text in figures to display symbols?
Unfortunately, the |*uicontrol*| objects do not expose an 'Interpreter' property as does the |*text*| object or even labels. ...

9 years ago | 0

Answered
How to obtain data which fall outside the limits of the scatter plots?
If the red line is computed at the same points as the other data, then simply ix=ltbluepoints>redpoints; % logical vector ...

9 years ago | 0

| accepted

Answered
All the fieldnames are prefixed with 'x'
_|*table*|_ names must be valid Matlab variable names and (just like SAS and R and virtually all other programming languages) th...

9 years ago | 2

Answered
How to exit CMD windows after calling Raven.exe inside a loop in a MATLAB code?
# Show the command you're dispatching... # Build a .bat file that runs the program instead of dispatching the program itself: ...

9 years ago | 0

Load more