第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

matlab中connect函數(shù)用法?

matlab中connect函數(shù)用法?

眼眸繁星 2019-02-06 14:07:45
matlab中connect函數(shù)用法
查看完整描述

2 回答

?
米琪卡哇伊

TA貢獻(xiàn)1998條經(jīng)驗(yàn) 獲得超6個(gè)贊

 connect()用于建立與指定socket的連接。
  頭文件: #include <winsock.h>
  函數(shù)原型: int PASCAL FAR connect( SOCKET s, const struct sockaddr FAR* name, int namelen);
  參數(shù):
  s:標(biāo)識(shí)一個(gè)未連接socket
  name:指向要連接套接字的sockaddr結(jié)構(gòu)體的指針
  namelen:sockaddr結(jié)構(gòu)體的字節(jié)長度
  注釋:

  本函數(shù)用于創(chuàng)建與指定外部端口的連接。s參數(shù)指定一個(gè)未連接的數(shù)據(jù)報(bào)或流類套接口。如套接口未被捆綁,則系統(tǒng)賦給本地關(guān)聯(lián)一個(gè)唯一的值,且設(shè)置套接口為已捆綁。請(qǐng)注意若名字結(jié)構(gòu)中的地址域?yàn)槿愕脑挘瑒tconnect()將返回WSAEADDRNOTAVAIL錯(cuò)誤。
  對(duì)于流類套接口(SOCK_STREAM類型),利用名字來與一個(gè)遠(yuǎn)程主機(jī)建立連接,一旦套接口調(diào)用成功返回,它就能收發(fā)數(shù)據(jù)了。對(duì)于數(shù)據(jù)報(bào)類套接口(SOCK_DGRAM類型),則設(shè)置成一個(gè)缺省的目的地址,并用它來進(jìn)行后續(xù)的send()與recv()調(diào)用。
  返回值:

  若無錯(cuò)誤發(fā)生,則connect()返回0。否則的話,返回SOCKET_ERROR錯(cuò)誤,應(yīng)用程序可通過WSAGetLastError()獲取相應(yīng)錯(cuò)誤代碼。對(duì)非阻塞套接口而言,若返回值為SOCKET_ERROR則應(yīng)用程序調(diào)用WSAGetLsatError()。如果它指出錯(cuò)誤代碼為WSAEWOULDBLOCK,則您的應(yīng)用程序可以:
  1.用select(),通過檢查套接口是否可寫,來確定連接請(qǐng)求是否完成。
  2.如果您的應(yīng)用程序使用基于消息的WSAAsynSelect()來表示對(duì)連接事件的興趣,則當(dāng)連接操作完成后,您會(huì)收到一個(gè)FD_CONNECT消息。
  錯(cuò)誤代碼

  WSAENOTINITIALISED:在使用此API之前應(yīng)首先成功地調(diào)用WSAStartup()。
  WSAENETDOWN:WINDOWS套接口實(shí)現(xiàn)檢測到網(wǎng)絡(luò)子系統(tǒng)失效。
  WSAEADDRINUSE:所指的地址已在使用中。
  WSAEINTR:通過一個(gè)WSACancelBlockingCall()來取消一個(gè)(阻塞的)調(diào)用。
  WSAEINPROGRESS:一個(gè)阻塞的WINDOWS套接口調(diào)用正在運(yùn)行中。
  WSAEADDRNOTAVAIL:在本地機(jī)器上找不到所指的地址。
  WSAENOTSUPPORT:所指族中地址無法與本套接口一起使用。
  WSAECONNREFUSED:連接嘗試被強(qiáng)制拒絕。
  WSAEDESTADDREQ:需要目的地址。
  WSAEFAULT:namelen參數(shù)不正確。
  WSAEINVAL:套接口沒有準(zhǔn)備好與一地址捆綁。
  WSAEISCONN:套接口早已連接。
  WSAEMFILE:無多余文件描述字。
  WSAENETUNREACH:當(dāng)前無法從本主機(jī)訪問網(wǎng)絡(luò)。
  WSAENOBUFS:無可用緩沖區(qū)。套接口未被連接。
  WSAENOTSOCK:描述字不是一個(gè)套接口。
  WSAETIMEOUT:超時(shí)時(shí)間到。
  WSAEWOULDBLOCK:套接口設(shè)置為非阻塞方式且連接不能立即建立??捎胹elect()調(diào)用對(duì)套接口寫,因?yàn)閟elect()時(shí)會(huì)進(jìn)行連接。



