This error happens because matlab can not find out the java.
The solution is very simple, add follow line to the ~/.bashrc file:
export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre
Wednesday, January 12, 2011
SVN connection with a different port number
Some times the port to the server has been changed, such that we must change the default port (25) to the new port. Here is the solution:
1. Find out the file ~/.subversions/config
2. Add follow line: sshtunnels=ssh -p newportnummer. Save the file and exit.
3. Checkout the server svn repository by: svn co svn+sshtunnels://hostname@hostip/pathToSvnRepository
That's it.
1. Find out the file ~/.subversions/config
2. Add follow line: sshtunnels=ssh -p newportnummer. Save the file and exit.
3. Checkout the server svn repository by: svn co svn+sshtunnels://hostname@hostip/pathToSvnRepository
That's it.
Tuesday, November 9, 2010
Let your folders become secret
Under Linux, maybe some files that you don't want to share with others, so the best way is to encrypt the secret files.
Here I introduce a simple way for Ubuntu or other linux users:
First install CFS:
$ apt-get install cfs
Make a folder where you want to keep secret files.
$ cmkdir Secret
Now input your password (At least 16 characters). You have to remember it.
Attach a folder to show the secret context in "Secret" and might add more files to "Secret":
$ cattach Secret tmp
Now input the mentioned password.
Check the context of folder "Secret":
$ cd /crypt/tmp
$ ls
You will see all files that have been encrypted in "Secret", are now shown in "/crypt/tmp".
Now you can add more files in "/crypt/tmp":
$ cp some.txt /crypt/tmp/
After changing the "/crypt/tmp" folder, you have to encrypt the folder:
§ cdetach tmp
Now the folder "/crypt" become empty. However, you can check the encrypted file is added in "Secret" now.
That's it!
Here I introduce a simple way for Ubuntu or other linux users:
First install CFS:
$ apt-get install cfs
Make a folder where you want to keep secret files.
$ cmkdir Secret
Now input your password (At least 16 characters). You have to remember it.
Attach a folder to show the secret context in "Secret" and might add more files to "Secret":
$ cattach Secret tmp
Now input the mentioned password.
Check the context of folder "Secret":
$ cd /crypt/tmp
$ ls
You will see all files that have been encrypted in "Secret", are now shown in "/crypt/tmp".
Now you can add more files in "/crypt/tmp":
$ cp some.txt /crypt/tmp/
After changing the "/crypt/tmp" folder, you have to encrypt the folder:
§ cdetach tmp
Now the folder "/crypt" become empty. However, you can check the encrypted file is added in "Secret" now.
That's it!
Friday, September 24, 2010
Nautilus open folder from terminal
Great command....
You can open current folder from terminal command line....
You can open current folder from terminal command line....
Friday, April 30, 2010
Novel words
"Copy from one, it's plagiarism; copy from two, it's research." Wilson_Mizner
"I respect faith, but doubt is what gets you an education." Wilson_Mizner
"I respect faith, but doubt is what gets you an education." Wilson_Mizner
Monday, March 15, 2010
A small bug in "Camera Calibration Toolbox for Matlab"
Today, when I use the toolbox for calibration, it gives a error :
"
??? Error using ==> eq
Matrix dimensions must agree.
Error in ==> loadpgm at 68
elseif ~any(c == white)
"
The images is PGM format. These errors come from "loadpgm.m" file. I find that when the error happens, the c is empty, which means the reader pointer is getting the end of file.
In the "loadpgm.m" file, the program likes:
"
maxval = fscanf(fid, '%d', 1);
while 1
c = fread(fid,1,'char');
if c == '#',
fgetl(fid);
elseif ~any(c == white)
fseek(fid, -1, 'cof'); % unputc()
break;
end
end
"
The program read maxval correctly, so it is going on and checking next value, if it's '#' or says 35, then the program will read a row line. What happens here, the interesting thing is the first image data value is 35, which is not '#', but just a interger value 35. The program "think" it's '#', and get the whole line which contain all image data, so next time ,it finds it goes to end of file.
I change the first image data to 36, then it works very well. The matlab function imread works well here for this special case.
"
??? Error using ==> eq
Matrix dimensions must agree.
Error in ==> loadpgm at 68
elseif ~any(c == white)
"
The images is PGM format. These errors come from "loadpgm.m" file. I find that when the error happens, the c is empty, which means the reader pointer is getting the end of file.
In the "loadpgm.m" file, the program likes:
"
maxval = fscanf(fid, '%d', 1);
while 1
c = fread(fid,1,'char');
if c == '#',
fgetl(fid);
elseif ~any(c == white)
fseek(fid, -1, 'cof'); % unputc()
break;
end
end
"
The program read maxval correctly, so it is going on and checking next value, if it's '#' or says 35, then the program will read a row line. What happens here, the interesting thing is the first image data value is 35, which is not '#', but just a interger value 35. The program "think" it's '#', and get the whole line which contain all image data, so next time ,it finds it goes to end of file.
I change the first image data to 36, then it works very well. The matlab function imread works well here for this special case.
Wednesday, March 3, 2010
The errors and solutions when compiling the levmar with lapack
Well, there are a lot of errors. I google a lot to find solutions, and I add them here. Good for newbies.
Q1. undefined reference to `MAIN__'
S: add '-u MAIN_' in the GCC part of Makefile
Q2. undefined symbol: _gfortran_concat_string
S: add '-gfortran' in the GCC part of Makefile
Q3. misuse the command matlab mex with the command mex from pdfTeXK.
S: replace 'mex' by whole directory '/where your matlab is/bin/mex' in Makefile
Q4. multiple definition of `xerbla_'
S: set 'LAPACKBLASLIBS_PATH=/usr/lib/atlas' in the Makefile of matlab subfolder
Q1. undefined reference to `MAIN__'
S: add '-u MAIN_' in the GCC part of Makefile
Q2. undefined symbol: _gfortran_concat_string
S: add '-gfortran' in the GCC part of Makefile
Q3. misuse the command matlab mex with the command mex from pdfTeXK.
S: replace 'mex' by whole directory '/where your matlab is/bin/mex' in Makefile
Q4. multiple definition of `xerbla_'
S: set 'LAPACKBLASLIBS_PATH=/usr/lib/atlas' in the Makefile of matlab subfolder
Subscribe to:
Posts (Atom)