What is evaluated to standard output is not being assigned to my variable
Show older comments
Hello,
I am having a difficult time understanding why what I'm seeing go to standard output is not being assigned to my variable. Could someone explain the rationale or what is going on?
K>> d
d =
5×1 cell array
{'.' }
{'..' }
{'2022'}
{'2024'}
{'2025'}
K>> d{3:end}
ans =
'2022'
ans =
'2024'
ans =
'2025'
K>> b = d{3:end}
b =
'2022'
In the code clip, why does "b" not contain all the standard output shown in the preceding line execution?
2 Comments
Stephen23
on 13 Mar 2025
"Could someone explain the rationale or what is going on?"
Kristoffer Walker
on 13 Mar 2025
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!