Loading csv file in a Matlab function
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
Guillaume
2014년 11월 16일
You certainly won't be able to access matrix outside of your function since it's not a return value.
As for tvec and data, if you invoke your function from the workspace with:
[tvec, tdata] = load_measurements('somefile.txt');
they will appear in your workspace.
Any variable defined in a function are private to that function unless they are return values. You actually have to ask for the return value in the function call to get them.
댓글 수: 1
Guillaume
2014년 11월 16일
As it's a completely different question, you should have started a new one.
Anwyay, it's very simple, assuming you want all elements to the row equal to -1:
data(all(data == -1, 2), :) = [];
If it's any element in the row equal to -1, replace the all with any
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!