User Profile
Collapse
-
WHy dont u post the revised code tooo... -
-
Reading external File or File processing in C
Hi!
Below is the code which can be use to read and display a simple extrenal file in C...But I am wondering How can i use pointers here and access this file via pointer
Code:/* Display contents of a file on screen. */ # include "stdio.h" int main(void ) { FILE *fp ; char ch ; fp = fopen ( "sinfft.dat", "r" ) ; while
-
Shuffle a group of numbers
Hello Every one !
Suppose i have a vector a=[1 2 3 4 5 6 7 8 9 10]
Now i want to shuffle these number! and produce new vector b which consist of shuffle numbers which is best way to do it !
This problem is very similar to shuffle a group of cards!
I have a approach in my mind like
Take a random number from a, put it in a b in random position then choose another one from a... -
Arrange elements of vectors randomly
Suppose i have a vector a[i] having size of100, which means i=100 here ! Now I know if my vector is random i can rearrange it using qsort() in C..or can use bubble sort algorithm !
But suppose I want to arrange my elements randomly and remove 30% of numbers from it and again rearrange it using indices !
Problem :
How to arrange a elements of vector a[i] where i is = to 100, in random manner then chop... -
Oh its fine i corrected this code but still i am not able to figure it out how can i chop of 30% of values from this curve randomly....... ........i wabt to use rand not srand as i am looking for chopping 5% fst then 10%..slowly slowly 50%Leave a comment:
-
Simple SIn Curve
I just move from Matlab to C ;;;;;
I am trying to plot a Simple sin curve in C
Code:#include <math.h> #include <stdio.h> #define PI 3.1415926535897932384626433832795l int main() { const float dt = .001; int i, n ; float t,t1, y; t=0.0; n=20; printf(" i t y \n");
No activity results to display
Show More
Leave a comment: