How to get Matlab to read this in a .m file to another .m file

20 次查看(过去 30 天)
i am trying to get my trap data file to read into my other file, and i cannot figure out why it wont all read in. any help is appreciated

采纳的回答

Walter Roberson
Walter Roberson 2020-2-22
Replace
fid = fopen('trapdata.m', 'r');
S = fscanf(fid,'%d')
fclose(fid)
with
[f, a, b, n, N] = trapdata();
You do not use N in your existing code, so you will likely be given a warning about that. If you want to get rid of the warning then
[f, a, b, n] = trapdata();

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by