problems with saving and loading inside functions
이전 댓글 표시
Hi, I am trying to understand the logic behind the save and load commands in Matlab.
I have a script file of variables at the end of which I have created a directory ( var) and saved most of my variables. Then I have a function ( f1), inside which I have loaded the variables I need for the function. This function gives me a variable ( y1). After applying f1, I save y1 (so it overwrites what was already in var). Then I have another function (f2), which needs to use some of the variables in 'var'. but when inside f2, I try to load the variables using 'load var/x.mat' (where x is the folder where all the variables are saved), none of the variables apart from y1 are loaded (recognized).
Any hints would be appreciated.
Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!