Answered
R2 with a loglog plot
I see nothing wrong with Star's Answer nor follow-up comment. To compute SSE from such a model requires evaluating the residual...

10 years ago | 1

Answered
how use a loop to repeat the same calculation to different files and save the results in between
You're almost there...just create a new filename for output similarly as to how you created the ones you did to read. See the F...

10 years ago | 0

Answered
What is the fastest way to convert mat to cell for the following algorithm?
Probably *mat2cell* altho I've not timed alternatives... c=mat2cell(a,256,256,[1 10 10 18 18]);

10 years ago | 1

Answered
Importing Column Vectors Sequentially
_"... in ... import app those are the cells ... tab delimited..."_ In that case, use *textscan* and a format string set up to...

10 years ago | 0

| accepted

Answered
How to generate new table from extrema of an original table?
Without data to look at for any peculiarities or features to use, we can only suggest the general functions to look at... d...

10 years ago | 0

Answered
How can I get a string out of a cell array and use it as a condition for a loop?
Well, doing this is _not_ recommended and surely there's a better way to code the application if we had more particulars, but it...

10 years ago | 0

Answered
How do I workaround comma used for thousands in csv file?
Use the "%q" format string to import the quoted strings as strings without getting broken up first, _then_ get rid of the embedd...

10 years ago | 2

Answered
Help!! New to matlab - 'Assignment has more non-singleton rhs dimensions' error
From doc fminsearch ... Arguments fun is the function to be minimized. It accepts an input x and returns a sca...

10 years ago | 0

Answered
How can I find the sum of the perimeter of a matrix?
One way amongst any number... >> M=[1,2,3;1,2,3;1,2,3]; >> I=ones(size(M)); I(2:end-1,2:end-1)=0; >> S=sum(reshape(M....

10 years ago | 1

| accepted

Answered
Strange behavior when passing single precision numbers into atan2
*single* doesn't have anything to do with it (albeit the precision of the input values is about that of single precision in deci...

10 years ago | 0

Answered
Finding multiple x-axes points from y-axes value
OK, try this or a version thereof... >> y=bsxfun(@plus,randn(10),linspace(0,10,10).'); % make some sample data grossly sim...

10 years ago | 0

Answered
Plotting a graph.
s=[10, 12, 14;20, 22, 24;40, 44, 48].'; errorbar(mean(s),std(s)) ylim([5 50]) set(gca,'xtick',1:3,'xticklabel',num2st...

10 years ago | 0

| accepted

Answered
how calculate percentage with a vector and a matrix with nan elements?
>> m=M;m(isnan(m))=0; >> sum(m)./sum(repmat(V.',1,size(M,2)).*isfinite(M))*100 ans = 0 17.3913 33.3333 25.92...

10 years ago | 0

| accepted

Answered
Drawing Error bars with specific linestyle
Set the _'linestyle'_ property of the second errorbar series object obtained from the _hggroup_ handle returned by *errorbar* --...

10 years ago | 0

Answered
How to convert executable file or its contents to text file?
OK, with the additional information provided there's now enough to move comments to an answer...with some background discussion ...

10 years ago | 0

| accepted

Answered
How to get minor ticks pointing outside the graph
With HG2 (R2015b and later) TMW finally gave such fine detail control...see <http://www.mathworks.com/help/matlab/ref/num...

10 years ago | 1

Answered
How can I extract line numbers of text data?
fid=fopen('portion.txt','r'); i=0; % loop counter n=[]; while ~feof(fid) % until we run out of data ...

10 years ago | 1

Answered
Skipping part of an index in a for-loop
nDont=2; for j... if j==nDont, continue, end ... doc continue % for details

10 years ago | 0

Answered
Fastest way to determine if a character index is a carriage return (\n)?
y=any(text(index)==char(10));

10 years ago | 0

| accepted

Answered
Get Equation as Input from User (str2func)
*str2func* argument is any desired function you can write as an anonymous one-liner or the name of any existing function, m-, p-...

10 years ago | 2

Answered
F vales come out as Infinity using the anovan function.
You've tried to estimate 15 terms with only 15 data points; note you have 0 DOF left for the error term. Hence, the denominator...

10 years ago | 0

| accepted

Answered
Import from data from messy text file
Pretty straightforward, just use the features in the file to find the wanted sections...it's quite regular in its construction s...

10 years ago | 1

| accepted

Answered
How to create an mxn matrix with a for-loop
As you've written it, you only have a 1x2 (row) vector at any one time, you overwrite X on each pass. There are certainly more ...

10 years ago | 0

| accepted

Answered
Why do I receive "exceeds matrix dimensions" after reading a fixed numbered format?
>> fmt=[repmat('%f',1,5) '%*[^\n]']; % 5 floats, skip rest of line >> fid=fopen('lamury.dat','r'); % open the file...

10 years ago | 0

Answered
Why do I receive "exceeds matrix dimensions" after reading a fixed numbered format?
What does size(XY) return? Looks like _probably_ only got one return value; w/o any data to compare to, just guessing a...

10 years ago | 0

Answered
Detect where an array becomes negative
Sometimes it's just as easy to loop...it's unfortunate in cases like this *find* isn't vectorized; a cleaner syntax doesn't pop ...

10 years ago | 1

Answered
how to read a file like a table
Use *textscan* without an explicit format string--that's a magic incantation that will return the data in the same shape as is i...

10 years ago | 0

| accepted

Answered
If any statement is written like this x(x<R)=0; and we have to plot this statement then how is this possible?
Set the unwanted points to NaN; *plot* and friends silently ignore those. This solution will leave breaks in the line, however,...

10 years ago | 0

Load more