【发布时间】:2013-05-23 16:05:22
【问题描述】:
我正在尝试在 matlab 上绘制实时序列值,但我无法通过任何演示成功。我的嵌入式系统已经在发送由串行终端检查的数据。当我试图让它们通过 matlab 时,会出现这样的错误:
Warning: Matching failure in format.
??? In an assignment A(I) = B, the number of
elements in B and
I must be the same.
Error in ==> real_time_data_plot at 81 voltage(count) = fscanf(serialObject,'%f'); %#ok<SAGROW>
作为 matlab 中的一个序列,我正在使用这个文件:http://www.mathworks.com/matlabcentral/fileexchange/25519-collect-and-plot-data-from-an-instrument-in-real-time 在嵌入式方面,我只是发送固定值 100 以将错误情况概率降低为
sprintf(str,"%d\n",100);
USART_puts(USART2,str);
该代码可以绘制几个样本,但稍后它会因上述错误通知而崩溃。你有什么建议吗? 谢谢
【问题讨论】:
标签: matlab plot serial-port