How to diplay the printf statement which is written in S-function?

20 次查看(过去 30 天)
Hello MATLAB Frndzz,
I am using R2011b linux version... In s-function i have used printf statement like printf("Unable to open PCI Image");
So when i run s-function it has to display that in Command window or somewhere in MATLAB.. Dont mind about linux or windows version... Just i need support for my question...
Thanks in advance...
---ravi

采纳的回答

Kaustubha Govind
Kaustubha Govind 2013-7-10
编辑:Kaustubha Govind 2013-7-10
You can use ssPrintf.
  1 个评论
Ravi
Ravi 2013-7-11
printf("0x%x",idata.pciAddress); printf("0x%x",idata.vmeAddress); printf("0x%d",idata.size); printf("0x%d",idata.dataWidth); printf("0x%d",idata.vmeCycle);
if i use ssprintf here... the error is "undefined reference to ssprintf" & warning: incompatible implicit declaration of built-in function printf

请先登录,再进行评论。

更多回答(1 个)

Mohammad Kia
Mohammad Kia 2017-6-17
do not include stdio.h in your code, it will re-target the standard io functions. it will work.

类别

Help CenterFile Exchange 中查找有关 Block and Blockset Authoring 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by