I'm using ksvdbox for my research. After installing as guided in Readme, I run ksvddemo. I throws the following error:
Attempt to execute SCRIPT sprow as a function:
C:\Users\thdo\Documents\MATLAB\ClassificationV2\ClassificationV2\ksvdbox\private_ccode\sprow.m
Error in ksvd>optimize_atom (line 515)
[gamma_j, data_indices] = sprow(Gamma, j);
Error in ksvd (line 449)
[D(:,p(j)),gamma_j,data_indices,unused_sigs,replaced_atoms] = optimize_atom(data,D,p(j),Gamma,unused_sigs,replaced_atoms);
Error in ksvddemo (line 74)
[Dksvd,g,err] = ksvd(params,'verbose');
In ksvdbox, there is a script named "sprow.m" but there is no code inside this file, only comments. In fact, there is another file named "sprow.c" in the same folder. I tried to rename "sprow.m" but it throws another error:
Underfined function or variable 'sprow'
The interesting thing is that the code works for Matlab2014a, but the errors happen on Matlab2015b.
Could you please suggest me a solution?
Related
I am trying to run an OpenModelica script using a DOS .bat file. But facing some issues.
The batch file runmodelica.bat has
%OPENMODELICAHOME%\bin\omc testscript.mos
The file testscript.mos is
loadModel(Modelica)
getErrorString()
loadFile("HelloWorld.mo")
simulate(HelloWorld)
getErrorString()
If I run the commands in the testscript.mos file from an OM Shell by changing to that directory, everything works fine. But If I run the batch file from the DOS prompt, I get the following error
Error processing file: testscript.mos
[C:/Users/blahblah/testscript.mos:2:1-2:1:writable] Error: Missing token: ASSIGN
# Error encountered! Exiting...
# Please check the error message and the flags.
Execution failed!
The HelloWorld.mo file comes with the standard installation and I haven't modified it
class HelloWorld
Real x(start = 1);
parameter Real a = 1;
equation
der(x) = - a * x;
end HelloWorld;
I am new to OpenModelica and searched online but couldn't find a solution. Any help is appreciated.
All the commands run in the OM Shell but not when invoked from the bat file.
The script code needs to be valid Modelica, so you need ; after each command.
loadModel(Modelica);
getErrorString();
loadFile("HelloWorld.mo");
simulate(HelloWorld);
getErrorString();
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 );
Getting ReferenceError: swDest is not defined when trying to run Workbox 6.
In my sw_build.js file I have that I call with node sw_build.js in my package.json file...
In the console I see this as the output:
It appears as though the files get created?, I just don't understand why I'm getting the odd error.
Your swDest reference is in line 16, and swDest is not defined. That's why the file is created but error occurs. I think you copied the example code without modification on this line.
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??
I'm working on some helpful method in my entity.
private function setApi($api_address,$api_username,$api_password){
$this->api_address = $api_address;
$this->api_username = $api_username;
$this->api_password = $api_password;
$this->api_client = new SoapClient($api_address); // error
}
Warning: require(App/Entity/SoapClient.php): failed to open stream: No such file or directory in /zendboilerplate/library/Doctrine/Common/ClassLoader.php on line 148 Fatal error: require(): Failed opening required 'App/Entity/SoapClient.php' (include_path='/zendboilerplate/application/../library:/zendboilerplate/application/../library/Bisna/Application/Resource:/zendboilerplate/library:.:/usr/share/php:/usr/share/pear') in /zendboilerplate/library/Doctrine/Common/ClassLoader.php on line 148
It seems that zend looks for a class declaration (and it doesn't use included classes in php).
Identical error for each "new Class" declaration.
Using a my own class included in library everything is ok.
(Also tried with #new SoapClient() but no result).
I'm guessing this is namespace related. Try changing the line that is erroring to:
$this->api_client = new \SoapClient($api_address);
that should force it to use the PHP SoapClient instead of the namespace that is presumably declared at the start of the file you're having trouble with.