MATLAB Answers


How do I copy a 320x240 matrix into a 640x480 matrix and expand everything 200%?

Asked by Raymond
on 26 Jun 2013

Hi, For various reasons I need to use a 320x240 matrix (call it A) to compute it's element values, but then I need a 640x480 matrix (call it B) in which each element of A is twice as large in B. Thus A(1,1) will go to B(1:2,1:2), etc...

Is there a "fast" way to simply say "double the size of this matrix"?

Thanks, Ray




No products are associated with this question.

1 Answer

Answer by Andrei Bobrov
on 26 Jun 2013
 Accepted answer
B = kron(A,ones(2));

  1 Comment

on 26 Jun 2013


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today