mehdi jafari

564 Reputation

13 Badges

7 years, 156 days

MaplePrimes Activity


These are replies submitted by mehdi jafari

please upload your worksheet here,tnx



restart:

a := Matrix([1, 2, 3, 4, 5]);

 

for k to 5 do

 

x[k]:=rhs(op(1,op(3,DirectSearch:-SolveEquations([a(1, k)*x+2+y = 0, x+y = 0]))));
y[k]:=rhs(op(2,op(3,DirectSearch:-SolveEquations([a(1, k)*x+2+y = 0, x+y = 0]))));

 

end do;

 

a := Matrix(1, 5, {(1, 1) = 1, (1, 2) = 2, (1, 3) = 3, (1, 4) = 4, (1, 5) = 5})

 

HFloat(-0.9449969839679876)

 

HFloat(-0.05500301603201337)

 

HFloat(-2.0)

 

HFloat(2.0)

 

HFloat(-1.0)

 

HFloat(1.0)

 

HFloat(-0.6666666666666666)

 

HFloat(0.6666666666666666)

 

HFloat(-0.5)

 

HFloat(0.5)

(1)

 



Download similar.mw

@hacker9130368 

@Alejandro Jakubi i think it will take me months to know what is going on in your complicated,but perfect code. could you please explain more ?i am really appreciate it.tnx

@Axel Vogt could you please explain more about this great code ? i actually do not know what has happend in your code ?

@Carl Love it was exactly what i needed,thank u. and thank u for thinking and giving time for my first and second question.

please write down an example of your matrix manually,tnx

u can also find roots using solve and fsolve commands,

could you please explain more? 

@Mac Dude the error is in maple 18.01,

@Carl Love at first this error was emerged :

interface(complexunit= j);
Error, (in interface) complexunit not a valid property name

in maple help page we have :

method=float
Compute the determinant of the n x n Matrix A which has numerical entries or complex numerical entries by using Gaussian elimination.

but without using this option,we can evaluate determinant very efficiently. thus is what the benefit of this option ?!

restart:

interface(complexunit= j);

Error, (in interface) complexunit not a valid property name

 

V:= < 150*d, 0 >:

A:= < 13-I*14, -(12-I*16); 27+I*16, -(26+I*13) >:

LinearAlgebra:-Determinant(A,method=float);

 

60.0000000000001-45.0000000000000*I

(1)

 

 

Download determinant.mw

why u avoid uploading your worksheet here ? 

@Chia u can also see ?convert/POLYGONS , so that use this :


restart:

with(plottools):

with(plots):

display(cylinder([1, 1, 1], 1, 3), orientation = [45, 70], scaling = constrained, grid = [2, 2, 2]);

 

 

op(op(1,%)):

p2 := op(op(convert(%%, POLYGONS)));

