Search:

Type: Posts; User: magda3227

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    4,051

    Complex Cholesky Function

    I was wondering if it would be possible to get some help on writing a cholesky function that works for complex numbers. Thus far, I have one that works for real numbers. I figured that adding a few...
  2. Replies
    10
    Views
    3,197

    Thanks. That makes sense. I was too stupid to...

    Thanks. That makes sense.

    I was too stupid to figure that out.
  3. Replies
    10
    Views
    3,197

    I recently came across something that has been...

    I recently came across something that has been giving me seg. viol.

    If I want to create a 2-D array of size 2x6, when I allocate memory for my pointer, I would assume that it needs to be done as...
  4. Replies
    10
    Views
    3,197

    I see. I now also found out I'm getting...

    I see.

    I now also found out I'm getting segmentation violation when I try to free some of my other pointers, even though I no longer use them. I actually allocated them within in a switch...
  5. Replies
    10
    Views
    3,197

    So how is that freeing memory if the values...

    So how is that freeing memory if the values stored within the pointer are not changed?
    Doesn't it take memory to keep those values there?

    In another area of my program, when I free a pointer,...
  6. Replies
    10
    Views
    3,197

    Trouble freeing a pointer

    I have no idea why, but when I try to free a pointer that I allocated memory for, the free fails. I test to see if the pointer is NULL after the free, and it is not. I can still print all the values...
  7. Replies
    6
    Views
    4,349

    Pseudorandom Number Generator

    As far as I know, there is no pseudo random number generator for c. I don't know much about probability and statistics, but does anyone else know of a method or function (or perhaps a library that...
  8. Replies
    10
    Views
    2,741

    Not that anyone would care, but I found the...

    Not that anyone would care, but I found the error. it had to do with looping past a pointer. I was trying to access something that wasn't there. I'm not sure why it didn't show up until the second...
  9. Replies
    3
    Views
    1,646

    So then I would have to declare the matrices as...

    So then I would have to declare the matrices as such...



    int row, col;
    matrix1[row][col]

    and then make make the row and col actual integers for each separate case?

    Is that "proper"...
  10. Replies
    3
    Views
    1,646

    Pointers or Arrays?

    I am rewriting MatLab code in C and I need some direction on how to approach converting the code.

    Basically, a user inputs one of 6 scenarios. Each scenario has about 6 matrices with stored...
  11. Replies
    7
    Views
    18,482

    Thank you very much matsp.

    Thank you very much matsp.
  12. Replies
    7
    Views
    18,482

    Thanks. This works... char...

    Thanks. This works...





    char Scenario[7]="ABCDEF";
    char UserScenario;
    char *p=NULL;
  13. Replies
    7
    Views
    18,482

    Hm. It's still not working. I tried using ...

    Hm. It's still not working. I tried using


    if(UserScenario >= 'A' && UserScenario <= 'F')

    and that didn't work. I also tried making my character array into a string and searching it. It...
  14. Replies
    7
    Views
    18,482

    Character Array comparison

    I was wondering how I would go about checking a character array for a specific character that keeps changing.

    What I want to do is compare the User input to the string. If the user does not pick...
  15. Replies
    10
    Views
    2,741

    Thanks. I'll make sure to compile using -wall and...

    Thanks. I'll make sure to compile using -wall and make the changes you suggested.
  16. Replies
    10
    Views
    2,741

    Yeah, sorry. I removed that. M is a user defined...

    Yeah, sorry. I removed that. M is a user defined value returned from a previous function that I took out because this program is huge. At the time when I use malloc, M has a non-zero value.
  17. Replies
    10
    Views
    2,741

    It's a lot... Main Function ...

    It's a lot...

    Main Function

    #include<stdio.h>
    #include<stdlib.h>
    #include"corrheader.h"

    struct
    {
  18. Replies
    10
    Views
    2,741

    Segmentation Fault?

    I am writing some code that uses a function twice in order to create two matrices, each stored under a different variable name. However, when I try to use the function the second time, I get a...
  19. Replies
    10
    Views
    4,627

    Thank you to all who responded. Your...

    Thank you to all who responded.

    Your explanations were very helpful, especially the examples you provided. I learn visually, and they really helped me to understand what's going on and the...
  20. Replies
    10
    Views
    4,627

    I made the changes so that the second function...

    I made the changes so that the second function accepts a pointer to a pointer. But how does this change the way I store the values? I'll have to change the notation for incrementing the pointer and...
  21. Replies
    10
    Views
    4,627

    My compiler gives me an error when I try to send...

    My compiler gives me an error when I try to send the addresses of the pointers. It says that I'm passing from incompatible pointer types.

    That's what you meant when you said passing by reference,...
  22. Replies
    10
    Views
    4,627

    Memory allocation/reallocation

    I'm still learning about pointers and using malloc, so please bare with me.

    I was wondering if it is possible to allocate memory for a pointer in a main function, send that pointer to another...
  23. Replies
    4
    Views
    8,091

    I was planning on using isnan, but after I had...

    I was planning on using isnan, but after I had already returned the value from the function. I was going to check the variable I saved it in using isnan or isinf. Otherwise, they don't do much for me...
  24. Replies
    4
    Views
    8,091

    Returning Nan or Inf

    I'm rewriting MatLab code into C and need to send values to a complex error function. The erfcomp function produces Nan and Inf values, but when I try to return these values to my other function and...
  25. Replies
    9
    Views
    1,447

    Some of the variables are used later on, in the...

    Some of the variables are used later on, in the part of code I didn't post.

    This is part of a larger program I am converting from MatLab to C. It will be linked later. The cluster number is user...
Results 1 to 25 of 46
Page 1 of 2 1 2