Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Can't save MATLAB file?

Subject: Can't save MATLAB file?

From: Cory

Date: 6 Mar, 2012 11:03:11

Message: 1 of 2

Hi all,

I'm having trouble saving a MATLAB file. After running my code, all of the following save attempts fail with the same error:

>> save(['Out/love.mat'],'C')
??? Index exceeds matrix dimensions.
>> save(['love.mat'],'C')
??? Index exceeds matrix dimensions.
>> save(['whymatlab.mat'],'C')
??? Index exceeds matrix dimensions.
>> save(['whymatlab'],'C')
??? Index exceeds matrix dimensions.

>> C

C =


I've included multiple attempts and the variable to show that it's not, e.g., that the folder "Out" does not exist.

It's not my computer, either, since

>> clear
>> C = 16;
>> save(['whymatlab'],'C')

works fine.

For what it's worth, the relevant line in the code gets the orange flag: "the operation or expression <Indexing> has no evident effect"

I'll include any code as per request, but I really have no idea what's relevant.

Thanks for all the help!


Subject: Can't save MATLAB file?

From: Cory

Date: 6 Mar, 2012 12:06:11

Message: 2 of 2

Found the error. No further help required. Thank you.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us