<｜begin▁of▁sentence｜>### Instruction:
Given a simple graph with weighted edges [(1, 2, 3.5), (2, 3, 4.2), (3, 4, 2.8), (4, 1, 1.7)], how do you generate a string representation of the graph's adjacency matrix using NetworkX?
### Response:
import networkx as nx

# Define a simple graph with weighted edges
edges = [(1, 2, 3.5), (2, 3, 4.2), (3, 4, 2.8), (4, 1, 1.7)]
G = nx.Graph()
for u, v, w in edges:
    G.add_edge(u, v, weight=w)

# Converting the graph into a matrix representation
matrix = nx.to_numpy_matrix(G)
# The __repr__ function will give us the string representation of the matrix
print(matrix.__repr__())
<|EOT|>
