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

2 views (last 30 days)
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.

Answers (1)

Stefanie Schwarz
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)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!