[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use send() in sockets for Octave
From: |
Mike Miller |
Subject: |
Re: How to use send() in sockets for Octave |
Date: |
Mon, 30 Nov 2015 15:07:33 -0500 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Nov 30, 2015 at 10:12:50 +0000, Nihar Ranjan Saha wrote:
> Can you kindly help me in the steps to use the 'send' command for
> sending a UINT8 array in sockets for Octave. I'm using the following
> code, but I get the following error:
> error: connect: invalid DATA to send. Please format it prior to sending
> error: called from
> gen_DACwaveform_v4 at line 8 column 1
>
> My program is shown below:
>
> clc
> close all
>
> test = [1:20];
> client = socket(AF_INET, SOCK_STREAM, 0);
> server_info = struct("addr", "192.168.1.10", "port", 7);
> rc = connect(client, server_info);
> send(rc, test);
Have you tried
test = uint8 (1:20);
?
--
mike