[[2., 1., HFloat(1.0)], [1.965925826, 1.258819045, HFloat(1.0)], [1.866025404, 1.500000000, HFloat(1.0)], [1.707106781, 1.707106781, HFloat(1.0)], [1.500000000, 1.866025404, HFloat(1.0)], [1.258819045, 1.965925826, HFloat(1.0)], [.9999999998, 2., HFloat(1.0)], [.7411809545, 1.965925826, HFloat(1.0)], [.4999999995, 1.866025404, HFloat(1.0)], [.2928932182, 1.707106781, HFloat(1.0)], [.1339745957, 1.499999999, HFloat(1.0)], [0.340741734e-1, 1.258819044, HFloat(1.0)], [0., .9999999986, HFloat(1.0)], [0.340741741e-1, .7411809533, HFloat(1.0)], [.1339745971, .4999999984, HFloat(1.0)], [.2928932202, .2928932174, HFloat(1.0)], [.5000000019, .1339745951, HFloat(1.0)], [.7411809572, 0.340741731e-1, HFloat(1.0)], [1.000000003, 0., HFloat(1.0)], [1.258819048, 0.340741744e-1, HFloat(1.0)], [1.500000003, .1339745977, HFloat(1.0)], [1.707106784, .2928932211, HFloat(1.0)], [1.866025406, .5000000030, HFloat(1.0)], [1.965925827, .7411809584, HFloat(1.0)], [2., 1.000000004, HFloat(1.0)], [2., 1., HFloat(1.0)]], [[2., 1., HFloat(4.0)], [1.965925826, 1.258819045, HFloat(4.0)], [1.866025404, 1.500000000, HFloat(4.0)], [1.707106781, 1.707106781, HFloat(4.0)], [1.500000000, 1.866025404, HFloat(4.0)], [1.258819045, 1.965925826, HFloat(4.0)], [.9999999998, 2., HFloat(4.0)], [.7411809545, 1.965925826, HFloat(4.0)], [.4999999995, 1.866025404, HFloat(4.0)], [.2928932182, 1.707106781, HFloat(4.0)], [.1339745957, 1.499999999, HFloat(4.0)], [0.340741734e-1, 1.258819044, HFloat(4.0)], [0., .9999999986, HFloat(4.0)], [0.340741741e-1, .7411809533, HFloat(4.0)], [.1339745971, .4999999984, HFloat(4.0)], [.2928932202, .2928932174, HFloat(4.0)], [.5000000019, .1339745951, HFloat(4.0)], [.7411809572, 0.340741731e-1, HFloat(4.0)], [1.000000003, 0., HFloat(4.0)], [1.258819048, 0.340741744e-1, HFloat(4.0)], [1.500000003, .1339745977, HFloat(4.0)], [1.707106784, .2928932211, HFloat(4.0)], [1.866025406, .5000000030, HFloat(4.0)], [1.965925827, .7411809584, HFloat(4.0)], [2., 1.000000004, HFloat(4.0)], [2., 1., HFloat(4.0)]], [[2., 1., HFloat(1.0)], [2., 1., HFloat(4.0)], [1.965925826, 1.258819045, HFloat(4.0)], [1.965925826, 1.258819045, HFloat(1.0)]], [[1.965925826, 1.258819045, HFloat(1.0)], [1.965925826, 1.258819045, HFloat(4.0)], [1.866025404, 1.500000000, HFloat(4.0)], [1.866025404, 1.500000000, HFloat(1.0)]], [[1.866025404, 1.500000000, HFloat(1.0)], [1.866025404, 1.500000000, HFloat(4.0)], [1.707106781, 1.707106781, HFloat(4.0)], [1.707106781, 1.707106781, HFloat(1.0)]], [[1.707106781, 1.707106781, HFloat(1.0)], [1.707106781, 1.707106781, HFloat(4.0)], [1.500000000, 1.866025404, HFloat(4.0)], [1.500000000, 1.866025404, HFloat(1.0)]], [[1.500000000, 1.866025404, HFloat(1.0)], [1.500000000, 1.866025404, HFloat(4.0)], [1.258819045, 1.965925826, HFloat(4.0)], [1.258819045, 1.965925826, HFloat(1.0)]], [[1.258819045, 1.965925826, HFloat(1.0)], [1.258819045, 1.965925826, HFloat(4.0)], [.9999999998, 2., HFloat(4.0)], [.9999999998, 2., HFloat(1.0)]], [[.9999999998, 2., HFloat(1.0)], [.9999999998, 2., HFloat(4.0)], [.7411809545, 1.965925826, HFloat(4.0)], [.7411809545, 1.965925826, HFloat(1.0)]], [[.7411809545, 1.965925826, HFloat(1.0)], [.7411809545, 1.965925826, HFloat(4.0)], [.4999999995, 1.866025404, HFloat(4.0)], [.4999999995, 1.866025404, HFloat(1.0)]], [[.4999999995, 1.866025404, HFloat(1.0)], [.4999999995, 1.866025404, HFloat(4.0)], [.2928932182, 1.707106781, HFloat(4.0)], [.2928932182, 1.707106781, HFloat(1.0)]], [[.2928932182, 1.707106781, HFloat(1.0)], [.2928932182, 1.707106781, HFloat(4.0)], [.1339745957, 1.499999999, HFloat(4.0)], [.1339745957, 1.499999999, HFloat(1.0)]], [[.1339745957, 1.499999999, HFloat(1.0)], [.1339745957, 1.499999999, HFloat(4.0)], [0.340741734e-1, 1.258819044, HFloat(4.0)], [0.340741734e-1, 1.258819044, HFloat(1.0)]], [[0.340741734e-1, 1.258819044, HFloat(1.0)], [0.340741734e-1, 1.258819044, HFloat(4.0)], [0., .9999999986, HFloat(4.0)], [0., .9999999986, HFloat(1.0)]], [[0., .9999999986, HFloat(1.0)], [0., .9999999986, HFloat(4.0)], [0.340741741e-1, .7411809533, HFloat(4.0)], [0.340741741e-1, .7411809533, HFloat(1.0)]], [[0.340741741e-1, .7411809533, HFloat(1.0)], [0.340741741e-1, .7411809533, HFloat(4.0)], [.1339745971, .4999999984, HFloat(4.0)], [.1339745971, .4999999984, HFloat(1.0)]], [[.1339745971, .4999999984, HFloat(1.0)], [.1339745971, .4999999984, HFloat(4.0)], [.2928932202, .2928932174, HFloat(4.0)], [.2928932202, .2928932174, HFloat(1.0)]], [[.2928932202, .2928932174, HFloat(1.0)], [.2928932202, .2928932174, HFloat(4.0)], [.5000000019, .1339745951, HFloat(4.0)], [.5000000019, .1339745951, HFloat(1.0)]], [[.5000000019, .1339745951, HFloat(1.0)], [.5000000019, .1339745951, HFloat(4.0)], [.7411809572, 0.340741731e-1, HFloat(4.0)], [.7411809572, 0.340741731e-1, HFloat(1.0)]], [[.7411809572, 0.340741731e-1, HFloat(1.0)], [.7411809572, 0.340741731e-1, HFloat(4.0)], [1.000000003, 0., HFloat(4.0)], [1.000000003, 0., HFloat(1.0)]], [[1.000000003, 0., HFloat(1.0)], [1.000000003, 0., HFloat(4.0)], [1.258819048, 0.340741744e-1, HFloat(4.0)], [1.258819048, 0.340741744e-1, HFloat(1.0)]], [[1.258819048, 0.340741744e-1, HFloat(1.0)], [1.258819048, 0.340741744e-1, HFloat(4.0)], [1.500000003, .1339745977, HFloat(4.0)], [1.500000003, .1339745977, HFloat(1.0)]], [[1.500000003, .1339745977, HFloat(1.0)], [1.500000003, .1339745977, HFloat(4.0)], [1.707106784, .2928932211, HFloat(4.0)], [1.707106784, .2928932211, HFloat(1.0)]], [[1.707106784, .2928932211, HFloat(1.0)], [1.707106784, .2928932211, HFloat(4.0)], [1.866025406, .5000000030, HFloat(4.0)], [1.866025406, .5000000030, HFloat(1.0)]], [[1.866025406, .5000000030, HFloat(1.0)], [1.866025406, .5000000030, HFloat(4.0)], [1.965925827, .7411809584, HFloat(4.0)], [1.965925827, .7411809584, HFloat(1.0)]], [[1.965925827, .7411809584, HFloat(1.0)], [1.965925827, .7411809584, HFloat(4.0)], [2., 1.000000004, HFloat(4.0)], [2., 1.000000004, HFloat(1.0)]]

(1)

 


Download op.mw

@Sunmaple what do u mean by break the axis ?!

@Carl Love and what if we want complex roots ?! what we should do there ?

@DJJerome1976 as u said,i think it is a bug,and cuase of that i said i have not anything to say ! anyway,good work ! 

5 6 7 8 9 10 11 Last Page 7 of 21