when I connect MATLAB & MYSQL ,the Error is
init_tmg ================================================================================================== ================================================================================================== You are about to installed the TMG Toolbox to you system. Press any key to continue! ================================================================================================== ================================================================================================== Is MATLAB Database Toolbox installed (yes/no)?: yes Is MySQL installed (yes/no)?: yes Please give the full path to the MySQL Java Connector (jar file): C:\Program Files (x86)\MySQL\Connector J 5.1.23\mysql-connector-java-5.1.23-bin.jar ??? Error using ==> fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
Error in ==> init_tmg at 36 fid=fopen(strcat(matlabroot, filesep, 'toolbox', filesep, 'local', filesep, 'classpath.txt'), 'a'); fprintf(fid, '\n%s', str); fclose(fid);
How can I Deal with this Error????
i was facing the same, but solved this :
step1 : copying the mysql-connector-java-5.1.23-bin.jar file to the c:/programfile/matlab/R2012aStudent/toolbox/local
step2: In the "Please give the full path to the MySQL Java Connector (jar file) :" just provide the file name which is "mysql-connector-java-5.1.23-bin.jar"
no need to give the full path in my case because by default it checks the file in the "c:/programfile/matlab/R2012aStudent/toolbox/local " folder
Related
I am using matlab with python for image processing in which i have to call function from python code in matlab. for that all python and matlab files should be in the same folder.
Everything works fine at my laptop but when i send it to my boss he gets this message " unable to resolve the name " then function name , for example : py.differentiation.dx so the error is " unable to resolve the name py.differentiation.dx " .
He tried to set path for the new folder given by me but still didn't work. we are using the same versions MATLAB 2019b and python 3.7
I began using MatLab and faced problem with setting up path.
%% Set path and file name %Set main folder
defaultFolder=fileparts(fileparts(mfilename('/Users/s2986149/Desktop/MTP/Exported_STL_files/scaphoid_lunate_sl_ligament_smooth.stl')));
pathName=fullfile(defaultFolder,'MTP','Exported_STL_files');
% File name for STL
fileName=fullfile(pathName,'scaphoid_lunate_sl_ligament_smooth.stl');
%% Import a txt type STL file as patch data
[stlStruct] = import_STL(fileName);
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in txtfile2cell (line 16)
T=textscan(fid,'%s','delimiter', '\n','Whitespace','');
Error in import_STL (line 16)
T=txtfile2cell(fileName);
Error in Meshing (line 17)
[stlStruct] = import_STL(fileName);
In the terminal
$ pwd
/Users/s2986149/Desktop/MTP/Exported_STL_files
Thanks in advance
NataCalc
Hi would like to have multiple kickstart files which use a central kickstart file for the bulk of the install and a second file for the small differences. I'm building DVDs for distribution.
The first ks contains small config and has a %include line which points to a common ks file which should do most of the work.
I'm having trouble with %include line.
Fist of all have I understood what %include is for?
Second I think I have the syntax wrong because when I boot I get the following error message:
unable to open input kickstart file: Could not open/read file:///mnt/sysimage/media/dvd/ks/common.cfg
I am installing from a DVD what is the correct path or syntax to the files stored in a sub directory called /ks/ of the DVD's root?
I have tried the following:
%include /mnt/sysimage/media/dvd/ks/common.cfg
%include cdrom:/ks/common.cfg
Does anyone have any working examples?
Thanks in advance for your support
I eventually found part of the answer
%include /mnt/stage2/ks/common.cfg
The dvd is mounted as stage2
However I now get an error message saying it cant read the file
%%include
I can see the file and less it if I hit ctrl + alt + F1
Does anyone have a working simple example of how this should be written?
Open your isolinux/isolinux.cfg from the OS and give the ks file path as below . You can enter your kick start option in boot: prompt of dvd
label 1
kernel vmlinuz
append initrd=initrd.img nofb skipddc lang= devfs=nomount ramdisk_size=8192 ks=cdrom:/option1.cfg 1
label 2
kernel vmlinuz
append initrd=initrd.img nofb skipddc lang= devfs=nomount ramdisk_size=8192 ks=cdrom:/option2 2
label 3
kernel vmlinuz
append initrd=initrd.img nofb skipddc lang= devfs=nomount ramdisk_size=8192 ks=cdrom:/option3.cfg 3
Then edit /isolinux/boot.msg and add the enter the below details
Select installation:
1) option 1
2) option 2
3) option 3
I am new to Statistical Pattern Recognition Toolbox in matlab.
I am trying to use the oaasvm function in this toolbox. Before using this I need to run the compilemex.m. But when I run it I get the following error
>> compilemex
Compiling MEX files of STPRtool...
mex -O -IC:\Program Files\MATLAB\R2013a\toolbox\stprtool\kernels -outdir C:\Program Files\MATLAB\R2013a\toolbox\stprtool\kernels C:\Program Files\MATLAB\R2013a\toolbox\stprtool\kernels\kernel.c C:\Program Files\MATLAB\R2013a\toolbox\stprtool\kernels\kernel_fun.c
Error using mex (line 206)
The destination directory "C:\Program" cannot be found.
Error in compilemex (line 113)
eval(mexstr);
Can anyone tell how shall I proceed to run the oaasvm code?
As explained by Schorsch in the comments, you need to add quotes around path strings to handle spaces in them.
The fix is easy, edit the file compilemex.m, look for the following section (line 102), and make the below changes:
% -- Compile functions -----------------------------
for i=1:length(fun),
mexstr = ['mex -O -I''' translate(fun(i).include,root) ...
''' -outdir ''' translate(fun(i).outdir, root) ''' '];
for j=1:length(fun(i).source),
mexstr = [mexstr '''' translate(char(fun(i).source(j)),root) ''' '];
end
fprintf('%s\n',mexstr);
eval(mexstr);
end
Basically I've added single quotes (escaped by singe quote) around path strings. The result is that the commands executed will be of the form:
mex -O -I'C:\Documents and Settings\Amro\Desktop\stprtool\kernels'
-outdir 'C:\Documents and Settings\Amro\Desktop\stprtool\kernels'
'C:\Documents and Settings\Amro\Desktop\stprtool\kernels\kernel.c'
'C:\Documents and Settings\Amro\Desktop\stprtool\kernels\kernel_fun.c'
Note that you dont have to place this package inside the MATLAB installation. You can place the extracted folder anywhere on your system, as long as you add it to the MATLAB path addpath
I did set up the hadoop Ubuntu OS, followed all the necessary steps,
1.created the hdfs file system
2.Moved the text files to input directory
3.having privilege to access all the directories.
but when run the simple word count example, i got
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/user/root/input
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:224)
but, input path is valid and even can able view the files in that path from eclipse itself, so plz assist were i am wrong.
attached the screenshot for the reference
Add the following 2 lines in your code :
config.addResource(new Path("/HADOOP_HOME/conf/core-site.xml"));
config.addResource(new Path("/HADOOP_HOME/conf/hdfs-site.xml"));
Your client is looking into the local FS.
For hadoop-2.2.0 on windows 7, I added the below lines and it solved the issue (NOTE: My Hadoop Home is: C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0)
Configuration conf = new Configuration();
conf.addResource(new Path("C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0\etc\hadoop\core-site.xml"));
conf.addResource(new Path("C:\MyWork\MyProjects\Hadoop\hadoop-2.2.0\etc\hadoop\hdfs-site.xml"));