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

4 次查看(过去 30 天)
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.

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by