why readtable create field “D” in the struct “D1”?

Technical Source
1 min readJun 23, 2023

--

function D1=TEST()

D=readtable('test.txt','delimiter',',');
save canc.tset D
D1=load('canc.tset',"-mat")
end
i access it using
D1.D...
it's possibile to avoid "D" field?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

If there is only one variable in the MAT file (regardless of its extension) and you do not know/care what its name is:

C = struct2cell(load(..));
assert(isscalar(C),'Only one array can be LOADed')
T = C{1}

If the variable name is known in advance, e.g. “D”

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet