Click here to Skip to main content
15,899,126 members
Everything / Matrix

Matrix

Matrix

Great Reads

by Arthur V. Ratz
Optimizing the performance of the large-sized matrices QR factorization and eigendecomposition, using Schwarz-Rutishauser algorithm
by Arthur V. Ratz
Compute the Levenshtein distance of literal strings effectively by using the Wagner-Fischer (two matrix rows-based) algorithm.
by Virendra Kulkarni
Steps to implement the “Fit picture to fill the shape” option in PowerPoint like applications using GDI+
by Mahsa Hassankashi
This article also has a practical example for the neural network. You read here what exactly happens in the human brain, while you review the artificial neuron network.

Latest Articles

by Arthur V. Ratz
Compute the Levenshtein distance of literal strings effectively by using the Wagner-Fischer (two matrix rows-based) algorithm.
by Arthur V. Ratz
Optimizing the performance of the large-sized matrices QR factorization and eigendecomposition, using Schwarz-Rutishauser algorithm
by Mahsa Hassankashi
This article also has a practical example for the neural network. You read here what exactly happens in the human brain, while you review the artificial neuron network.
by Peter Occil
Describes projection and view transforms commonly used in 3D graphics, such as perspective and orthographic transforms

All Articles

Sort by Title

Matrix 

