Answered
arrays
M = dlmread('yourdata.txt'); M(:,2) = fix(M(:,2)*.01)*100; m = 10^max(ceil(log10(M(:,2)))); k = M(:,1:2)*[m;1]; [a n n] = ...

14 years ago | 1

Answered
For loop calcs
instead |x==z|, use |abs(x - z) < 100*eps|

14 years ago | 0

Answered
functions to Solve non linnear equations
<http://www.mathworks.com/matlabcentral/answers/13668-finding-root-in-newton-raphson-method try this is>

14 years ago | 0

| accepted

Answered
how do i find the 4 element in a matrix
eg: A = randi(45,5,4) out = A(1,4) *OR* i1 = reshape(1:numel(A),size(A,2),[]).' out = A(find(i1 == 4)) ...

14 years ago | 0

| accepted

Answered
How to window sliding on matrix column?
*eg*: *EDIT* A= [1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6] m = 3; h = hankel(1:m,m:size(A,2)) ...

14 years ago | 0

Answered
swapping numbers
<http://www.mathworks.com/matlabcentral/answers/28276-comparing-numbers this is?>

14 years ago | 1

Answered
A simple question
max_stretch_ratio = min(reshape(saturation_map./gray_image,[],1));

14 years ago | 0

Answered
Vectorized operations on multidimensional arrays
res = bsxfun(@minus,a,m) please read about function <http://www.mathworks.com/help/techdoc/ref/bsxfun.html |bsxfun|>

14 years ago | 1

| accepted

Answered
Reshaping matrix
out = reshape(A.',1,[]) please read <http://www.mathworks.com/help/techdoc/ref/reshape.html |reshape|>

14 years ago | 0

Answered
calculating average value for matrix
out = abs(A-B)./A

14 years ago | 0

| accepted

Answered
vectorization
dx = 1/(n-1); x = 0:dx:1; f = [0 cumsum(dx*x(1:end-1))]

14 years ago | 0

| accepted

Answered
For loop only running once.
s1 = bsxfun(@(x,y)rem(y,x)==0,[3,5,7,11,13]',0:9);

14 years ago | 0

Answered
comparing numbers
K = randi(200,80,1); out = reshape(K,[],8); for i1 = 1:size(out,2) A = out(:,i1); i2 = 1; while...

14 years ago | 0

| accepted

Answered
I want to generate a pascal matrix of size m
please read about function <http://www.mathworks.com/help/search/doc/en/R2011b?qdoc=pascal |pascal|> doc pascal eg: ...

14 years ago | 0

Answered
matrix operation
out = conv2(InputImage,ones(i1)/i1^2,'same')

14 years ago | 1

Answered
average
|data| - your array [42x16384] *EDIT* out = mean(reshape(data,size(data,1),[],8),3); _*eg:*_ |data| - your array [...

14 years ago | 1

| accepted

Answered
Plot Eigen Vectors
plot(Evec)

14 years ago | 1

Answered
how to determine constants for a given equation to fit data?
use |nlinfit| from |Statistics Toolbox|. |A| - your array [21x4] out = nlinfit(prod(A(:,2:end)),A(:,1),@(a,x)a(1)*x.^...

14 years ago | 0

| accepted

Answered
sample and hold kind of interpolation
t = [true(1,size(x,2));~isnan(x)]; x1 = [ones(1,size(x,2));x] x2 = x1(~isnan(x1)) x1(:) = x2(cumsum(t(:))) out = x...

14 years ago | 0

| accepted

Answered
How to access array within array?
out = Q{1}(2) for your case from eg: Qdbl = cat(1,Q{:}) out = Qdbl(1,2)

14 years ago | 2

| accepted

Answered
remove rows by specific numbers
data = reshape([90000 10 6 90001 14 8 90002 8 5 90003 11 4 90004 15 9 90005 13 4 90000 1 1.5 90001 3 2.5 90002 14 8 90003 7 4 ...

14 years ago | 0

Answered
multi-dimensional symbolic arrays
m = 3; n = 4; q = 2; [i1 i2 i3] = ndgrid(1:m,1:n,1:q); k = cellfun(@sym,regexp(sprintf('x%d_%d_%d',[i1(:) i2(:) i3...

14 years ago | 0

Answered
calculating the mean
CLL_MEAN_NEW = permute(mean(CLL_MEAN(:,end,:)),[3 2 1]) *OR* CLL_MEAN_NEW = squeeze(mean(CLL_MEAN(:,end,:)))

14 years ago | 0

| accepted

Answered
how to access values inside a matrix or array in a 'for' loop??
h=imread('C:\Users\Manoj\Desktop\sorry.jpg'); imshow(h) hold on; plot(m,n,'r.','MarkerSize',15)

14 years ago | 0

| accepted

Answered
matrix buffer
|bwdist| from |Image Processing Toolbox| *OR* |A| - your array [i1,j1] = find(A) [y x] = ndgrid(1:size(A,1),1:siz...

14 years ago | 0

| accepted

Answered
loop for
*1.* i1 = 1:5; a = i1*2 *2.* a = zeros(1,5); for i1=1:5 a(i1)=2*i1; end

14 years ago | 0

Answered
Error using symbolic toolbox
eg C = randi(5,4,1) S = randi([5 10],4,1) L = randi(8,4,1) E = 1; %solution CS = permute([C,S],[3 2 1]...

14 years ago | 0

Answered
edited-making value 0
*EDIT* A=[2 4 5 6 8 9 1 3 4 ]; A_1_10 = A(:,:,ones(10,1)); k = nchoosek(1:9,3); k2 = k(all(diff(k,1,2)>1,2),...

14 years ago | 0

| accepted

Answered
matrix manipulation
a=[2 6 7 8;4 5 3 7;9 7 6 9;5 3 1 9] id = ~eye(size(a)); h = arrayfun(@(i1)a(id(:,i1),:),1:size(id,2),'un',0); [out,idxout] ...

14 years ago | 1

| accepted

Answered
making the value as 0
A=[2 4 5 6 8 9 1 3 4 ] n = numel(A); A1_10 = repmat(A,[1,1,10]); k = arrayfun(@(j1)randperm(n,3)',(1:10),'un',0...

14 years ago | 0

| accepted

Load more