Feeds
질문
How can I plot in the same coordinate system this two images that the execution of the two codes below gives?
function h = circle(x,y,r) % r is 30 hold on th = 0:pi/50:2*pi; xunit = r * cos(th) + x; yunit = r * sin(th) + y; h = plo...
거의 7년 전 | 답변 수: 1 | 0
1
답변질문
The code below generates random points inside a regular hexagon. I need the second coordinate y of the points to be an angle from 0:2pi. How can I modify the code please?
numEdges = 6; R = 8; xVertex = R * cos((0:6)*pi/3); yVertex = R * sin((0:6)*pi/3); xVertex = [xVertex , xVertex(1...
거의 7년 전 | 답변 수: 1 | 0
1
답변질문
How can I modify this code below to generate random points inside a regular hexagon and then get the points in a vector?
numEdges = 6; xv = rand(numEdges,1); yv = rand(numEdges,1); xv = [xv ; xv(1)]; yv = [yv ; yv(1)]; numPointsIn =...
거의 7년 전 | 답변 수: 1 | 0
1
답변질문
How can I modify the code to get the sensors with the positions that fulfill the conditions below?
function [Rhoc,Alfac,Rhoc2,Alfac2]= TheRightSensors(W,n,R) for i=1:n %R is the Radius of the disk where the se...
거의 7년 전 | 답변 수: 1 | 0
1
답변질문
How can I plot a series of points in a vector with two coordinates x&y considering that I want to name these points respectively S1, S2....S10, and I want to use them in other functions just by using their "name"?
I want to plot a series of points in a vector with two coordinates x&y and I want to name these points respectively S1, S2....S1...
거의 7년 전 | 답변 수: 1 | 0
1
답변질문
How can I modify the code below to build a hexagon knowing the coordinates of the hexagon roofs?
Function []=polygon (sides) sides=6; radians=(2*pi)./sides; r=ones(1,sides); theta=1:radians:2*pi; polar(theta,...
거의 7년 전 | 답변 수: 1 | 0