# Getting many outputs using blockproc

I want to apply SVD for each 4*4 blocks using the “blockproc” and get 3 outputs: U, S and V so I can reconstract all blocks together again but Matlab gets me “too many ouput arguments”. How can I solve this problem?

`fun = @(block_struct) svd(block_struct.data);[U S V] = blockproc(a, [4 4], fun)`

This is the error that I have:

`Error using blockprocToo many output arguments.`

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

No, this is not possible with blockproc().

You can use something like

`function r = blocksvd(block_struct)   [U, S, V] = svd(block_struct.data);   Spad = nan(size(U));   Vpad = Spad;   Spad(1:size(S,1),1:size(S,2)) = S;   Vpad(1:size(U,1),1:size(U,2)) = U;   r = [U; Spad; Vpad]; end`

this returns a 12 x 4 array that can be broken up again into U, S, V.

--

--

--

## More from Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

## Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.