MATLAB Answers

0

Make standalone Program with Application Compiler for Campbell Plot with function rpmfreqmap() dosent work

Asked by Fabian Hoppe on 22 Jun 2018
Latest activity Answered by Stefanie Schwarz on 31 Jul 2018
Hello I wanted to create a standalone application for an Code example of the mathworks.com website. It generates a Campbell Plot with function rpmfreqmap()
fs = 600;
t1 = 5;
t = 0:1/fs:t1;
f0 = 10;
f1 = 40;
rpm = 60*linspace(f0,f1,length(t));
o1 = 1;
o2 = 0.5;
o3 = 4;
o4 = 6;
ph = 2*pi*cumtrapz(rpm/60)/fs;
x = [1 1 2 1]*cos([o1 o2 o3 o4]'*ph);
rpmfreqmap(x,fs,rpm)
After exporting it with the Application Compiler I started the .exe and there poped up the messeage: Index exceeds array bounds. Error in => ExportTest.m at line 16
Can anybody tell me why? Is it a bug? When I run it in MatLab itself it works fine. Thanks for your help.

  0 Comments

Sign in to comment.

1 Answer

Answer by Stefanie Schwarz on 31 Jul 2018

For Signal Processing Toolbox, only command-line functionalities are supported for deployment with MATLAB Compiler: https://www.mathworks.com/products/compiler/supported/compiler_support.html
What you may do instead is use 'rpmfreqmap' with output arguments, such that no UI is generated:
[map,freq,rpm,time,res] = rpmfreqmap(x,fs,rpm)

  0 Comments

Sign in to comment.