3 Apr 2019 by Mahsa Hassankashi
This article also has a practical example for the neural network. You read here what exactly happens in the human brain, while you review the artificial neuron network.
25 Nov 2020 by Richard MacCutchan
Sorry, this site is not here to do your homework. If you really cannot do this the you need to discuss your problem with your teacher.
16 Sep 2022 by Arthur V. Ratz
Compute the Levenshtein distance of literal strings effectively by using the Wagner-Fischer (two matrix rows-based) algorithm.
2 Oct 2023 by sahil ajmeri 2022
I have STL file where I want to apply 4x4 matrix. The matrix I want to apply is: [[2.7282, 0, 0, 0], [0, 4.0014, 0, 0], [0, 0, 1, 0], [0,�0,�0,�1]] Here is my STL file: https://we.tl/t-v6SHprAeUZ[^] I have used Python code to apply matrix...
9 Apr 2014 by Paul Hildebrandt
I'm writing a program to create isometric line drawings and I need to figure out how to convert 2D circles to ellipses using a shear matrix transform. I've searched Google for a few days now but can't seem to come up with any code examples. Data I use is centrepoint and radius.Can someone...
9 Apr 2014 by lukeer
You can leave the circle (and everything else) unmodified and let the Graphics object deal with shearing via its Transform property. It's of type Matrix, which supports Shaer out of the box.
20 Jun 2014 by Virendra Kulkarni
Steps to implement the “Fit picture to fill the shape” option in PowerPoint like applications using GDI+
19 Aug 2015 by KingSora
I would like to know how to change RenderTransformOrigin of an element without changing its location? I've noticed that changing the RenderTransformOrigin will affect the element location.How can I calculate the delta X, delta Y between the element location before and after changing the...
18 Apr 2017 by Bhola Ram Sahu
I want to do a small program that calculates eigen value and eigen vector in parallel processors using MPI. I have written a code that works correctly but its for uni processor. Please help me with some code for parallel processor. I want to compare the processing time for different number of...
3 Jan 2022 by Arthur V. Ratz
Optimizing the performance of the large-sized matrices QR factorization and eigendecomposition, using Schwarz-Rutishauser algorithm
22 Aug 2018 by Member 13958396
This is my first time doing matlab and I've never coded before. This was a compulsory Uni paper that I have had to take. Prior to this task I've managed to complete various other tasks but this is challenging me beyond what I've learned in the last three weeks. This is what ive got down so far...
22 Aug 2018 by Patrice T
So, you show no attempt to solve the problem yourself, you have no question, you just want us to do your HomeWork. HomeWork problems are simplified versions of the kind of problems you will have to solve in real life, their purpose is learning and practicing. We do not do your HomeWork....
10 Jan 2018 by Member 13616707
can someone help me to finish this code to work whole in one code. # include ........... ..................... int main() { readMatrice(A,n,m); printMatrice(A,n,m); convertMatriceToVector(A,n,m,V); writeVector(V); sortVector(V); writeVector(V); convertVectorToMatrice(V,n,m,A); ...
10 Jan 2018 by Patrice T
Quote: can someone help me to finish this code to work whole in one code. Finish what? this code is barely as starting point. All you gave us a couple function names and not explanation. Your teacher is the only one that can help you with no explanation. We do not do your HomeWork. HomeWork is...
10 Jan 2018 by CPallini
Start writing the Matrice and Vector classes (at least their skeletons), then start filling properly the methods. Take advantage, if you can, of the modern features of C++, in order to simplify your task.
10 Oct 2014 by Wael Tayara
Well, this is giving me a real headache. I'm building a matrix determinant function to compute NxN determinant, and I'm using recursion. The logic is working right but I'm not able to get the final value computed correctly.Here is my code for Matrix Determinant: public static double...
10 Oct 2014 by Wael Tayara
This is the part where should be modified :)for (int j = 0; j
14 Dec 2019 by Member 14689791
Saruss' Rule can be useful for faster & memory efficient computation of Determinant. because it is non recursive. You can get application on https://github.com/apanasara/Faster_nxn_Determinant
26 Apr 2019 by merna adel
It is required to develop a program to do Matrix operations. The program use a defined string format to represent the matrix in the user input and output sections. For the following matrix: examplee : the user input the string representation of the Matrix : ex:[10 2.13 3;-5 0 4;16.5 1 8] In the...
26 Apr 2019 by Gerry Schmitz
How to split a string in C++ - Fluent C++[^]
26 Apr 2019 by Richard MacCutchan
You first need to split the string using the semi-colon as the separator,. That will give you a string of numbers for each row. Then split each substring using the comma as separator which will give the numbers for each column. You can then allocate the array for the matrix. You then need to...
4 Nov 2020 by justilian
New programmer here, I got a task to make a program that picks and displays number of numbers greater than 0.8 in a random matrix 5x6 with 2 for loops and would appreciate help if someone knows how to make it. Thanks in advance. this is how...
4 Nov 2020 by raddevus
[0.91, 0.81, 0.72, 0.74, 0.33, 0.85] [0.91, 0.81, 0.72, 0.74, 0.33, 0.85] [0.91, 0.81, 0.72, 0.74, 0.33, 0.85] [0.91, 0.81, 0.72, 0.74, 0.33, 0.85] [0.91, 0.81, 0.72, 0.74, 0.33, 0.85] now iterate through each row and each column for row = 0...
19 Mar 2016 by KittoKy
In this code I am getting the error : CS0246 The type or namespace name 'Matrix' could not be found (are you missing a using directive or an assembly reference?)#region Generate the training data and classesMatrix trainData = new Matrix(trainSampleCount,...
19 Mar 2016 by Richard MacCutchan
This is exactly the same issue as CS0246 the type or namespace name 'emgu' could not be found (are you missing a using directive or an assembly reference? )[^], which I already told you how to fix.
15 Nov 2018 by Optimistic76
Hello, I'm trying to understand how mathematical libraries that use Expression Templates techniques ( like Eigen for exmaple ) handle Matrix Multiplication. What I have tried: In many examples I found there is always just the element-wise operation implemented: A = B*C + D is compiled as a...
15 Nov 2018 by Richard MacCutchan
matrix multiplication c - Google Search[^]
17 Nov 2018 by Optimistic76
I finally found a link i never noticed that answer to my question Eigen: Lazy Evaluation and Aliasing[^]
3 Oct 2014 by A_Shahn
HI ALL-----I have a fundamental question:What is the best way to perform Matrix-Calculation in VB.NET?!I want to know what is the fastest way to do that?!-----Let me explain it more:I want to do some processing on images,(For example: Apply a gaussian-filter on a...
3 Oct 2014 by Andreas Gieriet
Use https://mathnetnumerics.codeplex.com/[^].CheersAndi
8 Feb 2021 by Captian Ahab
I just came over from Stack Overflow after getting question banned, so I have no idea how you guys will like me, but here goes. I have a 16x16 matrix, and I'm trying to move the columns to the right. What I have tried: Here's how I have it...
8 Feb 2021 by RickZeeland
See answer here: Python and matrix, move columns & rows - Stack Overflow[^]
15 Apr 2020 by bekim peci
So basically I have to ask the user to input the text in the textBox and then , add that input into the matrix, but the code i have written doesn't give me time to get the user input What I have tried: public void FillMatrix (string...
15 Apr 2020 by RickZeeland
Here is a similar question, the trick is to use a button and add the values to the array after the button is clicked: Get input from a textbox to an array in C#[^]
10 Mar 2022 by Member 15561967
I have a 2D array with ones and zeros, for example: 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 I need to find if there is a group of columns (or a single column) that have a row sum equal 1. For the above array the answer is YES because: 1 + 0 = 1 0 + 1...
10 Mar 2022 by Luc Pattyn
Aha, That is a special case of a more general optimisation job I've spent many years on; I ended up with a very nice approach that is the opposite of brute force, and provides all solutions in one go. Applied on your matrix situation, I'd like...
21 Jan 2016 by B. Clay Shannon
When I add a Matrix to the Layout page in the BIDS designer, it creates two columns. I need more. I would expect the Matrix control to have a "ColumnCount" property, but it doesn't. My next expectation would be that the Matrix would provide a context-sensitve menu allowing me to insert...
5 Nov 2014 by hor_313
HiI want to build a m*n matrix in Matlab but i don't know how? I know I can build a vector with many ways but about matrices I couldn't find any way!For example if I want to build a matrix 100*100 like this:[1 2 3 .......100 1 2 3 .......100 1 2 3 .......100 . . . 1 2 3...
6 Nov 2014 by Peter Leow
Try this:% create an all zeros 100x100 matrixm=100;n=100;matrix = zeros(m, n);% create a column vector of 1x100v = 1:n;v% create a 100x100 matrixfor r=1:m matrix(r, :) = v;endmatrix
17 Jan 2015 by Peter Leow
Refer : MATLAB - Inverse of a Matrix[^]
17 Jan 2015 by Sergey Alexandrovich Kryukov
First, learn the theory. This is not easy. You can start here: http://en.wikipedia.org/wiki/Covariance_matrix[^].In MATLAB, this is also a big topic: http://bit.ly/1uf85hg[^].—SA
27 Oct 2021 by M Sanei
I want to create a 2D array data with 100 row and 100 column in which every cell would be a float number between 0 and 10 randomly generated, store row by row. After that implement selection and range queries on it. What I have tried: I have...
27 Oct 2021 by Richard MacCutchan
You can declare the array thus: float floatArray[100][100]; The array is indexed by expressions of the form floatArray[row][col], where row and col are integer offsets between 0 and 99. You can use srand/rand to generate random numbers.
27 Oct 2021 by Rick York
I use this function to generate random values : // obtain a random value scaled to be within limits template inline T GetRandomValue( T minval, T maxval ) { return ( rand() * ( maxval - minval ) / (T) RAND_MAX ) + minval; }...
13 Mar 2022 by loop063
I have a 15x15 matrix with strings of "0"s and "1"s. I need to find the number of columns that have only one "0". Note that the variables in the matrix are strings, not numerics What I have tried: colSums(m1=="1", na.rm=TRUE)
25 Sep 2022 by NoName900
i'm trying to code a Minesweeping game in java and i don't know how to create the board. What I have tried: this is my code: import javax.swing.*; import java.awt.*; public class Board extends JFrame { static final int Col=9; ...
20 Oct 2021 by Matt Weber_1
I'm developing a Connect 4 Python program. When I'm attempting to play the game and trying to "stack" the tokens, instead of doing so they just replace each other after each turn if the other/same user picks the same column. For example, this...
20 Oct 2021 by OriginalGriff
When you "drop" a token, you need to scan the column and find the first "used slot". The simplest way to do that is to expand the storage area by one in all directions (so that the board matrix for a 3 x 3 board is 5 x 5) and fill the "edges"...
30 May 2016 by Member 12550760
i want to get the inversion of n*n method so using augmented method so i made the identity matrix then made column reduction then found the inverse for(i=0;i
30 May 2016 by Kenneth Haugland
I have one way of solving the inverse of a matrix, solving it column by column:High precision native Gaussian Elimination[^]I also think you would benefit from reading up on matrixes in general, not just the inverse bit. Matrices are very useful in many areas, but mastering and...
8 Dec 2020 by gsile
I have been trying to link my "person" class values with "workers" class in the "Read" method. When I write Console.WriteLine(person.GetName()); it gives me all the values perfectly, but if I write Console.WriteLine(workers.Get(i).GetName());...
8 Dec 2020 by Afzaal Ahmad Zeeshan
That is why normally it is recommended to not have a long chain of method calls, if any single one of them fails you get a null reference exception. I would suggest rewriting that log line as: var worker = workers.Get(i); if(worker != null) { ...
4 Apr 2016 by saied golnejad
Hello.I need to make a lower triangular matrix. For example I have a matrix with dimension 4*10(4 rows and 10 columns).I am suppose to make a 4*4 lower triangular matrix in the left of the 4*10 matrix by replacing the columns with each other and also the rows.The name of columns is important for...
7 Jul 2017 by Member 13298704
I am not getting correct output What I have tried: void main() { int a[5][5],i,j,k,t; for(i=0;i>a[i][j]; } for(k=0;ka[k+1]) { t=a[k+1]; a[k+1]=a[k]; a[k]=t; } } for(k=0;k
7 Jul 2017 by CPallini
The initialization of the matrix is incorrect (not complete). Moreover your sort routine is flawed. Try #include using namespace std; int main() { int a[5][5],i,j,k,t; int * b = reinterpret_cast(a); for(i=0;i>a[i][j]; } ...
7 Jul 2017 by Patrice T
First of all, indent your code properly, it helps reading. void main() { int a[5][5],i,j,k,t; for(i=0;i>a[i][j]; } // this loop is very confusing and lake no sens to me for(k=0;k
10 May 2014 by Member 4065983
when I have the Matrix below X1 X2 X3 X4Y1 1.00 0.11 0.07 0.50Y2 0.22 0.07 0.30 0.14Y3 0.00 0.06 0.06 0.08how can I print all following path with java X1Y1-> X2Y2-> X3Y3 -> X4Y3 X3Y2-> X2Y3 -> X4Y3 X4Y2-> X2Y3 ...
18 May 2014 by Member 4065983
Now I implemented a easy source code to find all possible paths in matrix.Then selected the unique row and column.But due to time complexity how can we can get directly unique path.this is my source code. import java.util.*; public class MyAllPath { public static ArrayList...
8 May 2014 by Member 4065983
when I have the Matrix below X1 X2 X3 X4Y1 1.00 0.11 0.07 0.50Y2 0.22 0.07 0.30 0.14Y3 0.00 0.06 0.06 0.08how can I print all following path with java X1Y1-> X2Y2-> X3Y3 -> X4Y3 X3Y2-> X2Y3 -> X4Y3 X4Y2-> X2Y3 ...
20 Jun 2014 by Radzhab
I have 2d array. I want find shortest path from left top value to right down. I want use Deikstra algho, but it take much memory. 0 2 2 2 2 2 1 0 1 0 0 12 2 2 0 2 2 2 2 2 0 1 0Thats is path i want found. Does anybode have c# code?0 2 2 2 2 2 1 0 1 0 0 12 2 2 0 2 2 2 2 2 0 1...
21 Jun 2014 by Sky8807
refer below links:http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm[^]andhttp://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c12527/AStar-A-Implementation-in-C-Path-Finding-PathFinder.htm[^]
15 Dec 2021 by Enes Şahin 2021
I have two files with nrrd extension. I am reading them by using nrrd module and saving to 3D array. Now I have two 3D arrays and I want to calculate fastly hausdorff distance between them in pixel. And I have to use python. Here is the small...
15 Dec 2021 by Richard MacCutchan
hausdorff distance python - Google Search[^]
25 Apr 2022 by abc174
So I have a table which holds words and their counts. I want to create a histogram with it but I'm not pretty sure where to start. wordCount() func returns table's row count. What I have tried: public class TestHistogram { public static...
11 Oct 2022 by Animesh jain 2022
I was coding a matrix inversion algorithm It works with almost all of the matrixes except one with zeros in the diagonal entries Like: 8 9 0 0 0 8 0 9 10 and similar if Argument_Matrix[i][i] != 0: Argument_Matrix[i] /=...
11 Oct 2022 by Peter_in_2780
Assuming the input matrix is non-singular, there are many well-proven algorithms for matrix inversion. To overcome your immediate problem of zeros on the main diagonal, you should read up on pivoting in the context of matrix manipulation. While...
12 Sep 2014 by ARMS_DEIR
How to work with matrices and vectors in c++ or c#? How to set matrices of n by m, simply as in matlab that we say A=M*N, what are the needed namespaces or libraries?
12 Sep 2014 by Christian Amado
Hope these links helps you...Matrix Decomposition[^]C# Matrix Library[^]Matrix multiplication[^]Regards
12 Sep 2014 by Sergey Alexandrovich Kryukov
Please see my comment to the question.First, matrix multiplication is quite a trivial mathematical operation. Please see, for example: http://en.wikipedia.org/wiki/Matrix_multiplication[^].To code it, just act by definition.Now, you can define appropriate operator '*' and use is...
21 Apr 2015 by nizam qbixx
Hi..I was doing a research related to speech recognition. So far I already able to convert a sample waveform (.wav format) to a feature vector by using MFCC which generate .mfc file. I also able to read the .mfc file but I dont know how to related it to the spectogram. Actually, I'm not sure...
28 Mar 2020 by R0ber1t
I'm looking for a C++ way using vector to get all the diagonals of a (square) matrix, represented as a 2d vector. matrix = [ [1,2,3,4], [5,1,2,3], [9,5,1,2]] But I have trouble coming up with a way to generate all the diagonals....
28 Mar 2020 by CPallini
A diagonal starting at (row,0) includes all items (row+k,k) where k=0,1,.., ROWS-row-1. In a similar way, a diagonal starting at (0,col) includes all items (k,col+k) where k=0, 1, .., COLS-col-1. The task is competed if you iterate on rows: row...
19 Nov 2017 by Amar Ćatović
#include int main() { printf("Enter M and N of matrix A: "); int m,n; int p,q; scanf("%i %i",&m,&n); printf("Enter matrix elements: "); int i,j,matA[101][101]; for (i=0; i
18 Nov 2017 by OriginalGriff
Compiling does not mean your code is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not that the email contained the message you wanted to send. So now...
19 Nov 2017 by Patrice T
Quote: It rotates N x N matrix like it should, but there is problem with M x N matrix. You need to take into account that the shape of the matrix changes after transpose. There is a tool that allow you to see what your code is doing, its name is debugger. It is also a great learning tool...
9 Oct 2014 by Wael Tayara
My function returns an int array with 2 values Let's say, res[0] and res[1]When I'm calling the array in a for loop for multiple times, and when I'm storing the results in another array, in each iteration the results are over-written with the new results.If the first call returns [0,1]...
9 Oct 2014 by Maciej Los
Have a look here: Classical Encryption Techniques[^]. There you'll find Hll Cipher algorithm implementation. It might help to solve your issue.MatrixMul function expects result variable as an array of integer. Why don't you use it as an output?private void MatrixMul(string subInput, int[,]...
27 Dec 2014 by Kiber
I want to write a program that:1) Generates quadratic matrix of size (2Nx2N) 2) Prints this matrix3) Swaps the quarters of the matrix clockwise (beginning from top left corner)4) Prints changed matrix.For example, the output of my program should be like this:01 02 03 04 05 06...
27 Dec 2014 by Maciej Los
Last few weeks i saw at least few of similar questions[^]. Please, follow them.
31 Dec 2014 by Member 10641779
Hey, I liked your question so I thought i should work on it. Here m adding the code to change matrix as shown by you in example.Here suppose 'a' is your original matrix of size (2N x 2N) and I have take one `tmp` matrix to store value. it will also be of same sizeinitialize tmp matrix at the...
6 May 2016 by Member 12508138
I created a program located at http://www.ptrone.com/ Where changing the value of z tocos(point)*120+120Creates a circle that is rotating in a circular motion. Can anyone tell the formula to create a triangle that rotates in a circular motion?What I have tried:cos(), sin(), exp()...
6 May 2016 by Karthik_Mahalingam
use Math object refer: JavaScript Math Reference[^]JavaScript Math Functions[^]JavaScript The Math Object[^]Math Object (JavaScript)[^]example:var value = Math.cos(25);alert (value);
30 Jul 2017 by Member 13336847
How can I add or subtract 2 Algebraic expressions in C which have 2 variables. I realize it could be done using matrix but that would leave many null spaces. Can anyone please write a program dynamically allocating the arrays. How can I do with sparse matrix (array representation) Example...
30 Jul 2017 by Graeme_Grant
Sorry, we do not do your homework for you.
30 Jul 2017 by Ravi Bhavnani
You don't need to use a matrix. Simply use a collection of structures, each of which contains: coefficient power of x power of y and sum the coefficients of like power combinations. /ravi
14 Jun 2022 by RickZeeland
See example here: Matrix calculator in C - Code Review Stack Exchange[^] You can not copy and paste this code, you will have to adapt it according to the instructions you got. Good luck!
14 Jun 2022 by CPallini
You did practically nothing. There are basically three tasks: Matrix computations, that is addition, subtraction, multiplication of two matrices. Matrix input from file and output to file. Interpret the command line and execute it. For...
14 Jun 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
14 Jun 2022 by Richard MacCutchan
See Matrices[^] for the algorithms that you need to implement.
15 Jun 2022 by merano99
Starting here with a user menu does not make much sense. On the contrary, I would leave it out first and the required functions first to read in the matrices and write the functions possible with the matrices. In order to complete the tasks,...
28 Jun 2022 by UPPALAPATI DATTA (RA2111030010270)
#include void add(){ int p,q,x,y,i,j; int a[100][100],b[100][100],c[100][100]; for(j=0;j
28 Jun 2022 by Member 12006214
Refer below Code #include int main() { int r, c, i, j, a[100][100], b[100][100], sum[100][100]; printf("Enter the number of rows (between 1 and 100): "); scanf("%d", &r); printf("Enter the number of columns (between 1 and...
28 Jun 2022 by Patrice T
First of all, you can't add 2 matrices of different size. I would try this change: #include // This make the matrices and sizes global. int p,q,x,y; int a[100][100],b[100][100],c[100][100]; void add(){ int p,q,x,y,i,j; int...
22 Aug 2018 by Member 13958388
SOMEONE PLEASE HELP ME SOLVE THIS?!?!?!?! SelectKRandomPointsPurposeSelectKRandomPoints generates a list of k randomly selected pixelsfrom an image. Input(s):It takes twoinputs in the following order: 1)A 3D image array from which to select points from 2)The number of points to randomly...
22 Aug 2018 by Patrice T
Quote: SOMEONE PLEASE HELP ME SOLVE THIS?!?!?!?! The help you want is us doing your homeWork. You show no attempt to solve the problem yourself, you have no question, you just want us to do your HomeWork. HomeWork problems are simplified versions of the kind of problems you will have to solve...
22 Aug 2018 by Vincent Maverick Durano
READ: Programming Problems and Finding Solutions[^] PS: Adding those exclamation marks on the subject line suggests you are late with your homework, it's rude and no one is interested in that. If you want us to help you, then start doing something by yourself. Show us what you've tried and...
9 Mar 2022 by JamesDorr
Can you help me with this in Matlab I have this matrix A= 10 20 30 40 60 70 80 90 100 B= 1 1 1 1 1 1 how can i add matrix B into the end of matrix A to look like this C= 10 20 30 40 60 70 80 90 100 1 1 1 What I have...
9 Mar 2022 by Arthur V. Ratz
Here's the solution: And, this is done in MatLab just like in Python and NumPy, such as: For rows: A = ones(1,4); B = zeros(1,4); C = [A B] D = [A;B] For columns: A = ones(2,3) B = zeros(2,2) C = [A B] I basically refer to Creating,...
11 Mar 2015 by Member 11089981
I need to write a program to encrypt and decrypt a given plain text. The input will be a string without spaces. The program should read and store the string as a square matrix, with each element in the matrix being one character. Hence the number of characters in the input string can only be...
11 Mar 2015 by Richard Deeming
Your homework is set to test what you have learned, not what some random people on the Internet know.If you can't do your homework yourself, then talk to your teacher.Whilst we're happy to help with specific questions about code you have written, nobody here is going to do your homework...