Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

MAtlab and Java Please help I have got just 1 week

Status
Not open for further replies.

qamer88

Newbie level 5
Joined
Dec 15, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hello guys.
So in my project I used Matlab for digital image processing and now I want to give matlabs output which is 8x8 matrix to java as input how can I do this what are the my alternatives?
 

kiranvarma3

Junior Member level 1
Joined
Feb 9, 2010
Messages
16
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,283
Activity points
1,368
see actually i dont know about matlab, but i heared about it.
i will provide a solution for ur question.
do one thing, first of all store the matrix o/p as an list of number in notepad. then read the notepad by using java files and streams concept.
now run all these matlab and java program using Batch files programming (its vry easy)
 

horace1

Advanced Member level 5
Joined
Nov 18, 2008
Messages
2,123
Helped
596
Reputation
1,188
Reaction score
573
Trophy points
1,393
Location
Norwich, UK
Activity points
13,071
couple of approaches
1. matlab writes the 8x8 matrix to a text file, starts the java program which then read the file
2. matlab uses TCP/IP to transmit the 8x8 matrix to java (bit more complex than the file)

both of work OK in practice
 

qamer88

Newbie level 5
Joined
Dec 15, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
this is really easy to read a text file (.txt) by using java built-in libraries.
you can read MAT file also but i think it is rather difficult for a beginner. please check this
How can I read MAT files from Java? - MATLAB & Simulink
I have already tried this but I could not download matlab JA, so I am thinking to make java read input from text file, any good source? ( I have already searched in google and I am working on it but good source still will be very helpful
 

horace1

Advanced Member level 5
Joined
Nov 18, 2008
Messages
2,123
Helped
596
Reputation
1,188
Reaction score
573
Trophy points
1,393
Location
Norwich, UK
Activity points
13,071

syeda amna

Full Member level 4
Joined
Jun 1, 2010
Messages
224
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,308
Location
Pakistan
Activity points
2,549
I have already tried this but I could not download matlab JA, so I am thinking to make java read input from text file, any good source? ( I have already searched in google and I am working on it but good source still will be very helpful
if you are a beginner then it is easy to read text file from java.

check these.
YouTube - Java Programming Tutorial - 81 - Reading from Files

Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)

Java Examples - How do I read a text file?
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top