Home > Software engineering >  The following c language into matalab language?
The following c language into matalab language?

Time:10-15

 # include "stdafx. H" 
# include & lt; Graphics. H>
# include & lt; Conio. H>
# include & lt; math.h>
# define PI 3.14159265358979323846
Void main ()
{
Initgraph (640, 480);
Int b, c, n;
Double a;
Int x, y, r=200;
for(n=1; n<=10; N++)
For (a=0; a{
X=(int) (n/r * 10 * cos (a) + 320 + 0.5);
Y=(int) (n/r * 10 * sin (a) + 240 + 0.5);
B=(int) (r * (n - 1)/10 * cos (a) + 320 + 0.5);
C=(int) (r * (n - 1)/10 * sin (a) + 240 + 0.5);
Setcolor (RGB (* n * n, 20, 20 * n));
The line (b, c, x, y);
}


getch();
Closegraph ();
}

CodePudding user response:

This code is to do? Draw a what?

CodePudding user response:

Is drawing of a gray image, could you tell me you will convert matalab language? Be urgent!

CodePudding user response:

To the ilovematlab BBS to ask
  • Related