Answered
lsqcurvefit of a summation function where the parameter to evaluate is the last index of the summation (so an integer)
lsqcurvefit is already MIN oof the SUM of euclidean distances of x from y. So, you don't have to use inlcude a sum in your handl...

15 years ago | 0

| accepted

Answered
writting error meesage
if r > 0.49 sprintf('The person is accepted.') else error('The person is unccepted or not exist.') end

15 years ago | 1

| accepted

Answered
Laplacian edge operator
Are you referring to <http://www.mathworks.com/help/techdoc/ref/del2.html discrete laplacian>?

15 years ago | 0

Answered
My stochastic processes program
You basically calculate the same X all the time. Nothing changes inside the loops.

15 years ago | 0

Answered
FREDHOLM INTEGRO-DIFFERENTIAL EQUATIONS using SINC-COLLOCATION PROCEDURE
Check with _ver_ that the Parallel Computing Toolbox is listed, if not it is not installed.

15 years ago | 0

| accepted

Answered
textscan does not output more than 4 decimal digits
<http://matlab.wikia.com/wiki/FAQ#Why_does_MATLAB_only_calculate_to_4_significant_digits.3F> You're being fooled by the display...

15 years ago | 1

| accepted

Answered
how interpolate 16 three-dimensional points with mesh function?
To get you started: [X,Y] = ndgrid(1:4,(1:4).'); Z = rand(4,4); mesh(X,Y,Z) surf(X,Y,Z)

15 years ago | 0

Answered
How can I find name in a matrix or an array?
c = {'Fp1','Fp2','F3','F4','C3','C4','P3' 'P4' ,'O1' ,'O2','F7','F8','T7','T8'}; idx = strcmpi('O1',c); where _idx_ ...

15 years ago | 0

| accepted

Answered
Out of Memory Error: How can one get around this?
You're trying to find the least squares solution to a system which means you can use ( <http://www.mathworks.com/help/techdoc/re...

15 years ago | 1

| accepted

Answered
Bugs in tscollection class?
Use 'days' (non capitalized) You can change: indIn = find(strcmp(inunits,availableUnits)); indOut = find(strcmp(outunits,...

15 years ago | 1

Answered
Adding Stars
Yes but the number will be converted to a string: A = rand(1); if A < 0.06 As = sprintf('%.3f*',A); end

15 years ago | 0

| accepted

Answered
Constructing a patterned matrix
n = 4; v = 1:n; bsxfun(@power, v,v.')

15 years ago | 0

Answered
Matlab Percentile function VS excel percentile function
I get the same results: A = rand(1000,1); B = prctile(A,30:20:70) xlswrite('C:\Users\Oleg\Desktop\test.xlsx',A) and then...

15 years ago | 0

Answered
REFLINE ISSUE
type ver and check that the statistics toolbox is installed.

15 years ago | 1

| accepted

Answered
reshape matrix
Note that the way you indicated your input it looks like a char array. I inferred from your duplicate post that it is a double m...

15 years ago | 1

| accepted

Answered
Run loop for multiple text files
data = cell(length(files)); for ii = 1:length(files) data{ii} = load(files(ii).name); end data = cat(1,data{...

15 years ago | 0

| accepted

Answered
Length of the longest continuous string of the same number
You can use <http://www.mathworks.com/matlabcentral/fileexchange/28113-findseq findseq> A = [5;5;1;2;3;4;5;5;5;5;6;7;8] ...

15 years ago | 1

Answered
Read a specific column of a text file
For example read just the third column skipping everything else fid = fopen(C:\...\yourfilename.txt) data = textscan(f...

15 years ago | 4

Answered
select columns from one matrix according to values in a second matrix
That's the only way the averaging is consistent with the output matrix: x = magic(5); y = [1 NaN NaN 2 3 4 ...

15 years ago | 1

Answered
how to set 1000 separator for large numbers in GUI MATLAB
Another alternative w/o java: n = pi * 1e12; c = fix(log10(n)+1); dec = 3; fmt = [repmat('%c',1,mod(c,dec)) repmat(...

15 years ago | 0

Answered
fprintf end of line character
fid = fopen('test.txt','w'); fprintf(fid,'%.0f\t%.0f\r\n', [1:5; 6:10]); fid = fclose(fid);

15 years ago | 0

| accepted

Answered
Function - str2func gives unusual error
Use: FUN='@(c,ppm)('; And call: pdefun([1 1 1],ppm) My interpretation of the problem is: when you call str2func(FUN), pp...

15 years ago | 0

Answered
kmeans() in MATLAB
[ind c sumd] = kmeans(rand(100,10),3); *c* = is a _n(3) by m(10)_ matrix with 3 ten-dimensional clusters. That is the 3 (n) c...

15 years ago | 0

Answered
Basic Vector Operations
<http://www.mathworks.com/help/techdoc/learn_matlab/f2-8955.html Matrices and Arrays> * Multiplication (note the dimensions): ...

15 years ago | 1

| accepted

Answered
Where can I upload images and files for use on MATLAB Answers?
tinypic - http://tinypic.com/ - allows images Supports resizing image to a particular size at time of upload. No registration ...

15 years ago | 2

Answered
I have a question about multiplying two series...
You can simplify the code to: n = min([n1(:); n2(:)]): max([n1(:),n2(:)]); y1 = zeros(1,length(n)); y2 = y1; y1...

15 years ago | 1

| accepted

Answered
Obtaining a path name and using it
pathname = [cd filesep 'Target'];

15 years ago | 1

Answered
inline VS anonymous functions
*Step 1* - define anonymous function in constant _a_ and variable _x_: a = 1; y = @(x) x.^a; *Step 2* - change constant ...

15 years ago | 4

| accepted

Answered
Discrete equation with two unknown variables
x1 = 2; x2 = 3.3; y1 = 9; y2 = 2.9; f = @(ab) [ab(1)*x1/(1+ab(2))*x1 - y1 ab(1)*x2/(1/ab(2))...

15 years ago | 0

Answered
Large Binary Data Files: Can I Animate while Simultaneously Loading the Next Data Block Into Memory from Disk?
*EDIT* # Read in first block # Start timer which executes the TimerFcn after the previous execution has ended (so no hard code...

15 years ago | 0

| accepted

Load more