how do you hide an output?

조회 수: 7 (최근 30일)
Leah
Leah 2012년 7월 16일
I have a name where I am using the string function (strtok) to extract specific things out of the name for example
abc_pD_34Vg30.csv
[junk, name]=strtok(file(3),'_p');
[right,name]=strtok(name,'_p')
[left,name]=strtok(name,'_V')
i want to hide the output of name and have the right and left output viewable. How do i hide only the output name?
[EDITED, code formatted, Jan]
  댓글 수: 1
Jan
Jan 2012년 7월 16일
@Leah: You have overwritten your former question http://www.mathworks.com/matlabcentral/answers/43164-asdffdasdfdsdfdddddddddd-asd-asdf-sadfa-dadsf with nonsense. Now the work I've spend for posting my answer in this thread is lost for the community. In consequence I will not answer to your questions anymore.

댓글을 달려면 로그인하십시오.

답변 (2개)

Caleb
Caleb 2012년 7월 16일
Might try this:
[junk, name]=strtok(file(3),'_p');
[right,name]=strtok(name,'_p');
[left,name]=strtok(name,'_V');
disp(junk);
disp(right);
disp(left);
  댓글 수: 4
Caleb
Caleb 2012년 7월 23일
You mean like this?
strcat('junk=',num2str(junk))
Walter Roberson
Walter Roberson 2012년 7월 23일
That would also display "ans ="

댓글을 달려면 로그인하십시오.


joeDiHare
joeDiHare 2012년 7월 16일
try:
[~, name]=strtok(file(3),'_p'); [right,~]=strtok(name,'_p') [left,~]=strtok(name,'_V')

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by