查看完整回答
反對(duì) 回復(fù) 2019-03-15
?
不負(fù)相思意

TA貢獻(xiàn)1777條經(jīng)驗(yàn) 獲得超10個(gè)贊

connect Block-diagram interconnections of dynamic systems.

connect computes an aggregate model for a block diagram interconnection
of dynamic systems. You can specify the block diagram connectivity in
two ways:

Name-based interconnection
In this approach, you name the input and output signals of all blocks
SYS1, SYS2,... in the block diagram, including the summation blocks.
The aggregate model SYS is then built by
SYS = connect(SYS1,SYS2,...,INPUTS,OUTPUTS)
where INPUTS and OUTPUTS are the names of the block diagram external
I/Os (specified as strings or string vectors).

Example 1: Given SISO models C and G, you can construct the closed-loop
transfer T from r to y using

e u
r --->O-->[ C ]---[ G ]-+---> y
- | |
+<----------------+

C.InputName = 'e'; C.OutputName = 'u';
G.InputName = 'u'; G.OutputName = 'y';
Sum = sumblk('e = r-y');
T = connect(G,C,Sum,'r','y')

Example 2: If C and G above are two-input, two-output models instead,
you can form the MIMO transfer T from r to y using
C.u = 'e'; C.y = 'u';
G.u = 'u'; G.y = 'y';
Sum = sumblk('e = r-y',2);
T = connect(G,C,Sum,'r','y')
Note that C.u,C.y is shorthand for C.InputName,C.OutputName and that
'r','y' select all entries of the two-entry vector signals r and y.

Example 3: If you already have specified I/O names for C and G, you
can build the closed-loop model T using:
Sum = sumblk('%e = r - %y',C.u,G.y);
T = connect(G,C,Sum,'r',G.y)
See SUMBLK for more details on using aliases like %e and %y.

Index-based interconnection
In this approach, first combine all system blocks into an aggregate,
unconnected model BLKSYS using APPEND. Then construct a matrix Q
where each row specifies one of the connections or summing junctions
in terms of the input vector U and output vector Y of BLKSYS. For
example, the row [3 2 0 0] indicates that Y(2) feeds into U(3), while
the row [7 2 -15 6] indicates that Y(2) - Y(15) + Y(6) feeds into U(7).
The aggregate model SYS is then obtained by
SYS = connect(BLKSYS,Q,INPUTS,OUTPUTS)
where INPUTS and OUTPUTS are index vectors into U and Y selecting the
block diagram external I/Os.

Example: You can construct the closed-loop model T for the block
diagram above as follows:
BLKSYS = append(C,G);
% U = inputs to C,G. Y = outputs of C,G
% Here Y(1) feeds into U(2) and -Y(2) feeds into U(1)
Q = [2 1; 1 -2];
% External I/Os: r drives U(1) and y is Y(2)
T = connect(BLKSYS,Q,1,2)

Note:
* connect always returns a state-space or FRD model SYS
* States that do not contribute to the I/O transfer from INPUTS to
OUTPUTS are automatically discarded. To prevent this, set the
"Simplify" option to FALSE:
OPT = connectOptions('Simplify',false);
SYS = connect(...,OPT)



查看完整回答
反對(duì) 回復(fù) 2019-03-15
  • 2 回答
  • 0 關(guān)注
  • 798 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)