dipamilo

15 Reputation

5 Badges

11 years, 231 days

MaplePrimes Activity


These are answers submitted by dipamilo

hey masters, i made some development in my last post, but o still need help.


LL:=unapply(piecewise(0 < x and x < a, (a*x+b^2)/(a+b), a < x and x < a+b, x^2*b+a*x, a+b < x and x < a+b+c, c*x+c^2 , 0), [a, b, c])

A := convert(A, listlist);
custo := map[evalhf](`@`(B, op), %)

each part of the equation system corresponds to a portion, therefore the expected result should be three lists

my goal is to get three lists

4.mw


Hey jaytreiman 166
i made a mistake where i wrote unnaplly is unapply like you said.
a,b represents values of row in matrix A, i.e 'a' represents value in first column and row, and b represents the values in second column.

in this scenario x represents a value that varies the section between the distances a, b and

my concern is in piecewise function where i want to know how can i evaluate a piecewise function the point of obtain a list with the values ​​of the cost

i put here the file.



hey, unfortunately i still have problem, maybe i´m not been clear. 
so, i posted it again:

A := LinearAlgebra:-RandomMatrix(2, 2);
B := proc (a, b)->piecewise(a+b < x, (a*x+b^2)/(a+b), a+b < x and x < a^2+b, x^2*b+a*x);
 A := convert(A, listlist);
 LL := unnaplly(map((a, b) ->( a+b < x, (a.x+b^2)/(a+b), a+b < x and x < a^2+b, x^2.b+a.x), %), [a, b]); 
evalf(Int(B, [-120 .. 120, -200 .. 200]), 2):

#the answer i have is like that :
#Error, (in evalf/int) cannot handle unevaluated name `x` in evalhf
 



 




Page 1 of 1