I am trying to run this simple command on Matlab to load a VST:
hostedPlugin = loadAudioPlugin(pluginpath)
However, I am getting the following error: Undefined function or variable 'loadAudioPlugin'.
What's wrong? I can't seem to figure it out... This is the output I get when I type the "ver" command:
...
Audio System Toolbox Version 1.2 (R2017a)
...
The Audio system toolbox seems to be installed correctly. And the path is set correctly apparently, I can see the "loadAudioPlugin.p" file in the compiled folder.
Any ideas why Matlab says the loadAudioPlugin is not a function??
Related
Hello stackoverflow community,
I am currently trying to create a Matlab application as a standalone application. In Matlab, the program runs fine via the GUI, however, as soon as I install the application on my desktop and run it, I get the following error messages output to the command window:
Error using dicom_getFileDetails (line 14)
Unable to load file "RE.#_STR_IMG.REGISTRATION.dcm".
Error in dicominfo (line 55)
Error in Apply_Registration/ApplyRegistrationButtonPushed (line 64)
Error in appdesigner.internal.service.AppManagementService/tryCallback (line 333)
Error in matlab.apps.AppBase>#(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 35)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating button PrivateButtonPushedFcn.
Code:
1+2)
% Button pushed function: OpenRegistrationFileButton
function OpenRegistrationFileButtonPushed(app, event)
% Open registration file
app.File_registrationFile = uigetfile;
end
reginfo = dicominfo(app.File_registrationFile);
What is the problem when running as a standalone application?
The Matlab Runtime Compiler matches my Matlab version. Unfortunately, I lack the expertise to move forward here.
Any help will be greatly appreciated!
You are currently only outputting the file name from uigetfile (docs), so subsequent usage of that file assume it's in the same folder as the executing app. This is likely not the case, hence the error that the file can't be loaded (because it doesn't exist).
You just need to be more explicit, get the path too and refer to the full file path instead of just the name
[file,path] = uigetfile;
app.File_registrationFile = fullfile( path, file );
i am using waijung blockset to programm a stmµc. And i wanted to use CAN-Bus blocks but i am facing the following error:
The build process will terminate as a result.
Caused by:
Error, a block diagram was specified in S-function 'stm32f4_can/CAN Setup'. Please make sure your S-function name is not a Simulink model or the name of the current model. You can use the Matlab command 'which -all sfunction_name' to locate all occurrences of model files with the name sfunction_name
hereby i did not insatll MinGW-w64 C/C++ compiler yet. I also tried in comand window >> which -all sfunction_name
'sfunction_name' not found.
I am trying to create .fits files using the matlab.io.fits functions, following the example given here: matlab.io.fits.createFile.
However, this gives me the following error:
>> import matlab.io.*
>> fptr = fits.createFile('myfile.fits');
??? Undefined variable "fits" or class "fits.createFile".
Importing the fits class directly also gives an error:
>> import matlab.io.fits
??? Import argument 'matlab.io.fits' cannot be found or cannot be imported
I get the same result in Matlab2009 and 2015.
What am I doing wrong? Do I need to install a specific class? I am new to Matlab, so it might be a very easy mistake, but some of my more Matlab proficient colleagues has not been able to solve the problem.
This error indicate that the function cannot be found. This is usually caused by the MATLAB path being corrupted. You can restore it with:
>> restoredefaultpath
>> rehash toolboxcache
You can figure out if the file is found by executing:
>> which -all matlab.io.fits.createFile
The file should be in <matlabroot>/toolbox/matlab/imagesci/+matlab/+io/+fits/createFile.m. If it is not there, you probably need to reinstall MATLAB.
I am new to S-Functions and Real TIme WorkShop. The S-Function has been created using an Embedded Matlab Function. The S-Function Works fine, but when i try to build the same, i get the following error report:
It appears that the build process was unable to locate some utility (e.g. make, compiler, linker, etc.). Please verify your path and tool environment variables are correct. You should be able to execute the make command: .\Radius_S_func2.bat at an MS DOS Command Prompt in the directory: C:\Users\skaushik\Desktop\Matlab Models\WIP\TESTs\Sfunc_2\Radius_S_func2_Source Currently, this generates the following error:
C:\Users\skaushik\Desktop\Matlab Models\WIP\TESTs\Sfunc_2\Radius_S_func2_Source>set MATLAB=C:\MATLAB\R2010b
C:\Users\skaushik\Desktop\Matlab Models\WIP\TESTs\Sfunc_2\Radius_S_func2_Source>.......\u_Utils\Build\make -f Radius_S_func2.mk GENERATE_REPORT=0 INCLUDE_MDL_TERMINATE_FCN=0 COMBINE_OUTPUT_UPDATE_FCNS=1 MAT_FILE=0 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ERT_S_FUNCTION=0 GENERATE_ASAP2=0 EXT_MODE=0 EXTMODE_STATIC_ALLOC=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 EXTMODE_TRANSPORT=0 TMW_EXTMODE_TESTING=0 MODELLIB=Radius_S_func2lib.lib RELATIVE_PATH_TO_ANCHOR=.. MODELREF_TARGET_TYPE=NONE OPTS="-DRT -DUSE_RTMODEL -DERT" The system cannot find the path specified.
PLease guide me how to understand the error, so i can take care of it myself.
Thank you!!
Solution: The build target was not specified therefore matlab gave the above mentioned error. To resolve this one should specify the build environment for a specific target.
I have a matlab function img_process that requires the following parameters : image_name intensity and boundary, so if I run the following on my matlab console :
img_process 'pic1.png' 0.01 1
This will run the function and the image will be processed and I will get a result printed out.
Now I have compiled the script as a windows standalone app named img_process_test. I then try to run it from my command line in windows from the distrib folder like :
img_process_test 'pic1.png' 0.01 1
and it will tell me that error imread , file was not found.
I did try to place the pic1.png in the distrib and src and the img_process_test folders but still it will not work.
Any idea ?
Thank you for looking
I have fixed this. I found a good help here : http://blogs.mathworks.com/loren/2010/12/21/strings-and-numbers-as-arguments/
in case someone stumbles into this and would like to know a workaround.