Prev: Significance test and Confidence bound for Correlation scorein Matlab
Next: open file "data.dat"
From: Gergely Takács on 9 Mar 2010 07:00 Dear Ryan; I agree with the previous poster: you need to make sure your file is copied into the XPC Target computer's hard drive. I simply use "xpcexplr", connect and then drag and drop my file - althought there are more elegant solutions. Another mistake I made when trying to use this system was that I used " filename " instead of " 'filename' " in the block... I think you also need to use the "byte unpacking" block between the read from file and scope block in order for this setup to work... g. "Ryan " <ryanfullerton2003(a)yahoo.com> wrote in message <hf3rok$d7n$1(a)fred.mathworks.com>... > Hi, I'm fairly new to the xPC toolbox so I'm trying to start slow... real slow. All I want to do is use simulink blocks to have the xPC target read a file consisting of doubles and ouput the values to a scope. Nothing fancy since I'm just starting out. > > I created an xpc configured file using the xpcbytes2file command. (xpcbytes2file('myfile', x)); Where x was a 1x7 matrix of doubles. This created an extensionless file called 'myfile'. Then my simulink model consisted of only 2 blocks (the xpc target "from file" block and an xpc target scope). I configured the "from file" block to read 'myfile' and set the output size to 8 bytes. When I build the model, the xpc screen gives me an error saying "Error: could not open file myfile". > > What am I doing wrong? This seems very simple. A similar program using the regular "from file" block worked fine on the host computer. I tried adding a .mat extension to myfile, but that didn't work. I tried increasing the output size of the "from file" block, but that didn't work. I assume I'm missing something trivial. Any help would be appreciated. Thanks.
|
Pages: 1 Prev: Significance test and Confidence bound for Correlation scorein Matlab Next: open file "data.dat" |