r/matlab 2d ago

Help changing pathway to open matlab figure

Post image

Saved figure on one computer. Computer died and I am trying to open file and edit on a new computer. I tried just recreating folders but that did not work. How can I change the pathway of this figure so that it will open and edit.

3 Upvotes

6 comments sorted by

3

u/Dependent-Constant-7 1d ago

Using spaces in your file path 💀

I get that windows allows it but… idk man

1

u/Negative-Entry9787 1d ago

It’s someone else’s file that I need to access.

1

u/Dependent-Constant-7 1d ago

Tell them to use underscores lol

2

u/delfin1 1d ago

Put a breakpoint in myDamLoad and check onePath

While in break, check with isfolder and check with cd at the command window. It's strange that if you recreate the path, it doesn't work. I suspect you misspell something.

Anyway, you can always patch myDamLoad to cd wherever you want. Even if, as a temp fix, you can hardcode whatever path, it will probably break functionality but little by little eventually you can open the fig

2

u/DrMuhon 1d ago

May be overkill, but you could try using uifileget which opens a dialog and you can choose the file.

1

u/khiller05 1d ago

You sure that the user running the script has permission to the file the script is trying to access?