Can someone please help with parts 1 and 3 only. Thanks! What I have so far for
ID: 3579267 • Letter: C
Question
Can someone please help with parts 1 and 3 only. Thanks!
What I have so far for 1:
t = linspace(0,8*pi,200);
x = exp(-z/20).*cos(z);
y = exp(-z/20).*sin(z);
z = t;
plot3(x,y,z)
grid on;
hold on;
comet3(x,y,z);
box on; % Draw box around plot
for 3:
colorMap = [
0, 0, 0; % First element = black
1, 1, 1; % White
1, 0, 0 % Red
1, 1, 0; % Yellow
0, 1, 0; % Green
0, 0, 1; % Blue
1, 0, 1]; % Purple
rowBuffer = [ 1, 2, 3, 4, 5,6,7,8];
image2D = [rowBuffer;
circshift(rowBuffer',0)'; % Shifts to left 1
circshift(rowBuffer',6)']; % Shifts to left 2
image(image2D) % Use the 'image' function to
% display the image array
axis off % Remove axis ticks and numbers
axis image % Set aspect ratio to obtain square pixels
colormap(colorMap) % Sets the colormap for the figure
Explanation / Answer
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
void main()
else
}
ans=h/3*(y[0]+y[n]+4*so+2*se);
printf(" final integration is %f",ans);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
void main()
else
}
ans=h/3*(y[0]+y[n]+4*so+2*se);
printf(" final integration is %f",ans);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
void main()
else
}
ans=h/3*(y[0]+y[n]+4*so+2*se);
printf(" final integration is %f",ans);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
void main()
else
}
ans=h/3*(y[0]+y[n]+4*so+2*se);
printf(" final integration is %f",ans);
getch();
}