minhhieuh2003

85 Reputation

3 Badges

4 years, 218 days

MaplePrimes Activity


These are replies submitted by minhhieuh2003

@acer 

I run code dsds1d_s(3);printdata(3,widthmode=percentage, width=100)  create a table (1)

and dsds1d_s(5);printdata(5,widthmode=percentage, width=100)  create a table (2)

I want to combine table (1) and table (2) into a table

What should I do? 

please help me


 

restart;

multiple := module() option package;
  export dsds1d_s,printdata;
  local TSprintf;

  TSprintf := proc()
    uses Typesetting;
      mrow(seq(`if`(e::string, mn(e), Typeset(EV(e))), e = [args]));
    #sprintf("%a",[args]);
  end proc:

  dsds1d_s := proc( rtc,
                    {width::positive:=500},
                    {widthmode::identical(pixels,percentage):=':-pixels'} )
    global R;
    local r, topic, tudo, num, dsd, dsss1, dsss2, dsss3, xml;
    uses Typesetting, DocumentTools, DocumentTools:-Layout;
    tudo := [1, -233243, sqrt(23+x), ('int')(2*x^2+35*x+4, x)];
    num := rand(1 .. nops(tudo())); dsd := tudo[num()];
    dsss1 := tudo[num()]; dsss2 := tudo[num()]; dsss3 := tudo[num()];
    for r to rtc do
      topic[r] := TSprintf(ex, " ", r, ". SomeLongSentence ", r);
      R[r] := Row(Cell(Textfield(Equation(topic[r]),
                                 ':-alignment'=':-left'),
                       ':-columnspan'=4)),
              Row(Cell(Textfield(Equation(mrow(mtext("A","mathcolor"="#ff0000"),
                                               mtext(". "),TSprintf(dsd))),
                                 ':-alignment'=':-left')),
                  Cell(Textfield(Equation(mrow(mtext("B"), mtext(". "), TSprintf(dsss1))),
                                 ':-alignment'=':-left')),
                  Cell(Textfield(Equation(mrow(mtext("C"), mtext(". "), TSprintf(dsss2))),
                                 ':-alignment'=':-left')),
                  Cell(Textfield(Equation(mrow(mtext("D"), mtext(". "), TSprintf(dsss3))),
                                 ':-alignment'=':-left'))
                  );
    end do;return NULL;
  end proc:
printdata:=proc(rtc,
                    {width::positive:=500},
                    {widthmode::identical(pixels,percentage):=':-pixels'}) local xml;global R;
uses Typesetting, DocumentTools, DocumentTools:-Layout;
xml := Worksheet(Table(':-exterior'=':-none', ':-interior'=':-none',
                           ':-hiddenborderdisplay'=':-never', ':-alignment'=':-center',
                           ':-width'=width, ':-widthmode'=widthmode,
                           Column()$4,
                           seq(op([R[r]]),
                               r=1..rtc)
                          ));
    InsertContent(xml);
    return NULL;
end proc:
end module:

 

with(multiple):

dsds1d_s(3);

printdata(3,widthmode=percentage, width=100)

dsds1d_s(5); 1; printdata(5, widthmode = percentage, width = 100)

"I want to combine dsds1d_s(3);printdata(3,widthmode=percentage, width=100)   and dsds1d_s(5);printdata(5,widthmode=percentage, width=100) into a table, what should i do"?""

please*help*factorial(me)

``

``


 

Download goi_maple_new.mw

@acer

I cann't increase width with mtr(mtd(topic[rtc], ':-columnspan' = 50,':-columnweight' = 50), ':-columnalign' = ':-left')

Can you help me?

@acer 

Thank you very much. Good luck to you.

I try to code procedure but it doesn't.

Please help me into image below?

Please thank you very much.

Help goi_maple.mw 

@acer Can I ask you something?

T:-mtext(dsd)-----> string

if dsd is sqrt(2) --->"2^(1/2)" : unlike.

@acer 

thank you very much very much.

@Carl Love

So what to do?

I can use plots:-textplot but export *.rft very bad

Please help me.

@Carl Love 

column A: left

column B: left

column C: left

column D: left

Row 1, Row 2, Row 3, ... Row n is straight

Ex:

Download Goi_mapleprime.mw

 

Good luck to you.

@acer 

Good luck to you

@Christian Wolinski 

rand1:= rand(2 .. 9); a := rand1();b := rand1();c:= rand1();
'log[a]'(b*x+c)

maple understand var b and c but don't understand

can you help me?

@Christian Wolinski 

InertForm:-Display(new, inert=false);  use maple 2018 is OK

but maple 2015 isn't.

Can you help me?inertsurd_reply.mw
 

restart;

kernelopts(version);

`Maple 2018.1, X86 64 LINUX, Jun 8 2018, Build ID 1321769`

(1)

assume(x>0);

expr := sqrt(x^3*x^(3/4));

(x^(15/4))^(1/2)

(2)

new := combine(expr);

x^(15/8)

(3)

map[2](op,2,indets(new,identical(x)^anything));

{15/8}

(4)

restart;

expr := surd(a*'surd'(a*a^b,3),4);

surd(a*surd(a*a^b, 3), 4)

(5)

inertexpr := InertForm:-MakeInert(eval(expr,1)):

new := subs([a=2,b=6,c=4], inertexpr):

ans := InertForm:-Display(new,inert=true);

Typesetting:-mi("ans", italic = "true", mathvariant = "italic") := Typesetting:-mrow(Typesetting:-mi("%surd", italic = "true", mathvariant = "italic"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mi("%*", italic = "true", mathvariant = "italic"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mrow(Typesetting:-mi("%surd", italic = "true", mathvariant = "italic"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mi("%*", italic = "true", mathvariant = "italic"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mrow(Typesetting:-mi("%^", italic = "true", mathvariant = "italic"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mn("6", mathvariant = "normal")), mathvariant = "normal"))), mathvariant = "normal")), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal"))), mathvariant = "normal")), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mn("4", mathvariant = "normal")), mathvariant = "normal"))

(6)

InertForm:-Value(new);

8^(1/4)*2^(1/12)

(7)

ans := InertForm:-Display(new,inert=false);

Typesetting:-mi("ans", italic = "true", mathvariant = "italic") := Typesetting:-mrow(Typesetting:-mi("surd", italic = "false", mathvariant = "normal"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mo("⁢", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mrow(Typesetting:-mi("surd", italic = "false", mathvariant = "normal"), Typesetting:-mo("⁡", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mo("·", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.1666667em", rspace = "0.1666667em"), Typesetting:-msup(Typesetting:-mn("2", mathvariant = "normal"), Typesetting:-mn("6", mathvariant = "normal"), superscriptshift = "0")), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal"))), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mn("4", mathvariant = "normal")), mathvariant = "normal"))

(8)

``


 

Download inertsurd_reply.mw

 

how can you  determine x^-3?

use coeff(g,x,-3) ?

Thank you very much. Thank you very much.

1 2 3 Page 2 of 3