vs140580

490 Reputation

8 Badges

5 years, 60 days

MaplePrimes Activity


These are replies submitted by vs140580

@acer I want to tell what data is in the legend what that box means in word

 

 

@acer A legend for the points in 3D

 

How to get plots points filled rectangular box in red in the 2D plot.

and lengend for points their too

 

kind help

@acer How to change axis size so that chart looks more clear

Data below tried

 

restart;
pts:= Matrix( [ [ 0.0505050505050505, 0.0833333333333333,    1.62 ],
                [ 0.0404858299595142, 0.0714285714285714,    1.2  ],
                [ 0.0384615384615385,   0.0625,    1.25 ],
                [ 0.0284900284900285, 0.05,    0.84 ],
                [ 0.0264550264550265, 0.0480076812289966, 0.74 ],
                [ 0.0925925925925926, 0.111111111111111,     3.98 ],
                [ 0.062111801242236, 0.0833333333333333,    2.46 ],
                [ 0.0261096605744125, 0.0555555555555556,    0.52 ],
                [ 0.0408163265306122, 0.0625,    1.42 ],
                [ 0.0632911392405063, 0.0909090909090909,    2.35 ],
                [ 0.0354609929078014, 0.0561797752808989,  1.19 ],
                [ 0.0176056338028169, 0.037037037037037,    0.37 ],
                [ 0.0341296928327645, 0.0588235294117647,    1.34 ],
                [ 0.0341296928327645, 0.0552486187845304,  1.12],
                [0.0581395348837209,0.0909090909090909,1.98],
                [0.0169204737732657,0.0432900432900433,0.16],
                [0.0253164556962025,0.050251256281407,0.6],
                [0.0684931506849315,0.1,2.85],
                [0.076923077,0.111111111,2.85],
                [0.051282051,0.076923077,1.83]

             ]
           ):
F3d:=Statistics:-LinearFit(a*x+b*y, pts, [x,y]);
         F3d := 71.8708813796265 x - 23.6550204008207 y

plots:-display(
  plots:-pointplot3d(pts,color=red,symbol=solidsphere,symbolsize=12),
  plot3d(F3d,
       x=min(pts[..,1])..max(pts[..,1]),
       y=min(pts[..,2])..max(pts[..,2]),
       color=gray,style=surface,transparency=0.1),
  labels=[x,y,""], lightmodel=none, axes=box);

 


 

@acer kind help with a regression plane for the data

@acer in my data as you see in above x and y doesn't take sequencial vslues

@tomleslie supposs i want X and Y as on axis and plot a 2D for

f(x, y) =72.7x-24.5y  say

 

How to plot x vs y

 

With f(x, y)

 

2D plot

@acer I have maple 2020 to you size

@tomleslie How to change the scale of the plot

So that plot looks bigger

@vs140580 I copied the file itself to download folder for now it worked

 

My download folder path is 

C:\Users\Sriram\Downloads 

can you help me correct the file command

@Joe Riel is it possible for download directory not to have write permission even though i can download files into it

 

How to make a directory to get write permissions kind help

Great answer excellent 

@Carl Love no I changed the phyton output to string as my input will not be accepted directly by maple 

@Carl Love Now if I have a string like

A:="[[0,1,0,0,0,0,0,0,0,0,0,0,0],[1,0,1,0,0,0,0,0,0,0,0,0,1],[0,1,0,1,0,0,0,0,0,0,0,0,0],[0,0,1,0,1,0,0,1,0,0,0,0,0],[0,0,0,1,0,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,1,0,1,1,0,0,0,0],[0,0,0,1,0,0,1,0,0,0,0,0,0],[0,0,0,0,0,0,1,0,0,1,1,1,0],[0,0,0,0,0,0,0,0,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,1,0,0,0,0],[0,1,0,0,0,0,0,0,0,0,0,0,0]]"

I want convert it to as a  matrix say

B:=[[0,1,0,0,0,0,0,0,0,0,0,0,0],[1,0,1,0,0,0,0,0,0,0,0,0,1],[0,1,0,1,0,0,0,0,0,0,0,0,0],[0,0,1,0,1,0,0,1,0,0,0,0,0],[0,0,0,1,0,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,1,0,1,1,0,0,0,0],[0,0,0,1,0,0,1,0,0,0,0,0,0],[0,0,0,0,0,0,1,0,0,1,1,1,0],[0,0,0,0,0,0,0,0,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,1,0,0,0,0],[0,1,0,0,0,0,0,0,0,0,0,0,0]]

How to do this

kind help

 

@Carl Love 

A:= [[0. 1. 0. 0. 0. 0. 0. 0. 0.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0, 0, 0, 0, 0, 0, 0]]

This type of matrix is my output

can you help sir

But this is in general

In the first set instead of , it is ". " and at the end of each ] no ], inside

DistE := proc(v, e, g::GRAPHLN)

local Adj;

Adj := AdjacencyMatrix(g);

if Distance(e[1], v) < Distance(e[2], v) then

return 1;

else return 0;

end if;

end proc;

G := PetersenGraph();

V := Vertices(G);

V := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

E := Edges(G);

E := {{1, 2}, {1, 5}, {1, 6}, {2, 3}, {2, 9}, {3, 4}, {3, 7}, {4, 5}, {4, 10}, {5, 8}, {6, 7}, {6, 10}, {7, 8}, {8, 9}, {9, 10}} DrawGraph(G);

DistE(V[1], E[3], G);

 

Error, (in DistE) invalid input: GraphTheory:-Distance expects its 1st argument, G, to be of type GRAPHLN, but received 1

I am getting the above error kind help to correct it.

 

First 7 8 9 10 11 Page 9 of 11