custom header for touchstone file

조회 수: 3 (최근 30일)
Neil Hamilton
Neil Hamilton 2019년 8월 9일
편집: Scotty Neally 2020년 11월 10일
Is there a way when creating a touchstone file with rfwrite to add additioanl information to the header?
Or a way to add these extra header lines to an existing file of the s2p type?
  댓글 수: 1
Saket Chirania
Saket Chirania 2020년 6월 2일
Hi Neil,
We can use the rfwrite command to create a Touchstone file in multiple way. These are some common way to use these commands:
  • rfwrite(data,freq,filename) creates a Touchstone data file, filename. rfwrite touchstone files output 16 digits.
  • rfwrite(netobj,filename) creates a Touchstone file from a network parameter object, netobj.
  • rfwrite(_____,Name,Value) creates a Touchstone file using the options in the name-value pair arguments following the filename.
However, I don't think it is possible to add additional information to the header using rfwrite command.
Since, Touchstones files are text files you can use some text command to read in and modify the file if you want to append the header manually. The link below describes about writing data to text file
I hope this helps.

댓글을 달려면 로그인하십시오.

답변 (1개)

Scotty Neally
Scotty Neally 2020년 11월 10일
편집: Scotty Neally 2020년 11월 10일
Consequently I'm looking for the same function...I've solved this in the past by using a dos copy cmd to append the header file + matlab rfwrite output. While it works, (very fast for multi-GB snp) its not a very pretty solution...
The key is to add 2 newline chars to the end of your header file before appending.
Thanks,
-Scotty

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by