concatenate string on multiple line to one line

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 Comments

It is not clear, what you are trying to achieve. What are the inputs, what do you want as output and is "[baris_kata,kolom_kata]=size(kata);" needed anywhere?!
i made program recognition ka-ga-nga script and i want translate Ka-Ga-Nga script (like arabic script) which have recognized to latin script and displayed it into edittext.
the input is image each ka-ga-nga character. i made ASCII mat file that represented character in two letter such as "ka" in ASCII is " 107 97"..
i compared the index in image.mat (jb) file to ASCII.mat file (u). If u==jb, so change ASCII code to string use function char..,
now i don't know how to concatenate if there is 5 image will be recognized??
please help me...
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?!
i'm sorry if the explanation wasn't clear..
ka-ga-nga and Ka-Ga-Nga is equals. Script that i mean here is letter , latin is letter 'a,b,c,d till z'..
ok, actually i made process translate from the ka-ga-nga into latin.. the input of this program is image, i use image processing and neural network to recognized the ka-ga-nga letter. If the ka-ga-nga letter has recognized, so the next step is translate them into latin letter. To translate it, i use ASCII code.., the problem is i don't know how to concatenate the letter into one line in edit text?? do u know how to make function strcat can concatenate the letter as many as in function looping for??

Sign in to comment.

Answers (1)

I do not understand your code at all, but perhaps what you are looking for is
reshape(ascii .', 1, [])

1 Comment

do you mean "reshape (kata,1,[])"? i have try, it given output like this "gab_kata=kktauah"..
ascii is mat file about ascii code who represented character in two letter,i want display translate script to latin.. any other idea??
thanks for reply^^

Sign in to comment.

Categories

Products

Asked:

on 12 Nov 2011

Community Treasure Hunt

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

Start Hunting!