why can't i extract feature and save it to .mat file ??
1 次查看(过去 30 天)
显示 更早的评论
can anyone point out the mistakes that i have make ? i'm using R2012a
2 个评论
Stephen23
2015-10-5
编辑:Stephen23
2015-10-5
We do not have your data and we cannot run your code.
Rather than making us guess what happens when your code is run, it helps us if you actually tell us this information. This is because our mind-reading abilities are rather limited: we cannot read your computer screen, so we don't magically know what your code does.
Do you get any error or warning messages? If it runs, what is happening that you do not expect to? How are you checking the output? What do you want it to do?
回答(1 个)
Walter Roberson
2015-10-5
No. However if you were to convert your code to use fullfile instead of constructing filenames as strings, and if you were to use Smart Indent on your code and post the results, then there is more of a chance that someone could understand your code well enough to find a mistake.
... Just like I wrote before and you deleted the question and reposted it without making improvements
2 个评论
Stephen23
2015-10-5
编辑:Stephen23
2015-10-5
Indented code is easier to follow and understand. Compare indented code:
N = 3;
for k = 1:N
X = k^N;
print(X)
end
print(k)
against code without indentation (like your code):
N = 3;
for k = 1:N
X = k^N;
print(X)
end
print(k)
You can see that the indented code makes it easier to follow which parts of the code are inside the loop, and which parts are not inside the loop.
By default the MATLAB Editor indents the code inside of loops, for operations, switch operations, nested functions, and some other operations. You normally don't have to do anything to use this feature, as it is turned on by default. However manual deletion of those indents is still possible, but should be avoided.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!