vs140580

495 Reputation

8 Badges

5 years, 42 days

MaplePrimes Activity


These are questions asked by vs140580

Kind help Given graph G and an edge say (u,v) 

how to get the number of vertices of G which are shorter distance v than from the vertex u

Similiarly the number of vertices of G which are shorter distance u than from the vertex v

 

Kind help if anyone possible. I apologize to distrurb I would 200% acknowedge and merit your efforts.  

Suppose I have a matrix say

A:=[[1,2,3],[3,4,5],[5,6,7]]

If I want to get the sum of all the elements of the matrix.

Kind help if any one.

I apologize for the disturbance

Send my matrix to word as matrix either via maple or phython

Say we have 

 

A:=Matrix([[0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]])

How to write this matrix to a word file in a matrix form

In general If I have a n cross n matrix  How to write this matrix to a word file in a matrix form

This a Adjacency matrix

If I have several n cross n matricies I want them to be fprintf in the same file one after other giving paragraph space with some name of the matrix at the top.

How create a rtable with a global indexing variable outside the procedures and use it inside the procedure's the same rttable with index as global

RA := rtable(1 .. 5, 1 .. 5)

ik := 1

s := proc() global ik; RA[ik, 1] := 1; ik := ik + 1; RA[ik, 2] := 2; ik := ik + 1; end proc;

t := proc() global ik; RA[ik, 3] := 3; ik := ik + 1; RA[ik, 4] := 4; ik := ik + 1; end proc;

 

I dont want pass the RA to the procedure as a parameter I want declare the table RA as global and it to useable inside every procedure how to did if I have lot procedure and procedure within a procedure calls

Let L be list say

 

L:=[[[1,2],3],[[1,3],4],[[1,4],4],[[1,7],7]]

The list is of this type it can be any list type and can be of any size it should be exported to excel like a table like this

A        B

(1,2)    3

(1,3)    4

(1,4)    4

(1,7)    7

 

First is in column A

and second is in column B

 

See brackets changed

kind help with the needul

First 17 18 19 20 21 22 23 Page 19 of 25