Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have to produce a 5x25 matrix in which the rows represent time and columns represent the activity at those times.

What I have tried:

I have tried the usual semi-colon approach
Posted
Updated 28-Jul-19 13:15pm

According to the documentation[^], your approach is correct. A little test (2x25 matrix) on my Linux box:

>> M = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25;26,17,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]
M =

    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25
   26   17   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50
 
Share this answer
 
Thank you, although its not coming out as a even matrix :(
 
Share this answer
 
Comments
CPallini 26-Jul-19 8:26am    
How is it coming out?
Richard Deeming 26-Jul-19 9:32am    
If you want to reply to a solution, click the "Have a Question or Comment?" button under the solution and post a comment.

DO NOT post your comment in the "Add your solution here" box.
The first question is as follows:
Complete the script in Octave so that it defines the following 5 vectors. Each row describes the measurements of activity of all 25 genes at one time point. [10 marks] 
T1 = [1, 4, 3, 100, 12, 1000, 25, 32, 500, 700, 20, 9000, 25, 650, 40, 3, 67, 2, 305, 80, 200, 50, 2,15, 4]; T2 = [1, 6, 2, 120, 14, 900, 25, 35, 550, 650, 23, 7500, 25, 700, 43, 6, 72, 8, 360, 70, 220, 60, 1, 14, 8]; T3 = [1.5, 5, 7, 150, 13, 550, 1, 40, 520, 600, 27, 5500, 27, 900, 44, 12, 75, 9, 360, 50, 190, 50, 4, 13, 6]; T4 = [122, 120, 120, 170, 140, 700, 100.5, 134, 570, 600, 125, 6100, 125, 1050, 122, 130, 187, 109, 460, 145, 330, 160, 105, 113, 104]; T5 = [25, 25, 30, 40, 50, 600, 6, 33, 500, 600, 26, 5500, 26, 1150, 14, 32,126, 8, 360, 28, 230, 60, 2, 13, 5]; 


My answer:
% Question 1 % T1= [1 4 3 100 12 1000 25 32 500 700 20 9000 25 650 40 3 67 2 305 80 200 50 2 15 64] T2= [1 6 2 120 14 900 25 35 550 650 23 7500 25 700 43 6 72 8 360 70 220 60 1 14 8] T3= [1.5 5 7 150 13 550 1 40 520 600 27 5500 27 900 44 12 75 9 360 50 190 50 4 13 6] T4= [122 120 120 170 140 140 700 100.5 134 570 600 125 6100 125 1050 122 130 187 109 460 145 330 160 105 113 104] T5= 25 25 30 40 50 600 6 33 500 600 26 5500 26 1150 14 32 126 8 360 28 230 60 2 13 5]
octave 
 
Share this answer
 
sorry guys, im new to all this, i have posted the first question and also my response?
 
Share this answer
 
Comments
Richard Deeming 30-Jul-19 11:16am    
Which part of DO NOT POST COMMENTS AS SOLUTIONS was unclear?!
Member 14541751 30-Jul-19 20:47pm    
Richard, piss off, you klumpit.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900