You are not logged in.

**Jelena****Member**- Registered: 2018-Apr-04
- Posts: 4

Hello,

I want to use the SISO OFDM example/ WARPLab Reference Design to sent/receive a picture. Is it enough to replace

'tx_data=randi(MOD_ORDER,1,N_DATA_SYMS)-1;

with picture (array that will represent the picture) and modify the demolulation part?

Thank you for your answer!

Offline

**murphpo****Administrator**- From: Mango Communications
- Registered: 2006-Jul-03
- Posts: 4924

That line of code generates a vector of random integers. Each integer represents the bits encoded in one modulated symbol. To send a real payload you can replace these random integers with integers generated from your payload, then update the demodulation process to reconstruct your payload.

I strongly encourage you to build this in simulation first. The WARPLab OFDM examples support simulation-only when USE_WARPLAB_TXRX=0.

Offline

**Jelena****Member**- Registered: 2018-Apr-04
- Posts: 4

Okaay. I am using a imread/reshape matlab functions to get a one-dimensional vector. But problem is now:

''reshape the number of elements must not change''

in line : tx_syms_mat = reshape(tx_syms, length(SC_IND_DATA), N_OFDM_SYMS);

because length(tx_syms is not = length(SC_IND_DATA)* N_OFDM_SYMS

What should i do?

thank you!

*Last edited by Jelena (2018-Apr-16 14:17:08)*

Offline

**murphpo****Administrator**- From: Mango Communications
- Registered: 2006-Jul-03
- Posts: 4924

I cannot tell you how to build your custom code - you need to figure this out on your own. You have already identified the problem above (your new tx_syms vector is the wrong length).

Offline

**Jelena****Member**- Registered: 2018-Apr-04
- Posts: 4

Thank you for fast answers. I figure it out how to send a picture which dimensions i know. (example: 240x100 bmp ). I now want to send any picture, but i don't know can i modify the numbers of carriers? I can modify number of symbols but occasionally number of symbols is not int (and then i have problem with reshape functions). What should i do?

Offline

**murphpo****Administrator**- From: Mango Communications
- Registered: 2006-Jul-03
- Posts: 4924

The OFDM example scripts support payload of arbitrary length, set by the N_OFDM_SYMS variable by default. You should not modify the number of subcarriers to adjust the payload length.

Offline