Search Result

Collapse
17 results in 0.0042 seconds.
Keywords
Members
Tags
matrix
  •  

  • RodAG
    started a topic Size of a string

    Size of a string

    I'm using a computer with 4 GB DDR3 Memory and Intel core i5 processor.
    My question is about the max size of a string/list.

    I want to make operations over a matrix of, let's say 30 rows and about 1500 columns (one character per column). Is it possible with the above specifications or should I split the matrix into pieces so each one has less columns?
    See more | Go to post

  • RodAG
    started a topic Filling a list of lists...

    Filling a list of lists...

    Here's my problem.
    I need a matrix (a list of lists) of undefined size (maybe I should define it as an empty list?). The matrix will have a size of nxm but n and m will be introduced by the user.
    Now, the user will also introduce the values for the matrix as a string, for example: list[0]="Hello" but I need to store that string as a list of 5 elements list[0]=[H, e, l, l, o]
    Is there a not so complicated way to do that?...
    See more | Go to post

  • acheng
    started a topic a bug of boost uBlas?
    in C

    a bug of boost uBlas?

    I want to assign a matrix to submatrix of a bigger matrix.

    Code:
    ublas::matrix<int> A(8,5);
    ublas::matrix<int> B(2,5);
    for(size_t i=0;i<A.size1();++i)
        for(size_t j=0;j<A.size2();++j)
            A(i,j)=i*A.size2()+j+1;
    for(size_t i=0;i<B.size1();++i)
        for(size_t j=0;j<B.size2();++j)
            B(i,j)=i*B.size2()+j+5;
    ublas::matrix_range<ublas::matrix<int>
    ...
    See more | Go to post

  • elizarod
    started a topic Javascript help: arrays and a matrix

    Javascript help: arrays and a matrix

    I'm in an introductory course, and my professor is not very good. I've been working on this problem, but as of now, I'm stuck. Essentially, we have to declare a matrix of grades and create a "Z" formation. Using the "Z" locations we have to average and print grades. Here are the parameters:

    Declare an 8 x 8 matrix and an array of length 22.
    (declare any other variable that you use in the algorithm)
    ...
    See more | Go to post

  • How to save the value of a global variable in a file

    Hi I'm tryin to create a game but I have a question in how to save (saveasfile) the value of a global variable.. and then load the same value with openfile.

    Also for example you have a main label and a botton on the left.... so when you click the left bottom the label will change or refresh to another label and when you return to the original label show or refresh to the original one. All the work is with matrices in python 3.2 and...
    See more | Go to post

  • Is there any way to understand the code BEHIND QR codes?

    I'm looking to start making QR Codes and I'm trying to figure them out.

    I've downloaded an add-in for adobe indesign that will create QR Codes automatically but it only works for notes and for websites. The main thing I want to do is to be able to put a contact card (vCard) into a qr code without using the online sites.

    1. Is there any way to view the actual coding behind QR Codes? I know there's generators online...
    See more | Go to post

  • How can I turn my table into a dynamic 2D-Matrix?

    Okay, so I know the question is really mixed up right there, but that's not exactly what I mean. I think it will be clearer if I give you the situation.

    I have this table T that contains 3 columns. Let's say columns x, y, and z. and I want an application-generated table G where the values under T.x goes as the column header for table G, T.y becomes the row header, and Z the value stored within (x,y). You see, I was planning on making...
    See more | Go to post

  • basic python question about lists and matrices

    I'm learning python through the "How to think like a computer scientist" book. There is a certain exercise that multiplies a matrix m by a scalar n:

    Code:
    def scalar_mult(n, m):
     """
    	>>> a = [[1, 2], [3, 4]]
    	>>> scalar_mult(3, a)
    	[[3, 6], [9, 12]]
    	>>> b = [[3, 5, 7], [1, 1, 1], [0, 2, 0], [2,2, 3]]
    	>>> b
    	[[3, 5, 7], [1, 1, 1],
    ...
    See more | Go to post
    Last edited by bvdet; Jan 4 '11, 12:53 PM. Reason: fixed indentation

  • Johan Novak
    started a topic Compare elements in a matrix

    Compare elements in a matrix

    Hi!

    I'm learning python and I have a question about matix.

    Code:
    ef __init__(self,colors=[], forms=[], numbers=[], grades=[]):
            self.cardList = []
            self.playerCardList = []
            self.lista3 = []
            self.lista4 = []
            for color in colors:
                for form in forms:
                    for number in numbers:
                        for grade in
    ...
    See more | Go to post

  • reubinoff
    started a topic problem with void* in struct
    in C

    problem with void* in struct

    hello,
    I have some problem with my project in C. I want do define a generic type of matrix. with this type I can save any kind of type(int, double, float...). but I have some errors in my code. if someone can help me I'll be very gratefull. the code is:
    Code:
    typedef struct arr{
    	void * p_arr;
    }arr;
    
    typedef struct matrix{
    	
    	arr  * p_mat;
    	char* name;
    	int size_h;
    	int
    ...
    See more | Go to post

  • jeckstrom
    started a topic Subtract value from column

    Subtract value from column

    This is my code thus far:

    Code:
    #! /usr/local/bin/python
    
    import sys
    import numpy
    
    A = numpy.matrix([[3.8351274705,  -0.1448460097,   5.8649306918],
                 [3.0383950010,   0.4744278528,   6.3044376843],
                 [4.5435746933,   0.5586559729,   5.4015817017]])
    What I need to be able to do is subtract the value of A(0,0) from the entire column 0. Unfortunately, I have...
    See more | Go to post

  • Dunnomuch
    started a topic Plotting a matrix

    Plotting a matrix

    Hi,

    I've got a little problem in plotting a matrix that is build up in a class. Cause I've build it up in a class, I can't just plot the different arrays out of which it would consist when you build it up like this:
    [[...],[...], ... , [...]]

    I've tried to plot it by making a loop that consistently plots the rows which have f1, f2 and t in it (Respectively being the first function, the second function and the...
    See more | Go to post

  • Dunnomuch
    started a topic Forward Euler method for N-dimensional ODE

    Forward Euler method for N-dimensional ODE

    Hi,

    I'm trying to come up with a FWE method for an N-dimansional ODE. So far, I was able to turn the one dimensional solution into a two dimensional one:

    Code:
    from scitools.std import *
    import numpy as numpy
    v0=0
    K=3 
    n=10
    dt=0.1
    t0=0
    
    def f1(u1, u2, u3, t):
        return u1
    
    def f2(u1, u2, u3, t):
        return u2
    
    def f3(u1,
    ...
    See more | Go to post
    Last edited by Dunnomuch; May 10 '10, 10:17 AM. Reason: faulth in syntax

  • Xentrik
    started a topic Help with pure functions

    Help with pure functions

    I am a beginner working my way through How To Think Like A Computer Scientist. I am having a problem with an exercise that multiplies a matrix by a scalar. def scalar_mult(n, m), n being the scalar and m being the matrix.
    My code works but I guess its not a pure function because if I put in

    >>> m = [[1, 2], [3, 4]]
    >>> scalar_mult(3, m)

    my return is [[3, 6], [9, 12]] which is correct,...
    See more | Go to post

  • arperidot
    started a topic C/C++ Matrix/Vector Calculation
    in C

    C/C++ Matrix/Vector Calculation

    Hey, I have a program which is done but it gives me the wrong output. It would be greatly appreciated if somebody could help me get the correct output. The question asks:

    Develop a program which computes the current value of the vector {x} based on the following forward iteration: {x}(n+1) = [K] {x}(n)+ {z}, n = 0,1,2,3,4.

    In other words, the next vector {x} is equal to the product of [K] and the current vector {x} + constant...
    See more | Go to post
Working...