1

Let's say I have an array of the bytes of a mat file loaded into my Matlab shell. One way to parse this data is to write it to the disk, and then use Matlab load function. Is there a way to do that without writing to the hard drive (on windows)?

I know that in unix I might be able to write the data to a named pipe and load from it, but I don't think this would work in windows.

The only solution I could think of is using a Ram Disk. Will be glad to hear other ideas.

Dani
  • 73
  • 8
  • You probably know that Windows also has named pipes[http://msdn.microsoft.com/en-us/library/aa365590(v=VS.85).aspx]? It seems like they work slightly differently from unix, but it looks like you could then access them through `\\.\pipe\foo`, so maybe even try `load('\\.\pipe\foo.mat')` directly. The caveat is "only" to implement the pipe server... – Jonas Heidelberg May 14 '11 at 09:29

1 Answers1

2

I would probably go to the clipboard. At least in R2011b, you can both import from and save data to the clipboard:

doc clipboard tells about writing to (and reading from) the clipboard

doc importdata gives the following snippet:

[...] = importdata('-pastespecial', ...) loads data from the system clipboard rather than from a file
sage
  • 4,863
  • 2
  • 44
  • 47