158 Discussion / Question Topics

Remove Filter
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 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
488
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
358
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
232
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
335
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
340
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
218
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 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
296
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
756
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
1K
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
266
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
232
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
303
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
380
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
140
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
879
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
300
Member Avatar for souad

I have this code that outputs the tfidf for all words in each file in the directory. I'm trying to transfer this to a matrix where each row correspond to each file in the directory and each column to all words in the files and I have some difficulty in …

0
187
Member Avatar for ivan3510

Hi! I have this code, classes with matrices, overloading operator etc (this is just one part, I reduced it from original). #include<iostream> using namespace std; class matrix { protected: float* M; size_t m,n; public: matrix(){} matrix(size_t m,size_t n); matrix(const matrix& A); ~matrix(); matrix& operator=(const matrix& A); matrix operator+(const matrix& A) …

Member Avatar for mike_2000_17
0
326
Member Avatar for BogdanCov

Hello guys. I have queries, i made a matrix of Buttons and another of Panels and everythings is ok, that works. There is the code: private void button1_Click(object sender, EventArgs e) { for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) …

Member Avatar for BogdanCov
0
189
Member Avatar for Xheis

Hi, I have to create a program that creates N child processes, and they muliply the matrix. I have some base codes but when I try to run them they give me segmentation error and I cant find the problem. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <sys/types.h> …

Member Avatar for David W
0
294
Member Avatar for london-G

Hello, I am getting the error: "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:15" There is definetly something I am doing wrong but I cannot figure out what. Any help will be appreciated. The error in the output is poiinting to line 119; if(R[currentState][action] > -1){. I tried to change this but no …

Member Avatar for london-G
0
629

The End.