how to use matrix of three variables

3 visualizaciones (últimos 30 días)
muhammad ismat
muhammad ismat el 30 de Abr. de 2016
Respondida: CS Researcher el 1 de Mayo de 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 comentarios
CS Researcher
CS Researcher el 1 de Mayo de 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 el 1 de Mayo de 2016
CS Researcher - your above comment seems to provide the solution to the posed question, so please copy and paste as an answer.

Iniciar sesión para comentar.

Respuestas (1)

CS Researcher
CS Researcher el 1 de Mayo de 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

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by