Community Profile

photo

Jenny


Active since 2018

Followers: 0   Following: 0

Message

Statistics

  • Thankful Level 2
  • Thankful Level 1

View badges

Feeds

View by

Question


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...

6 years ago | 1 answer | 0

1

answer

Question


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...

6 years ago | 1 answer | 0

1

answer

Question


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 =...

6 years ago | 1 answer | 0

1

answer

Question


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...

6 years ago | 1 answer | 0

1

answer

Question


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...

6 years ago | 1 answer | 0

1

answer

Question


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,...

6 years ago | 1 answer | 0

1

answer

Question


What does x=randint(1,1,[1,n]); ?
What does x=randint(1,1,[1,n]); ?

6 years ago | 4 answers | 0

4

answers