question regarding saving variables from internal matlab files

1 view (last 30 days)
Hello everyone! i am currently trying to save a variable named Q located in the following path: C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\vision\vision\+vision\+internal\+calibration\StereoParametersImpl.m> this is, of course. an internal matlab file. what i wanted to do was using save function so i added inside this file in line 282, right after Q is being evaluated, the line : save ('Q.mat','Q'); yet after loading in the other scope i need Q for i get an error saying no such file exists.
I have tried to save and load Q, and also tried making Q global inside this internal matlab file though both ideas don't work. i can't change the functions return values and therefor those are my only 2 options and they both fail. I would appreciate any help if you have an idea for a solution.
best regards, Ohad

Answers (1)

William Smith
William Smith on 3 Apr 2018
Have you tried adding a breakpoint at that line, then when the breakpoint is hit, save the variable manually using your command above? Also possible - the file is being saved in a different folder from where you expect it to be saved. If you breakpoint on the save and do 'pwd' you can confirm where it's about to be saved.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!