Re: maple programming
From: John O'Flaherty (quiasmox_at_yahoo.com)
Date: 12/12/04
- Next message: Christopher Creutzig: "Re: MuPAD or Maple - Comments welcome"
- Previous message: wissam: "2F1*2F1"
- In reply to: kelly hamer: "Re: maple programming"
- Next in thread: Christopher Creutzig: "Re: maple programming"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 12 Dec 2004 12:09:30 -0600
kelly hamer wrote:
>>help some1 about arrays need to print a second array called c
>>
>
> restart:A:=array(1..4,1..4,[[10,12,10,2],[12,25,27,3],[8,23,17,4],[6,15,6,2]]);
>
>
>>C:=array(1..4,1..4);
>
>
>>for i do 1 to 4
>
>
>> for j do 1 to 4
>
>
>> if A[i,j] < 15 then
>
>
>> A[i,j] = 15
>
>
>>print C = A[i,j]
>
>
>>end do;
>
>
> [10 12 10 2]
>
> [12 25 27 3]
>
> A := [ 8 23 17 4]
>
> [ 6 15 6 2]
>
> i need to print out that every number in the array that is less than
> 15 will be printed out as 15 in a second array called C
I don't use maple, but from the logic of it, it should probably go,
within the loop:
C[i,j] = A[i,j]
if C[i,j] < 15 then
C[i,j] = 15
then outside the loop:
print C
-- john
- Next message: Christopher Creutzig: "Re: MuPAD or Maple - Comments welcome"
- Previous message: wissam: "2F1*2F1"
- In reply to: kelly hamer: "Re: maple programming"
- Next in thread: Christopher Creutzig: "Re: maple programming"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|