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

조회 수: 24 (최근 30일)
Ravi
Ravi 2013년 7월 9일
답변: Mohammad Kia 2017년 6월 17일
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에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by