167 Topics

Member Avatar for
Member Avatar for colby.christensen

Years ago I wrote a program in Fortran for a structural analysis class. At the time I had very little programming experience and mottled my way through the assignment. Fast forward to now and I'm attempting to teach myself Python 3. I figured I'd would try to convert the old …

Member Avatar for Reverend Jim
0
4K
Member Avatar for Anel_1

**A newbie would appreciate if someone could give him a pseudocode or any kind of explanation for the part of the code where the actual algorithm for matrix determinant is written.** using System; namespace Determinant { class Program { public static double DET(int n, double[,] Mat) { double d = …

Member Avatar for Anel_1
0
6K
Member Avatar for tyrantbrian

Following is a matrix multiplication code written in MPI (Message Passing Interface) which could be run on CPU cluster for parallel processing. This has been successfully tested with two square matrices, each of the size 1500*1500.

Member Avatar for Gustavo_4
2
19K
Member Avatar for BustACode

I have been learning NumPy arrays/matrices in Python. As I worked, I found that I desired a more readable form of 3d matrices. So I figured that writing one would be a good goal and learning exercise. The goal was to create a function that would print 3d NumPy matrices …

0
3K
Member Avatar for connoisseur2010

I am working on a multi-level marketing (matrix type) web application for a friend. I need assistance with a code snippet for generating a tree view of the downlines and the income calculations. The width is 3 and depth is 4. Thanks

Member Avatar for pritaeas
0
174
Member Avatar for Tcll

I've been here before but I'm looking to find a single-pass method to input the LRS `[[0,0,0],[0,0,0],[1,1,1]]` and get a basic 3x4 (at least) matrix in return: [ [1,0,0,0], [0,1,0,0], [0,0,1,0] ] ^ matrix is NOT transposed (I'll never understand why we use column-major) anyone got anything on this?? > …

Member Avatar for Tcll
0
492
Member Avatar for Gà_1

**Problems 1: Spiral matrix - Advanced** Source of the problem: [Here (not in English)](http://www.spoj.com/PTIT/problems/BCACM11B/) Spiral matrix is formed by filling number 1 in 1st row 1st column, after that, filling with increasing number by clockwise, example: 1 2 3 4 5 16 17 18 19 6 15 24 25 20 …

Member Avatar for tien.nguyen.3532507
0
370
Member Avatar for ddanbe

For my own use, I'd like to develop a small Vector and a Matrix class, independent of some big libraries that exist out there. My question is: Should Vector and Matrix stay two independent entities or should I derive a Vctor frm a Matrix or a Matrix from a Vector? …

Member Avatar for mike_2000_17
0
361
Member Avatar for rela

I wan to wirte in cout << ... to have the matrix in output in the same format that I wrote it in text file like this: 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 class Classname { double data[3][3]; public: void Read(char …

Member Avatar for rela
0
2K
Member Avatar for celina1234

I have a 1000x24 matrix in a text file and i want to sum the adjoining columns of the whole matrix e.g. col1+col2, col2+col3, col3+col4,... col23+col24 and store these values in a separate text file. My code runs like this: #include <stdio.h> int main() { int i,j; float a[100][24]; FILE …

Member Avatar for Edward_3
0
233
Member Avatar for SpottyBlue

I was doing the class tutorial to have matrix multiplication from two dimensional arrays: X (3x2) and Y (2x3). package t7; public class Q5 { public static void main(String[] args) { int[][] matrix_X = new int [3][2]; int[][] matrix_Y = new int [2][3]; int[][] result = new int [3][3]; for …

Member Avatar for Taywin
0
347
Member Avatar for Mr.UNOwen

Hello, So I was testing my matrix class and the results look questionable and the inverted matrix isn't returning the vertex to it's original value (a seperate issue). Given a perspective projection at 45 degrees with a near of 1 and a far of 1000, the camera at the orgin …

Member Avatar for Jean_4
0
355
Member Avatar for BogdanCov

Hello, guys, I encountered a big problem. There is a genereted matrix of buttons: private void Single_Load(object sender, EventArgs e) { //code here for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { //a lot of working code here b[i, …

Member Avatar for BogdanCov
1
219
Member Avatar for azapovjednik

Hello all! Can someone help with this matrix? it needs to spiral inwards, from bottom right corner, clockwise... I found this code... and it runs nicely but I need to adapt it in some ways: - I should be able to provide number of rows and columns - the grid …

Member Avatar for Dani
0
393
Member Avatar for Cool_Omar

This Project is to implement some procedures doing the following: 1. Represent any graph using these input parameters: • A parameter to represent the graph by Adjacency Matrix, or Adjacency List. • A parameter to indicate whether the graph is directed, or undirected. • A parameter to indicate whether the …

0
194
Member Avatar for Momerath

Optimizing Matrix Multiplication One time consuming task is multiplying large matrices. In this post we'll look at ways to improve the speed of this process. We'll be using a square matrix, but with simple modifications the code can be adapted to any type of matrix. The straight forward way to …

Member Avatar for fran2884
7
6K
Member Avatar for mcodesmart

I have a base class called Matrix which has a function transpose. I also have a derived class Matrix2 which is inherited publicly from Matrix class Matrix { public: Matrix(); ... Matrix Transpose(void); ... }; class Matrix2 : public Matrix { public: Matrix2(); ... }; In my main code, I …

Member Avatar for pappu.thakare.5
0
297
Member Avatar for anupam_smart

This is really simple. Just take the last letter of the movie name in previous post & put another movie name starting with that letter. Eg.:- if i put "The Matrix -Reloaded" answer may be "Doom" so let's start. I put : The Matrix Revolution

Member Avatar for blackmiau
0
4K
Member Avatar for wizard25

Hi, I have an assignment. I need to write code in logic programming language SWI-Prolog. Its very hard and I am going to appreciate if you help me :D. This is the assigment: Print 2D array size of (width x height) in spiral order. More explanation and example: You have …

Member Avatar for TrustyTony
0
765
Member Avatar for Mr.UNOwen

Hello, So I'm aware that OpenGL is Column major and DirectX is Row major, but how does that translate into a basic 1D array? So given the below visual matrix, what would the first 3 in the array of each platform and which 3 would be the x,y and z …

Member Avatar for Mr.UNOwen
0
2K
Member Avatar for Jsplinter

I have an mxn matrix, that is stored in memory in an array: matA = new float[m * n]; // ... Assign values matA[0] = 1; matB[1] = 2; // ... After I finish with this array, I then need to create very similar array to store a new mxn …

Member Avatar for Jsplinter
0
278
Member Avatar for ntaraaki

Hi, I'm a beginner with Java, can anyone tell me where my error is, I'm sure there's something I'm missing here with the array logic: public void scalarMultiplication(int c) { for( int i=0; i <values.length - 1;i++){ for(int j=0; j < values.length - 1;j++){ values[i][j] = values[i][j] * c; } …

Member Avatar for JamesCherrill
0
235
Member Avatar for showman13

I was wondering if there is any way to do a single mysql query to do a count of filled positions in a multi-level structure to an indefinite depth. That sounds a bit cryptic, but this is what I would like to do if it is at all possible. we …

Member Avatar for pritaeas
0
304
Member Avatar for saif.shafqat.5

can any body please tell me that how to take input size of a matrix in 2 d array an then print the table of it.... sample output 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 …

Member Avatar for Ancient Dragon
0
322
Member Avatar for arashe

please help me i need a dynamic array that get the information as a matris and give me the vertex degrees (sum every row).and send it to another matrix. #include "stdafx.h" #include<conio.h> #include<iostream> #include <stdlib.h> #include <string.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int k,sum; cout << …

Member Avatar for Schol-R-LEA
0
369
Member Avatar for Stefan_2

I need to write a code that is gonna remove a whole row/column in a matrix(either static or dynamic matrix)

Member Avatar for Ancient Dragon
0
383
Member Avatar for Mohamed_34

Write a program that can do the following: addition of two matrices . subtraction of two matrices. multiplication of a matrix by a scalar. multiplication of a matrix by a matrix.

Member Avatar for deceptikon
0
142
Member Avatar for Jaks_maths

This Program prints the numbers in given array(Row-Major Order) in Spiral order. Ex: Order Is 3*4 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Spiral Order Of Matrix is 11 12 13 14 18 22 26 25 24 23 19 15 16 …

Member Avatar for rubberman
0
292
Member Avatar for mellixa

I cant figure out how to check the array for AND and OR. please, help, i got stuck my code: import java.util.Scanner; public class BooleanProduct import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int[][] A = new int[10][10]; int[][] B = …

Member Avatar for JamesCherrill
0
882
Member Avatar for mellixa

import java.util.Scanner; public class BooleanProduct { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = 10; int[][] A = new int[n][n]; int[][] B = new int[n][n]; //Fill A and B int m,n2,p,q; System.out.println("Enter number of rows for matrix A : "); m = input.nextInt(); System.out.println("Enter …

Member Avatar for stultuske
0
302

The End.