Octave lsim not working, "unable to find function" - matlab

Whenever I try to run the lsim command in Octave, I get
error: invalid function handle, unable to find function for #is_real_matrix
Here's what I am trying to do:
>> n=3*[2 125];
>> d=[1 9 45 125];
>> t=0:0.01:5;
>> x=3*ones(size(t));
>> y=lsim(n, d, x, t);
error: invalid function handle, unable to find function for #is_real_matrix
error: called from
lsim at line 83 column 11
I've loaded in the control package and everything. Could someone tell me what's going on?
I am currently using Octave 6.4.0, and the version of control is 3.2.0.

Related

GUi run properly in matlab file but when converted to exe file doesn't work

I converted matlab code to exe file with deploytool this cod use matlab neural network tool box , when I execute the code it returns the next error:
-- error.
Default value is not a member of type "nntype.training_fcn".
??? Error using ==> nnetParamInfo>nnetParamInfo.nnetParamInfo at 28
FCN is not the name of a function on the MATLAB path.
error using fitnet>get_info (line 88)

ABAQUS errors: File open failed (utl_File: CreateFile in OpenWrite) error: T?

I'm trying to loop an ABAQUS macros in MATLAB. The last bit of the macros is save the CAE file, submit the INP file. I'm using 'system' command in MATLAB to loop this macros.
In MATLAB, the ABAQUS analysis job is completed, but then the following error happened: 
Abaqus JOB L2H1_dynamics COMPLETED
*** Error: File open failed (utl_File: CreateFile in OpenWrite)
error: T
file: C:\Temp\L2H1_dynamics.cae
Abaqus Error: cae exited with an error.
ans =
1
What is OpenWrite? What does error: T mean?
Thank you!
The last bit of the code looks like this:
session.writeXYReport(fileName='abaqus.rpt', xyData=(x0, x1, x2, x3, x4, x5,
x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20))
mdb.saveAs(pathName='C:/Temp/L2H1_dynamics')
a = mdb.models['Model-1'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
mdb.JobFromInputFile(name='L2H1_dynamics',
inputFileName='C:\\Temp\\L2H1_dynamics.inp', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE,
userSubroutine='', scratch='', parallelizationMethodExplicit=DOMAIN,
numDomains=1, activateLoadBalancing=False, multiprocessingMode=DEFAULT,
numCpus=1)
mdb.jobs['L2H1_dynamics'].submit(consistencyChecking=OFF)
I believe error happened because of this bit.
Filenames should be written with the double slash, as you did for your input file name.
>>> mdb.saveAs(pathName='C:\\temp\\test.cae')
The model database has been saved to "C:\temp\test.cae".
Can you run the py script outside matlab so that you can isolate the problem. i.e. using "run script" in abaqus when CAE is already open.

Why am I getting errors when I try to run the "Normalized cuts" demo?

I am trying to use the normalized cuts package from [http://www.cis.upenn.edu/~jshi/software/Ncut_9.zip][1] (on Windows 7 - MATLAB R2010a 32 bits), but it's not working. I'm trying to run the demo called "Ncut Clustering demo" and I got the following error:
??? Undefined function or method 'sparsifyc' for input arguments of type 'double'.
Error in ==> ncut at 41
W = sparsifyc(W,dataNcut.valeurMin);
Error in ==> ncutW at 9
[NcutEigenvectors,NcutEigenvalues] = ncut(W,nbcluster);
Error in ==> demoNcutClustering at 27
[NcutDiscrete,NcutEigenvectors,NcutEigenvalues] = ncutW(W,nbCluster);
I already put the NCUT9 dir in the path so this is not the problem I guess, and I already compile the MEX files with the command: compileDir_simple(mydir).

Matlab: NNTRAINTOOL requires Java which is not available

I am using Windows 7 system.
And trying to use PuTTY to connect to a linux server and run Matlab Neural Network training function on it.
Before I asked question I have looked into some similar question here. But none of them solve my problem.
The command I use to open matlab is:
matlab -nodisplay -nodesktop
And in my code I also set:
net.trainParam.showWindow = false;
But I still got the error:
??? Error using ==> nntraintool at 28
NNTRAINTOOL requires Java which is not available
Error in ==> trainlm>train_network at 228
[userStop,userCancel] = nntraintool('check');
Error in ==> trainlm at 113
[net,tr] = train_network(net,tr,data,fcns,param);
Error in ==> network.train at 107
[net,tr] = feval(net.trainFcn,net,X,T,Xi,Ai,EW,net.trainParam);
Error in ==> generateNN at 49
[net tr] = train(net, features, targets);
Error in ==> sixOutputNN at 30
[ net tr ] = generateNN(features, targets, HIDDEN_LAYER, ...
Error in ==> findBestSixOutputNN at 10
[~, tr] = sixOutputNN(features, targets, configs(i).hidden_layers, ...
Could anyone help me with this. Thank you very much.
Sounds like you need to install a JVM on the host computer. See this web site for some help: http://www.mathworks.com/help/techdoc/matlab_external/f98533.html#f122001
Solution here:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/301204
I just converted the line 33 of nntraintool.m from:
error(message('nnet:Java:NotAvailable'));
to
warning(message('nnet:Java:NotAvailable'));
So that I still remember that there is something fishy going on there!
It works like a charm!
This problem was present even in Matlab 2012a...

Bayes Net Toolbox for Matlab installation error MATLAB R2010b

I am getting an error when try to test Bayes Net Toolbox for Matlab, I am doing the same as the installation shown here but get errors (I have Matlab R2010b):
>> cd 'C:\MATLAB\R2010b\FullBNT-1.0.4'
>> addpath(genpathKPM(pwd))
Warning: Function C:\MATLAB\R2010b\FullBNT-1.0.4\KPMtools\assert.m has
the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In path at 110
In addpath at 87
Warning: Function C:\MATLAB\R2010b\FullBNT-1.0.4\KPMtools\isscalar.m has
the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In path at 110
In addpath at 87
Warning: Function C:\MATLAB\R2010b\FullBNT-1.0.4\KPMtools\isvector.m has
the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In path at 110
In addpath at 87
>> test_BNT
ll =
1.0e-010 *
-0.0670 0.1697
cycle 1 lik -51.5585
cycle 2 lik -45.0863
cycle 3 lik -42.9953
??? Undefined function or method 'finite' for input arguments of type 'double'.
Error in ==> ffa at 71
elseif ((lik-likbase)<(1+tol)*(oldlik-likbase)|~finite(lik))
Error in ==> fa1 at 27
[L1, Psi1, LL1] = ffa(X,k,max_iter);
Error in ==> test_BNT at 8
fa1
>>
As you said: Replace calls to the obsolete finite with isfinite
in
BNT/examples/static/Zoubin/ffa.m and BNT/examples/static/Zoubin/mfa.m
here is a reference
Using newer versions > 7.8
- Replace calls to the obsolete finite with isfinite
in
BNT/examples/static/Zoubin/ffa.m and BNT/examples/static/Zoubin/mfa.m
so test_BNT will now work.