Answered
Expand Elements in a Table/Matrix
my variant [j i] = meshgrid(A(1,2:end),A(2:end,1)); A_Elements2 = [j(:) i(:) reshape(A(2:end,2:end),[],1)]

15 years ago | 0

| accepted

Answered
expanding matrix
[j k i]=meshgrid([x1,x2]); xx = [i(:) j(:) k(:)];

15 years ago | 1

| accepted

Answered
Logical Indexing for a slice of a 3D-Matrix
bsxfun(@times,MyMat2,(MyMat1>5)); EDIT M5 = MyMat1>5; MyMat2(find(M5)+numel(MyMat2)/3)=MyMat1(M5);

15 years ago | 0

Answered
conversion from double to struct
if the mat - file contains one variable x = uiimport('test_signal.mat'); names =fieldnames(x); xx = x.(names{:}); ...

15 years ago | 1

| accepted

Answered
dividing a column matrix based on the no
more variant A = A(:); I = cumsum([0;diff(A)]~=0 & (A ~= 0)); out = arrayfun(@(x)A(I==x),1:max(I),'un',0); same with the...

15 years ago | 0

Answered
division of a single column matrix
in this case A = A(:); I = cumsum([0;diff(A)]~=0 & (A == 1 | A == 2)); out = arrayfun(@(x)A(I==x),1:max(I),'un',0); Dear...

15 years ago | 0

Answered
how to express a set
ai = A(1:N);

15 years ago | 1

| accepted

Answered
Datenum Problem
so? fid = fopen('data.txt'); t = textscan(fid,'%s','Delimiter','BASF'); fid =fclose(fid); t = t{:}; t = reshape(strtr...

15 years ago | 0

Answered
How to implement white noise with a time component?
as well so? (EDIT) n = 50000; N = 0 + sqrt(2)*randn(n,1); N = normrnd(0,sqrt(2),n,1)

15 years ago | 0

Answered
Combination calculations and matrix manipulation
more so? A = [1 2 3 4; 5 6 7 8; 9 10 11 12]; A1 = mat2cell(A,[1 1 1],size(A,2)); [J K I] = meshgrid...

15 years ago | 0

Answered
how to create a 1xn matrix from a loop
so?(EDIT) p1 = 1000; k = 50; p = p1 + 100*(0:49) or p=linspace(1000,6000,50) or your variant p(1) = 1000; for ...

15 years ago | 1

| accepted

Answered
Sum of Maple to MATLAB
more variant Lm.'*bsxfun(@minus,Um,Um.')*Lm

15 years ago | 2

Answered
Matrix union or extracting matrix elements
ons = [1 0 1;1 0 0;0 0 1] ; a = [4 7 9;8 5 4;7 2 5]; W = a.*ons

15 years ago | 0

| accepted

Answered
evaluate expression
ezplot(['y-x*exp( (1-y)/(' num2str(A) '*y)*' num2str(B) ')'],[x(1) x(end)]) more As = ...; Bs = ...; y = zeros(size(x));...

15 years ago | 0

| accepted

Answered
finding neighbor value
variant A = randi(170,200); sz = size(A); center = [50 50]; N = 3; Outnum = A(max(abs(repmat(1:sz(2),size(A,1),1) ...

15 years ago | 0

| accepted

Answered
what is wrong?
Hi Sahab! More variant solving your problem m=22; AA = [m 7]; N=[11,9,11,10,10,9,9;7,7,7,7,7,7,7;4,5,4,4,4,5,5;1,1,...

15 years ago | 0

| accepted

Answered
Simple FOR loop question
so? GUI_NEWABS = abs(GUI_NEWABS).*sign(GUI_DATA);

15 years ago | 0

| accepted

Answered
ga-fitness
variant FitnessFcn = @(x)bsxfun(@minus,abs(bsxfun(@times,A,x)),B)

15 years ago | 0

| accepted

Answered
Condition
just vnew = v.*(v<5)

15 years ago | 0

| accepted

Answered
assign data satisfied rules given
variant for rules 1 szAA = [22 7]; n2233 = randi(floor(szAA(1)*.2),2,szAA(2)); N = [22-sum(n2233);n2233]; B = cell2mat(...

15 years ago | 0

| accepted

Answered
whats wrong in that program?
more variant nBit = 2500; ipMod = zeros(1,nBit); ip1 = rand(1,nBit) >0.5; ip2 = rand(1,nBit) >0.5; t1 = ip1==1; t2 ...

15 years ago | 0

Answered
Matrix manipulation syntax help
more mn = size(white)-2; C = arrayfun(@(k)cumsum([1:3;ones(k,3)]),mn,'un',0); C2 = arrayfun(@(s)cumsum(ones(mn),s),[1 2],'un'...

15 years ago | 0

Answered
Produce a Date vector starting with a desired date
a = datenum({'01-Jan-2011 00:00:00';'31-Dec-2031 23:00:00'}); Out = datevec(a(1):1/24:a(2));

15 years ago | 4

| accepted

Answered
Help! About use symsum on matrix
variant without symbolic toolbox a = arrayfun(@(x)p^x*yu,0:2,'un',0); rt = sum([a{:}],2)

15 years ago | 0

| accepted

Answered
Passing datenum a column vector?
more sd = datenum(num2str(d),'yyyymmdd')

15 years ago | 0

Answered
Need help using colon operator with multiple matrices - I'm really close to being loopless!
more variant a=[1 2 3]; b=[4 5 6]; c = [a b]; c = c(cumsum([1:4; ones(2,4)])); or in this case, just c = cumsum([...

15 years ago | 1

Answered
binary to decimal conversion.......need ans immidiately plzzzzzzzzzzz
variant bin2dec(num2str(reshape([A,zeros(1,8-rem(length(A),8))],[],8)))

15 years ago | 0

Answered
Rearranging matrices
more variant data_new = reshape(permute(reshape(data,[6,28,6]),[1 3 2]),6,[]);

15 years ago | 2

Answered
replace array value
A(A==6)=12

15 years ago | 0

| accepted

Answered
convert 2-D to I-D matrix
...convert from ... 2D matrix to 1d matrix... A = randi(120,3); % matrix 2D size 3x3 S = A(:); % matrix 1D size 3x1 or S ...

15 years ago | 3

| accepted

Load more