I try to install CVX in MATLAB but it still cannot complete. There are some error massages occurring during installation process. I have attached them already. Please see below
UNEXPECTED ERROR:
------------------------------------------------------------------------
Invalid MEX-file
'C:\Users\PAE\Downloads\Compressed\cvx-w64-tar\cvx\sdpt3\Solver\Mexfun\mexnnz.mexw64':
C:\Users\PAE\Downloads\Compressed\cvx-w64-tar\cvx\sdpt3\Solver\Mexfun\mexnnz.mexw64
is not a valid Win32 application.
.
Error in ==> checkdepconstr at 97
nnzmatold = mexnnz(AAt);
Error in ==> sqlpmain at 88
[At,b,y,indeprows,par.depconstr,feasible,par.AAt] = ...
Error in ==> sqlp at 241
[obj,X3,y,Z3,info,runhist] = ...
Error in ==> cvx_run_solver at 50
[ varargout{1:nargout} ] = sfunc( inputs{:} );
Error in ==> cvx_sdpt3>solve at 362
[ obj, xx, y, zz, info ] = cvx_run_solver( #sqlp, blk, Avec, Cvec,
b, OPTIONS, 'obj', 'x', 'y', 'z', 'info', settings, 5 ); %#ok
Error in ==> cvxprob.solve at 429
[ x, status, tprec, iters ] = shim.solve( At, b, c,
cones, quiet, prec, solv.settings, eargs{:} );
Error in ==> cvx_end at 88
solve( prob );
Error in ==> cvx_setup at 213
cvx_end
------------------------------------------------------------------------------------------
Please report this error to support, and include entire output of
CVX_SETUP in your support request.
---------------------------------------------------------------------------
I try to find the solution for this problem in GOOGLE but I cannot find it.
Related
I'm for now compiling in CPU version.I am working on matlab 2020a.I've tried to remove the vl_nnconv.m from matconvnet but i still get the following error.
Also the matconvnet i'm using is version matconvnet-1.0-beta25 I'm stuck here since 2 days ,could somebody lease help me out with this issue?
https://github.com/XinLi-zn/TADT
The above is the github code i'm trying to work on.
Foloowing are the errors i'm getting:
Error using vl_nnconv
The option name is not a string (argument number 5)
Error in dagnn.Conv/forward (line 11)
outputs{1} = vl_nnconv(...
Error in dagnn.Layer/forwardAdvanced (line 85)
outputs = obj.forward(inputs, {net.params(par).value}) ;
Error in dagnn.DagNN/eval (line 91)
obj.layers(l).block.forwardAdvanced(obj.layers(l)) ;
Error in get_subwindow_feature (line 37)
net_feat.eval({'input',gpuArray(patch_sw)});
Error in tadt_tracking (line 63)
feat_groups = get_subwindow_feature(net_feat, img, sw_location, input_sz, feat_layer);
Error in Demo_TADT (line 23)
[result, fps]=tadt_tracking(seq_info.img_list, seq_info.gt(1,:), vgg16_model_path, display);
the following are the functions that is causing the error and the argument is obj.pad
function outputs = forward(obj, inputs, params)
if ~obj.hasBias, params{2} = [] ; end
outputs{1} = vl_nnconv(...
inputs{1}, params{1}, params{2}, ...
'pad', obj.pad, ...
'stride', obj.stride, ...
obj.opts{:}) ;
end
I am trying to run inputfile_calrel_example1 FERUM Matlab scripts from https://www.sigma-clermont.fr/en/ferum in Octave-5.1.0.0 but run into errors with respect to print_usage and fzero as follows:
error: Invalid call to fzero. Correct usage is:
-- fzero (FUN, X0)
-- fzero (FUN, X0, OPTIONS)
-- [X, FVAL, INFO, OUTPUT] = fzero (...)
error: called from
print_usage at line 91 column 5
fzero at line 133 column 5
drho0_dthetaf_integral at line 75 column 22
mod_corr_solve at line 99 column 54
form at line 90 column 58
ferum at line 129 column 33
>>
Looking through print_usage.m file reveals line 91 as follows:
error ("Octave:invalid-fun-call", msg);
while lines 78 to 92:
if (at_toplev)
error ("Octave:invalid-fun-call",
"Invalid call to %s. Correct usage is:\n\n%s\n%s",
name, usage_string, __additional_help_message__ ());
else
msg = sprintf ("Invalid call to %s. Correct usage is:\n\n%s",
name, usage_string);
## Ensure that the error doesn't end up with a newline, as that disables
## backtraces.
if (msg(end) == "\n")
msg(end) = " ";
endif
error ("Octave:invalid-fun-call", msg);
endif
and fzero lines 132 to 134 are as follows:
if (nargin < 2 | nargin > 3)
print_usage (mfilename ());
end
I would like to have hints as to how to resolve the above error messages.
Best regards
Aliyu Aziz
As stated in the comments, fzero was called with the following arguments.
drho0_dthetafi.mu = fzero( ...
'betadrho0_dthetaf' ...
, 0 ...
, optimset('fzero') ...
, dF_dthetafi.mu ...
, PHI2 ...
, F ...
, dPHI2_dZi ...
, dZi_dthetafi.mu ...
, dPHI2_drho0 ...
, detJ ...
, WIP ...
);
From the documentation (help fzero) you can see that the above call is not a valid fzero call:
-- fzero (FUN, X0, OPTIONS)
Find a zero of a univariate function
FUN is a function handle, inline function, or string containing the
name of the function to evaluate.
X0 should be a two-element vector specifying two points which
bracket a zero. If X0 is a single scalar then several nearby and distant
values are probed in an attempt to obtain a valid bracketing. If this is not
successful, the function fails.
OPTIONS is a structure specifying additional options.
To initialize an options structure with default values for 'fzero'
use 'options = optimset ("fzero")'.
So as you see, the extra arguments after 'optimset' trigger an error.
I'm assuming that the extra arguments were intended to be arguments to the betadrho0_dthetaf function. In general the function FUN expects a single argument (since it is univariate). If your betadrho0_dthetaf function expects a number of other parameters, then instead of using it in fzero via string, wrap it around an anonymous function handle which does only take a single argument, and uses your intended function internally to calculate the intended result, e.g.
drho0_dthetafi.mu = fzero( ...
#(x) betadrho0_dthetaf( ...
x ...
, dF_dthetafi.mu ...
, PHI2 ...
, F ...
, dPHI2_dZi ...
, dZi_dthetafi.mu ...
, dPHI2_drho0 ...
, detJ ...
, WIP ...
) ...
, 0 ...
, optimset('fzero') ...
);
or something along those lines, depending on how you would call that beta function.
I try to run the following code on matlab:
syms a c mu epsi real
epsi=10
eq_1=(0.5*pi^2-mu+2*epsi)*a+2*epsi*c-0.25*(3*a^3+3*a^2*c+6*a*c^2);
eq_2=(4.5*pi^2-mu+2*epsi)*c+2*epsi*a-0.25*(a^3+6*a^2*c+3*c^3);
[a_mu c_mu ]=solve(eq_1,eq_2,a,c)
N_prime=diff(0.5*(a_mu.^2+c_mu.^2),mu)
and I get the following error:
??? Error using ==> eq
Out of memory. Type HELP MEMORY for your options.
Error in ==> sym.sym>char2sym at 377
if isempty(x) || all(x == ' ') || strcmp(x,'{}')
Error in ==> sym.sym at 95
S = char2sym(x);
Error in ==> sym.maple at 92
result = sym(result,'keepijalias');
Error in ==> sym.diff at 50
R = reshape(maple('map','diff',S(:),x),size(S));
Error in ==> Untitled4 at 10
N_prime=diff(0.5*(a_mu.^2+c_mu.^2),mu)
how can I solve it?
I am trying to complie a .cc file to mex, and I am using mex filename command in Matlab. My complier is [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012b\sys\lcc .
However, there are some errors:
lcc preprocessor error: learn.cc:5 Could not find include file <sys/time.h>
Error learn.cc: 70 illegal statement termination
Error learn.cc: 70 skipping `int'
Error learn.cc: 70 undeclared identifier `alen'
Error learn.cc: 71 illegal statement termination
Error learn.cc: 71 skipping `int'
Error learn.cc: 71 undeclared identifier `blen'
Error learn.cc: 87 invalid struct field declarations
Error learn.cc: 87 syntax error; found `collapsed' expecting `}'
Error learn.cc: 87 skipping `collapsed' `*' `x'
Error learn.cc: 93 unrecognized declaration
Warning learn.cc: 93 empty declaration
Error learn.cc: 97 undefined size for `incomplete struct timeval defined at learn.cc 97 tp'
Error learn.cc: 99 unknown field `tv_usec' of `incomplete struct timeval defined at learn.cc 97'
Error learn.cc: 102 syntax error; found `double' expecting `;'
Error learn.cc: 103 syntax error; found `double' expecting `;'
Error learn.cc: 106 missing parameter type
Error learn.cc: 106 syntax error; found `X' expecting `)'
Error learn.cc: 106 skipping `X' `,'
Error learn.cc: 106 syntax error; found `double' expecting `{'
Error learn.cc: 106 missing identifier
Error learn.cc: 106 too many errors
I guess the reason for the first error is that there is no time.h file in the sys folder. Instead there is timeb.h file. But I don't know the reason to the following errors.
Here are some relative codes:
line 70 int alen = **((int **)a);
line 71 int blen = **((int **)b);
line 86-93 struct data {
collapsed *x;
int num;
int numblocks;
int *blocksizes;
float *regmult;
float *learnmult;
};
line 96-100 void seed_time() {
struct timeval tp;
check(gettimeofday(&tp, NULL) == 0);
srand48((long)tp.tv_usec);
}
line 102 static inline double min(double x, double y) { return (x <= y ? x : y); }
line 103 static inline double max(double x, double y) { return (x <= y ? y : x); }
Can anyone give me a hint?
As far as i can tell, there is nothing wrong with lines 70,71. Are a,b integer double arrays declared and allocated with something like:
int ** a = malloc(4 * sizeof(int*) );
for (int var = 0; var < 4; ++var) {
a[var] = malloc(3*sizeof(int));
}
?
Are you sure that the sys/time.h file can be replaced by sys/timeb.h file? Have you tried?
sys/time.h looks like a pretty linux/unix specific file. Are you sure that the sys/ folder refers to your matlab sys directory (C:\PROGRA~1\MATLAB\R2012b\sys\lcc)?
In general, it looks like you are trying to compile a linux .mex file on a windows machine. For example gettimeofday is a linux pure call (according to this answer):
Equivalent of gettimeday() for Windows
I would like to read .yml files in Matlab. These files contain coordinates x and y of key points on a face image. I looked for different tools but I don't seem to find any answers.
My .yml files look like this
YAML:1.0
Image file: "00032009.jpg"
Contours count: 8
Contours:
-
Name: FO
Count: 41
Closed: 0
Points:
-
x: 682.5947265625000000
y: 743.1998901367187500
-
x: 685.9638061523437500
y: 771.3800659179687500
......
and so on
Note 00032009.jpg is an image of a face
x and y are coordinates of a point on a face Eg: the right corner of an eye etc
Could you please point out a way to read the file and then display the points on the face image?
Edit 1: Here is the error I get
Error: File: ReadYamlRaw.m Line: 14 Column: 11
Expression or statement is incorrect--possibly unbalanced (, {, or [.
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
What is weird is line 14 in ReadYamlRaw.m
[pth,~,~]= fileparts(mfilename('fullpath'));
Parse error at ','(second one) and ']' usage appears to be invalid matlab syntax.
So what is the use of ~ in there and why is there an error?
Edit2: I replaced the ~ in the line above with dummy variables then I get this errors O_O
Error using ==> ReadYamlRaw>scan at 81
Unknown data type: logical
Error in ==> ReadYamlRaw>scan_map at 138
result.(ich) = scan(r.get(java.lang.String(ich)));
Error in ==> ReadYamlRaw>scan at 79
result = scan_map(r);
Error in ==> ReadYamlRaw>scan_list at 116
result{ii} = scan(i);
Error in ==> ReadYamlRaw>scan at 77
result = scan_list(r);
Error in ==> ReadYamlRaw>scan_map at 138
result.(ich) = scan(r.get(java.lang.String(ich)));
Error in ==> ReadYamlRaw>scan at 79
result = scan_map(r);
Error in ==> ReadYamlRaw>load_yaml at 48
result = scan(yaml.load(fileread([filename, fileext])));
Error in ==> ReadYamlRaw at 19
result = load_yaml(filename, nosuchfileaction);
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
I also tried with a different yml file that looks like this
%YAML:1.0
RE-C:
x: 919
y: 580
LE-C:
x: 1209
y: 597
N-C:
x: 1063
y: 698
FO-B:
x: 1045
y: 1114
REL-O:
x: 852
y: 597
REL-I:
x: 986
y: 600
REL-T:
x: 918
y: 564
And I get the following errors
Java exception occurred:
while scanning a directive
in "<string>", line 1, column 1:
%YAML:1.0
^
expected alphabetic or numeric character, but found :(58)
in "<string>", line 1, column 6:
%YAML:1.0
^
at org.yaml.snakeyaml.scanner.ScannerImpl.scanDirectiveName(ScannerImpl.java:1028)
at org.yaml.snakeyaml.scanner.ScannerImpl.scanDirective(ScannerImpl.java:990)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchDirective(ScannerImpl.java:534)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:251)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179)
at
org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:198)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:399)
Error in ==> ReadYamlRaw>load_yaml at 48
result = scan(yaml.load(fileread([filename, fileext])));
Error in ==> ReadYamlRaw at 19
result = load_yaml(filename, nosuchfileaction);
Error in ==> ReadYaml at 38
ry = ReadYamlRaw(filename, 0, nosuchfileaction);
Maybe someone can make something out of these or you could point out another set of functions that would work? I searched but didn't find any except this one.
It's YAML file indeed (as #DavidBrown mentioned in his comment, the extension does not matter). But it has some problems. Don't know if it's due to wrong YAML format or MATLAB implementation.
I've installed YAMLMATLAB and played a little with your file.
YamlStruct = ReadYaml(yaml_file);
YAMLMATLAB returns error if the files is feed as is. It works only if I comment the first line and remove spaces from field names. So the beginning of the file looks like this:
#YAML:1.0
Imagefile: 00032009.jpg
Contourscount: 8
...skipped the rest...
Then I get the correct structure. For example you can access the 1st point's x coordinate as
YamlStruct.Contours{1}.Points{1}.x
ans =
682.5947
UPDATE
Space in filed names is actually a known problem in YAMLMATLAB. See the report and possible solution here.
UPDATE 2
According to comment from #Jirka_cigler (YAMLMATLAB developers group):
In the program release 0.4.3 we added support for whitespaces in field
names, so the problem should not appear again.
Great!
I've also removed previous developers comment on the problem in the first UPDATE since it's not true any more.
ZozaniDB Database Toolbox comes with a Matlab-native YAML implementation that handles the .yml file here. To parse a string or a file, use:
>> yaml_parse ( str )
>> yaml_read ( filename )