TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Processing 180 by 180 array of doubles
Feb 9 2019 4:07 AM
What is the optimum way in c sharp to process or parse an 180 by 180 array of double into memory. In a nutshell someone is passing me 180by180 array from Matlab and and I need to parse into memory using c sharp. Do I really need 2-dimensional array to this? Can someone point me in the right direction of process an 180by180 array. This is the code I have below.
MULTIPLIER = (Math.PI * 2);
double azmiuthLength = (MULTIPLIER * azmiuth);
double elevationLength = (MULTIPLIER * elevation);
for (double x = 0; x < Math.PI; x += Math.PI / 180)
{
double xAxis = Math.abs(Math.sin( azmiuthLength * Math.cos(x) / azmiuthLength * Math.cos(x)));
this.antennaPattern.getRadiationArray2D()[xIndex][0] = xAxis;
int yIndex = 0;
for (double y = 0; y < Math.PI; y += Math.PI / 180)
{
double yAxis = Math.abs(Math.sin(elevationLength * Math.cos(y) / elevationLength * Math.cos(y)));
antennaPattern.getRadiationArray2D()[xIndex][yIndex] = yAxis;
yIndex++;
}
xIndex++;
}
Reply
Answers (
12
)
An error occur while adding data to datatable using loop
What is string-interning?