Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

matrix operation make matrix

3 Ansichten (letzte 30 Tage)
Internazionale
Internazionale am 10 Apr. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
i have matrix A = rand(64,4), i want to process them to make new matrix where B = (K-A(:,1))*2 . k is multiply every 8, example A=1:8:64 so K=1 , A=2:8:64 so K=2 , A=3:8:64 so K=3, A=4:8:64 so K=4, A=5:8:64 so K=5, A=6:8:64 so K=2, A=7:8:64 so K=2, A=8:8:64 so K=2. how to find B ?

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 10 Apr. 2013
A = rand(64,4);
K = reshape([(1:5)';2;2;2]*ones(1,8),[],1);
B = 2*(K - A(:,1));

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by