Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function A = stretchmat( a, B )
- %% A = stretchmat( a, B )
- %
- % Inputs
- % a - Vector to stretch by repeating
- % B - Matrix size to match
- % Calc Dim Scale
- s = size(B)./size(a);
- % Error Check
- if prod(round(s) ~= s)
- disp( 'Error: Size of B cannot be equally divided into the size of a. Check dimensions of parameters.' );
- A = 0;
- return
- end
- %% Calculate Stretch
- A = repmat(a, s );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement