to convert a row into 3d matrix having all combinations
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i have a piece of code p=[1 -1 1j -1j] i want to convert this 1x4 matrix into 256X4x2 matrix. how to fix this bug .
2 Kommentare
Antworten (2)
Ahmed Mahfouz
am 7 Feb. 2018
i don't know what you exactly mean but i assumed the entries to the 3d matrix are the same as in the given vector, you can try the following code:
p=[1 -1 1j -1j];
for n=1:256
Matrix(n,:)=p;
end
Matrix(:,:,2)=Matrix(:,:,1);
10 Kommentare
Siehe auch
Kategorien
Mehr zu Logical 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!