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 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by