how to use matrix of three variables

3 Ansichten (letzte 30 Tage)
muhammad ismat
muhammad ismat am 30 Apr. 2016
Beantwortet: CS Researcher am 1 Mai 2016
firstly i was used matrix s(n x n) where n x n is the size of data in the following code
A = yarbb(data,x)
coordinates=data;
Av=[coordinates; fliplr(coordinates)];
linindices = sub2ind(size(s), Av(:, 1), Av(:, 2))';
remain=setdiff(1:numel(s), linindices);
sim=s(remain);
.
.
auc= (ndash + 0.5 * nddash)/(ndash+nddash+nn);
A=means(auc)
but then i edit s(n x n) to become smit(n x n x p) where p is the max value of loop was used in other function so i want to use every value of smit as s (p times) in previous code say smit is (77 x 77 x 10) i want to use smit as (77 x 77) 10 times in previous code because smit is changed every time.
  3 Kommentare
CS Researcher
CS Researcher am 1 Mai 2016
Not sure what you want but something like this:
final3DMatrix = zeros(77,77,10);
for i = 1:10
final3DMatrix(:,:,i) = smit; %smit is 77x77
end
Geoff Hayes
Geoff Hayes am 1 Mai 2016
CS Researcher - your above comment seems to provide the solution to the posed question, so please copy and paste as an answer.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

CS Researcher
CS Researcher am 1 Mai 2016
Not sure what you want but something like this:
final3DMatrix = zeros(77,77,10);
for i = 1:10
final3DMatrix(:,:,i) = smit; %smit is 77x77
end

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by