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.

Create simulink block using existing matlab files

Status
Not open for further replies.

Biruntha

Junior Member level 1
Joined
May 26, 2015
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Jaffna, Srilanka
Activity points
102
Hi,

I developed a system for signal processing in matlab.It contains lot of m-files. Now i want to create simulink block using that matlab files. and get the output value(string) in simulink enviorment. how can i do this ?
 

I defined these denoise,lfcc,vqext function in separate matlab file. should i need to create separate interpreted MATLAB Function for each function?

Code:
Fm = 100;%length of Frames excursion
 framelnc = 100;%length of Frames excursion
 Fn = 256;%length of Frames sampling frequency 12.500kHz, frame length 020.5ms
 fs = 8000;

 x = wavread('test\test1.wav');

%% Preprocessing: Noise Removal
 IS= 0.25; % initial silence (noise only)
 output=denoise(x,fs,IS);

 y = output;

 %% Extraction of LFCC Features
 feat = lfcc(y,fs);


 %% Extract VQ CODE
 k=16; % number of centroids required
 code1 = vqext(feat, k);

 test = mean2(code1);

 %% Emotions Recognition

 load ('train.mat')

 Class = knnclassify(test , feature, type);

 y=Class

- - - Updated - - -

it gives "Not enough input arguments." , "Error evaluating MATLAB function in 'testmodel/Interpreted MATLAB Function'" how can i solve this?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top