if i have number as index, and 300 character how i can find the chacter of these indexs
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
0 votes
hello all; i have on e question which is: if i have to vectors, the first one it stored 300 English characters and the second for 20 index. how i can get character of those index .
Accepted Answer
Azzi Abdelmalek
on 22 May 2015
a='abcdefg'
id=[1 3 5]
out=a(id)
7 Comments
Mohamuud hassan
on 22 May 2015
Edited: Mohamuud hassan
on 22 May 2015
thank you abdelmalek, i applied your idea but i facing this error:
for ex_sec_out=1:length(Ex_distance)
for ex_sec_inn=1:length(Cover)
Ex_char_tem(ex_sec_inn,ex_sec_out)=Cover(Ex_distance(ex_sec_inn,ex_sec_out),ex_sec_out);
end
end
Index exceeds matrix dimensions.
Error in e_extructing (line 245) Ex_char_tem(ex_sec_inn,ex_sec_out)=Cover(Ex_distance(ex_sec_inn,ex_sec_out),ex_sec_out); >>
Azzi Abdelmalek
on 22 May 2015
post an example like I did, to test your code
Mohamuud hassan
on 22 May 2015
Edited: Mohamuud hassan
on 22 May 2015
thank you Azzi Abdelmalek. my brother this is the example:
Cover={'In this study, capacity and security issues of text steganography have been considered to improve by proposing a novel approach. For this purpose, a text steganography method that employs data compression has been proposed. Because of using textual data in steganography, the employed data compression algorithm has to be lossless. Accordingly, LZW data compression algorithm has been chosen due to its frequent use in the literature and significant compression ratio. The proposed method constructs – uses stego keys and employs Combinatorics-based coding in order to increase security. Secret information has been hidden in the chosen text from the previously constructed text base that consists of naturally generated texts. Email has been chosen as communication channel between the two parties,s'}
Ex_distance=[72,73,127,136,160,174,175,229,230,238,239,240,241,247,249,291,292,655,672,706];
for ex_sec_out=1:length(Ex_distance)
for ex_sec_inn=1:length(Cover)
Ex_char_tem(ex_sec_inn,ex_sec_out)=Cover(Ex_distance(ex_sec_inn,ex_sec_out),ex_sec_out);
end
end
Index exceeds matrix dimensions.
Error in kuday (line 6) Ex_char_tem(ex_sec_inn,ex_sec_out)=Cover(Ex_distance(ex_sec_inn,ex_sec_out),ex_sec_out); >>
@abdulkarim hassan: the issue is not the indexing per se, but the fact that you have put the string inside of a (scalar) cell array. Note the difference:
a = 'abcdefg' % Azzi Abdelmalek's example
a = {'abcdefg'} % what you are doing is like this
Get rid of the cell array {} brackets , and the indexing should work. Although beginners seems to love them, there is no reason to stick all of your data inside cell arrays by default.
thank you Stephen, i employed your idea and i get the result. my question is how i can change this statement:
Cover={'In this study, capacity and security issues of text steganography have been considered to improve by proposing a novel approach. For this purpose, a text steganography method that employs data compression has been proposed. Because of using textual data in steganography, the employed data compression algorithm has to be lossless. Accordingly, LZW data compression algorithm has been chosen due to its frequent use in the literature and significant compression ratio. The proposed method constructs – uses stego keys and employs Combinatorics-based coding in order to increase security. Secret information has been hidden in the chosen text from the previously constructed text base that consists of naturally generated texts. Email has been chosen as communication channel between the two parties,s'}
into, using builtin function or converter.
Cover='In this study, capacity and security issues of text steganography have been considered to improve by proposing a novel approach. For this purpose, a text steganography method that employs data compression has been proposed. Because of using textual data in steganography, the employed data compression algorithm has to be lossless. Accordingly, LZW data compression algorithm has been chosen due to its frequent use in the literature and significant compression ratio. The proposed method constructs – uses stego keys and employs Combinatorics-based coding in order to increase security. Secret information has been hidden in the chosen text from the previously constructed text base that consists of naturally generated texts. Email has been chosen as communication channel between the two parties,s';
Cover = Cover{1}
Mohamuud hassan
on 22 May 2015
thank you Guillaume
More Answers (0)
Categories
Find more on Financial Data Analytics in Help Center and File Exchange
See Also
on 22 May 2015
on 22 May 2015
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)