LustForLife

30 Reputation

3 Badges

7 years, 101 days

MaplePrimes Activity


These are questions asked by LustForLife

Hi, this should be simple

I have a list of values here, say: [1,4,7,4,2,1] or [3,5,8,11,5,4,3]

And I want the final answer to be [1,4,7] or [3,5,8,11] respectively - i.e. just all the numbers up until the maximum value presented as a list. I believe this will be needed to be done in procedure form. 

For the particular procedure I am using the values in the list will be increasing and then decreasing. 

Thanks

Hi everyone! Just a quick question

When I use the Discrete Plot command. For example

DiscretePlot([1,2,3,4,5],[1,6,2,3,4],style=stem)

I get a graph looking like this 

Now, if possible, I would like to be able to have an indent between 0 and 1 to make it look a bit nicer.

Hi everyone again

This one is linked to my previous 2 question.

Essentially I am trying to use a procedure to reproduce the formula:

S(j) = (1 + sum(H_j*T_j,j=1..n))/(1 + sum(1/(H_j*T_j),j=1..n))

BigProc:= proc(H::list,T::list)
local Form, i;
Form:=[];
for i from 1 to nops(H) do
Form := [op(Form),(1 + [sum(H[1..i]*~T[1..i],i=1..5)])/~(1 + [sum(1/~(H[1..i]*~T[1..i]),i=1..5)])]
end do:
end proc:
MainProc([1,3,5],[3,6,8])

Error, (in sum) summation variable previously assigned, second argument evaluates to 1 = 1 .. 5
 

The actual answer should be (3, 396/25,22320/509)

ie 

S(1) = (1+ 3)/(1+(1/3)) = 3

S(2) = (1 +(3+18))/(1+1/3 + 1/18)) = 396/25

S(3) = (1 +(3+18+40))/(1+1/3 + 1/18 +1/40) = 22320/509

I feel like I am missing a few things to my procedure. Any help would be greatly appreciated!

Hi

I would like to be able to use a procedure in order to create a sequence using a list. Here is an example of what I am trying to achieve:

X = [1,3,4, 50,10]

T_n = 1 + sum^n_j=1 X_j

So T_1 = 1 + 1 = 2

T_2 = 1 + [1+3] = 5

T_3 = 1 +[1+3 +4] = 9

T_4 = 1 + [1+3+4+50] = 59

T_5 = 1+ [1+3+4+50+10] = 69

So my final list would be [2,5,9,59,69]

I am quite new to this forum so i was not sure how to create the Sum from j = 1 to n bit. I know the command for creating a summation but not in a procedure sense.

Hi

This question may have been asked before but I cannot find it!

I am currently have 3 lists:

L:= [1,3,5,2,3]

M:=[4,2,4,6,2]

R:= [5,3,2,1,4]

I would like to be able to come up with a way (I assume a procedure) where I can order L and M based on the numerical order of R. So in this case that would be:

R:=[1,2,3,4,5]

L:=[2,5,3,3,1]

M:=[6,4,2,2,4]

I hope this makes sense? Any help would be greatly appreciated!

 

Page 1 of 1