Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Help with creating matrix from another matrix' topicStudent Support Forum > General > "Help with creating matrix from another matrix"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
04/16/13 7:48pm

In Response To 'Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Help wi...'
---------
Perhaps do not think or use Mathematica for one hour.

Perhaps write directions for a student who will take only those directions and matrix KElement1 and matrix assembly with paper and pencil and go to a room and follow your directions one step at a time until he is finished and returns with your 150 x 150 matrix on paper.

The student will not come back to you and ask you to help do the work for him. He will only do step1, step2, step 3, now he has found row 1 column 1 for the result. Then he will do step1, step2, step3, now he has found row 1 column 2 for the result. It does not matter that he must do this many times. It is only important that the directions are very clear and he can always know what to do with each step.

Perhaps if you post those directions then I can see how to translate those into Mathematica for you.

When I do

In[1]:= KElement1 = {{273.3435650074862`, -18.310546874999993`,...};
assembly = {{1, 2, 3,...};

In[47]:= Table[
Table[Table[{Last[Position[assembly[[k, All]], i]],
Last[Position[assembly[[k, All]], j]]}, {j, 6}], {i, 6}], {k, 2}]

During evaluation of In[47]:= Last::nolast: {} has a length of zero and no last element. >>

During evaluation of In[47]:= Last::nolast: {} has a length of zero and no last element. >>

During evaluation of In[47]:= Last::nolast: {} has a length of zero and no last element. >>

During evaluation of In[47]:= General::stop: Further output of Last::nolast will be suppressed during this calculation. >>

Out[47]= {{{{{1}, {1}}, {{1}, {2}}, {{1}, {3}}, {{1}, {4}}, {{1}, {5}}, {{1}, {6}}}, {{{2}, {1}}, {{2}, {2}}, {{2}, {3}}, {{2}, {4}}, {{2}, {5}}, {{2}, {6}}}, {{{3}, {1}}, {{3}, {2}}, {{3}, {3}}, {{3}, {4}}, {{3}, {5}}, {{3}, {6}}}, {{{4}, {1}}, {{4}, {2}}, {{4}, {3}}, {{4}, {4}}, {{4}, {5}}, {{4}, {6}}}, {{{5}, {1}}, {{5}, {2}}, {{5}, {3}}, {{5}, {4}}, {{5}, {5}}, {{5}, {6}}}, {{{6}, {1}}, {{6}, {2}}, {{6}, {3}}, {{6}, {4}}, {{6}, {5}}, {{6}, {6}}}}, {{{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}, {{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}, {{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}, {{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}, {{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}, {{Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}, {Last[{}], Last[{}]}}}}

to only find a small part of your matrix then Mathematica does not understand Last of empty lists.

When I look at the code in your notebook many things are comment (*code*) and I do not know what to do.

If you write the directions for the student and I can understand and translate into Mathematica then Mathematica should find your solution very quickly and not exhaust your computer.

If you wish to write the steps then I will try. I will wait. Take the time you need.

URL: ,

Subject (listing for 'Help with creating matrix from another matrix')
Author Date Posted
Help with creating matrix from another matrix Anton Siswo 03/24/13 01:15am
Re: Help with creating matrix from another matrix Bill Simpson 03/24/13 11:53pm
Re: Re: Help with creating matrix from another ... Anton Siswo 03/25/13 11:35am
Re: Re: Re: Help with creating matrix from anot... Bill Simpson 03/25/13 7:32pm
Re: Re: Re: Help with creating matrix from anot... Bill Simpson 03/25/13 10:20pm
Re: Re: Re: Re: Help with creating matrix from ... Anton Siswo 03/31/13 7:22pm
Re: Re: Re: Re: Re: Help with creating matrix f... Bill Simpson 04/01/13 00:06am
Re: Re: Re: Re: Re: Re: Help with creating matr... Anton Siswo 04/01/13 5:52pm
Re: Re: Re: Re: Re: Help with creating matrix f... Bill Simpson 04/01/13 10:44am
Re: Re: Re: Re: Re: Re: Help with creating matr... Anton Siswo 04/08/13 04:52am
Re: Re: Re: Re: Re: Re: Re: Help with creating ... Bill Simpson 04/09/13 8:35pm
Re: Re: Re: Re: Re: Re: Re: Re: Help with creat... Anton Siswo 04/11/13 10:58am
Re: Re: Re: Re: Re: Re: Re: Help with creating ... Bill Simpson 04/09/13 9:54pm
Re: Re: Re: Re: Re: Re: Re: Re: Help with creat... Anton Siswo 04/10/13 9:41pm
Re: Re: Re: Re: Re: Re: Re: Re: Re: Help with c... Bill Simpson 04/12/13 00:35am
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Help wi... Anton Siswo 04/16/13 07:19am
Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Hel... Bill Simpson 04/16/13 7:48pm
Re: Help with creating matrix from another matrix Anton Siswo 03/26/13 11:29pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic