How do you know that "p" has a dimension of 4 columns for the code given under "Body" herein below?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
sim('focbls',[0 2]);
[p,f]=spectrum(posin,posfb,1024,0,[],1000);
figure(1)
clf;
subplot(211);
loglog(f,abs(p(:,4))),grid;
Answers (1)
Sean de Wolski
on 2 Jul 2012
You don't know what it has! It does not necessarily have four dimensions either, just four columns.
You can find out its size by asking:
size(p)
and if p does not have four columns the above would error.
p = magic(3);
p(:,4)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!