Problem with writing to PROGMEM

#define SIZE 8
#define LINES 8

float myMatrix[LINES][SIZE] PROGMEM;

void writeToFlash(float line[SIZE]){
  myMatrix[0][0] = line[0];

I get: In function 'void writeToFlash(float*)': error: assignment of read-only location 'myMatrix[0][0]

Why is this? I want to store data in myMatrix in PROGMEM (Flash) when ever I call the function writeToFlash.

How can I solve this?

There are three kinds of memory:

The PROGMEM is read-only, as far as your sketch is concerned. You can't change it. Only the "Upload sketch from PC to Arduino" feature on your computer can do that. Variables with PROGMEM are stored in this read-only memory, which saves RAM but can't be changed.

The RAM is read/write, and is where all your variables are stored while your sketch runs. Variable values are lost when power goes out, and your sketch re-initializes them when it starts at the beginning again.

The EEPROM is read/write, and won't disappear when you turn off the power. But the only way to use it is by having your code use the EEPROM.write() and you read it back later with

Ahh, thank you for the awnser.

So if I'd like to logg somewhitng while running my program I only have 2kb (on the 328p) to play with. Then I guess I need more memory...

Look into using an external EEPROM (relatively easy), or a SD or compact flash card (more difficult). There are topics in the playground for both.