concatenate string on multiple line to one line
조회 수: 4 (최근 30일)
이전 댓글 표시
anyone know how to cancatenate string on multiple line to one line? the problem explain below :
kata=[];
for i=1:jv
for u=1:jk
if u==indeks
latin=char(ascii(u,:))
end
end
kata=[kata;latin];
[baris_kata,kolom_kata]=size(kata);
end
gab_kata=strcat(kata(1,:),kata(2,:),kata(3,:))
output:
latin =
kah
kata =
kah
latin =
ku
kata =
kah
ku
latin =
ta
kata =
kah
ku
ta
gab_kata =kahkuta
the code above wasn't effective. gab_kata=strcat(kata(1,:),kata(2,:),kata(3,:)), i want concatenate the string on the kata(1,:) until kata(i,:) but i don't know the right way.. how i have to do??
댓글 수: 4
Jan
2011년 11월 16일
I still do not understand any detail. Is there a difference between "ka-ga-nga script" and "Ka-Ga-Nga script" and what does the term "script" mean here? What is "latin script" then? What does this sentence mean: "the input is image each ka-ga-nga character"? What is "(jb)"? How do you want to "change ASCII code to string"?
Please explain how the available inputs are represented in Matlab. I assume the "Ka-Ga-Nga" detail does not matter at all, but the type and size of "ascii" does. It is a good idea to post an example of the wanted output also. Do you want a UTF16 conversion?!
답변 (1개)
Walter Roberson
2011년 11월 12일
I do not understand your code at all, but perhaps what you are looking for is
reshape(ascii .', 1, [])
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!