Is FORMAT DEBUG still any useful?
Afficher commentaires plus anciens
Can someone has an explanation for this (R2020B)
clear
clc
x=1;
y=x;
x=x+1;
format debug
y
x
that produces
y =
Structure address = 23ebc936f80
m = 1
n = 1
pr = 23edbdd6660
1
x =
Structure address = 23ebc936f80
m = 1
n = 1
pr = 23edbdd6660
2
So x and y have the same structure address and data address, yet data are different (1 for y and 2 for x).
Finish the time where FORMAT DEBUG returns useful information for us.
2 commentaires
James Quinlan
le 30 Juin 2021
Hi Bruno, were you able to submit a bug report? I am running into similar issues. I am performing memory tests and tests are unreliable in light of your comment. I reproduce results from both you and James Tursa below giving same addresses for x and y even after x has been modified. I am running Version: 9.10.0.1602886 (R2021a).
My test is slightly different in the sense, I assign x a value, then pass it to a function and make assignment, y = x. From my understanding, if you pass x to a function and don't update it while there, it effectively is pass by reference.
Bruno Luong
le 1 Juil 2021
Modifié(e) : Bruno Luong
le 1 Juil 2021
Réponse acceptée
Plus de réponses (1)
xd
le 17 Mai 2024
0 votes
maybe matlab disabled these functions like address , pr ......
Catégories
En savoir plus sur Variables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!