MATLAB Answers

# how to use matrix of three variables

7 views (last 30 days)
muhammad ismat on 30 Apr 2016
Answered: CS Researcher on 1 May 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 CommentsShowHide 2 older comments
Geoff Hayes on 1 May 2016
CS Researcher - your above comment seems to provide the solution to the posed question, so please copy and paste as an answer.

Sign in to comment.

### Answers (1)

CS Researcher on 1 May 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
##### 0 CommentsShowHide -1 older comments

Sign in to comment.

### Community Treasure Hunt

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

Start Hunting!