Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab_simulink User defined function

Status
Not open for further replies.

Maitryc

Newbie level 1
Newbie level 1
Joined
Feb 18, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
6
Sir,
I am doing a project by Matlab Simulink version( R2013 ).
Screenshot_matlab.jpg
Here the output from the matlab function is y of [1*64] dimension.But I want it to be of [64*64].
The code of matlab function is given below :
Code:
function y = fcn(u)
u=64;
size2 = ceil( log2(64));
size2 = 2^size2;
x = randn( 1, size2 );
f = fft( x );
n = 1:(size2/2+1);
 n = sqrt( n );
 f(1:size2/2+1)=f(1:size2/2+1)./n;
 f(size2/2+2:size2) = real( f(size2/2:-1:2)) -1i*imag(f(size2/2:-1:2));
 y = ifft( f );
 y = real( y(1:64) );
%#codegen

y = u;
Please tell me how to change the y dimension from [1*64] to [64*64] ?
Regards
Maitry
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top