From: Rune Allnor on 16 Apr 2010 10:20 On 16 apr, 15:55, "Gareth " <gmj...(a)hotmail.co.uk> wrote: > Rune Allnor <all...(a)tele.ntnu.no> wrote in message <2ee7b505-0417-4829-a9b2-a03fb5591...(a)z3g2000yqz.googlegroups.com>... > > On 16 apr, 15:07, "Gareth " <gmj...(a)hotmail.co.uk> wrote: > > > Rune Allnor <all...(a)tele.ntnu.no> wrote in message <570b5006-17e9-4aa7-ba93-05824fce7...(a)b33g2000yqc.googlegroups.com>... > > > > On 16 apr, 14:20, "Gareth " <gmj...(a)hotmail.co.uk> wrote: > > > > ... > > > > > Can I do this using Matlab? > > > > > Yes. > > > > > Rune > > > > The early signs are positive then! > > > What I am failing to grasp is how to get, say, the pattern of zeros written 'as' the file as opposed to being written as part of the file content. > > > XML files and ASCII codes are only conventions for communicating > > information. We are communicating in English, which means there > > are certain rules about vocabulary and grammar that are typical > > for that language. The difference between English and, say, German > > is exactly vocabulary and grammar. > > > XML is nothing more than a set of grammars. Not even a vocabulary. > > If you want to find out what the XML file expresses, you will need > > to find out what vocabulary the author of that file used. Once you > > do that, it will become more or less obvious what to do with the > > contents of the file. > > > Rune > > Thanks for the replies. I know what the file expresses, it is telling me what data (or zeros) each sector of the original image file (disk image; I should have stated this earlier) contains; my problem is trying to put this into code. How can I create a file that isn't an .m file and say for example, 'write zeros for the first 54 sectors of this file, then write the first part of 'file x' to the next 10 sectors, then write another 25 sectors worth of zeros' So you want to extract the info from the XML file and store it in another file, that says the same thing? I'm not sure you really want that. The whole idea behind XML is to do away with files that only contain numbers, that no one understand how to decode and thus are unmaintanable after the original author of the program left the project, and instead add some semantic context to the numbers so that people have a chance to understand what the file expresses. You seem to want to reverse that process. You might want to look for an XML parser. There might be something in matlab (or maybe in a toolbox). If so, learn how to use it and leave the data in XML format. If you extract the data and store them as plain numbers in some arbitrary file, they will come back to haunt you. Or whoever succeeds you on your project. Rune
From: ImageAnalyst on 16 Apr 2010 11:04 Perhaps is it that you're trying to find out the function names, such as xmlread(), fread(), fprintf(), etc.? (There are examples for those functions in the help.) Or are you looking to hire a consultant that will write up a complete turnkey system for you?
First
|
Prev
|
Pages: 1 2 Prev: command "destroy" jobs in the cluster Next: Automating cropping of an image. |