I load the matrix from a CSV using fgetl, and want to make sure that it doesn’t change.
How to make the matrix (or any variable) read-only after the values are set?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not use octave, but I see that it has classes now, if it is anything like In Matlab, i’d then use class property.
From matlab help:
I do not know how much different Octave from Matlab, but I read they are not much different, so may be you can see if this works on Octave.
But if you are really worried about your data not changing by mistake, then you can just leave it on disk, and read it each time you want to process or look at it.
Unless it is huge data, this should not be an issue these days.