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

 Akzeptierte Antwort

Andreas Goser
Andreas Goser am 16 Feb. 2011

0 Stimmen

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 Kommentar

Michiel van Wijk
Michiel van Wijk am 16 Feb. 2011
Thank you very much Andreas! Works like a charm!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by