What does Sel do in this code?
20 views (last 30 days)
Show older comments
Aadesh Harakh
on 27 Oct 2020
Answered: Walter Roberson
on 27 Oct 2020
Hey all, I am a chemical engineering student researching how to model a distillation column. I have a found a code that does this, but I'm not sure what's happening in it.
[t,x]=ode15s('cola_lv',[0 20000],0.5*ones(1,82)');
Xinit = x(sel(size(x),1,1),:)';
I understand everything here except this "sel" command. I've never heard of it in during my studies. What exactly is it doing? I also cannot seem to use this command in my version of Matlab (2020b). Is this a package command, and if so, where do I go to download it?
Accepted Answer
Walter Roberson
on 27 Oct 2020
Very old MATLAB!
It looks to me as if is just doing indexing. I think it is equivalent of
Xinit = x(end,:).';
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!