save a .spc-file using Matlab

Hi there,
I am a bit new to this, so sorry for the intrusion if this question is redundant. I am working on a script that needs to change certain values in a .spc-file and save it again using the same filename. The .spc-file itself is actually a column-vector containing real numbers. I tried the following as example:
l1091 = load('D:\...\l1091.spc');
l1091(51) = 10;
l1091(52) = 5;
save D:\...\l1091.spc -ascii
However, this returns a .spc-file of no use as these are ascii-values and I need real numbers again. If I try without -ascii the output is gibberish.
I also tried the GSTools v0.4.3 by Kris de Gussem, but I could not use the GSScpRead and I do not know what kind of variables I have to use for the GSScpWrite function.
Does anyone have some idea to solve this problem? It will be much appreciated.
Sincerely,
Mick

 채택된 답변

Andreas Goser
Andreas Goser 2011년 2월 16일

0 개 추천

I am not totally clear about this question, but my guess is that the exported format does not match the exact format you need for another tool. You have full control over this if you use FOPEN, FPRINTF, FCLOSE to write the file.

댓글 수: 1

Michiel van Wijk
Michiel van Wijk 2011년 2월 16일
Thank you very much Andreas! Works like a charm!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Standard File Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by