E46 BMW Social Directory E46 FAQ 3-Series Discussion Forums BMW Photo Gallery BMW 3-Series Technical Information E46 Fanatics - The Ultimate BMW Resource BMW Vendors General E46 Forum The Tire Rack's Tire Wheel Forum Forced Induction Forum The Off-Topic The E46 BMW Showroom For Sale, For Trade or Wanting to Buy

Welcome to the E46Fanatics forums. E46Fanatics is the premiere website for BMW 3 series owners around the world with interactive forums, a geographical enthusiast directory, photo galleries, and technical information for BMW enthusiasts.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   E46Fanatics > Everything Else > The Off-Topic > General Off-Topic

General Off-Topic
Everything not about BMWs. Posts must be "primetime" safe and in good taste. You must be logged in to see sub-forums.
Click here to browse all new posts.

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 01-28-2013, 07:24 PM   #21
cowmoo32
drunken science
 
cowmoo32's Avatar
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 5,532
My Ride: Trek 1.5
I figured it out.

Ok, one last problem. I need to pull the max value from two arrays and compare them. I've tried

Code:
max(sound) = s_max
Where sound is the array I'm pulling from but it doesn't work. It pulls values, but not the correct ones. I've also tried
__________________

flickher

What's this about a brownie in motion?

Last edited by cowmoo32; 01-28-2013 at 09:06 PM.
cowmoo32 is offline   Reply With Quote
Old 01-28-2013, 07:47 PM   #22
Saintluk2
Registered User
 
Join Date: Jul 2005
Location: N.J.
Posts: 513
My Ride: 2000 323i sedan
max_fps 200
Saintluk2 is offline   Reply With Quote
Old 01-28-2013, 07:52 PM   #23
v8 5
Registered User
 
Join Date: Sep 2011
Location: New Jarzy, New Jarzy
Posts: 343
My Ride: 6 speed BMW
cmd_rate 15000
cl_updaterate 15000
__________________
Gutted with a Getrag



We have 4 websites within the family.
v8 5 is offline   Reply With Quote
Old 03-17-2013, 10:34 AM   #24
cowmoo32
drunken science
 
cowmoo32's Avatar
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 5,532
My Ride: Trek 1.5
Ok, who knows arrays?

I have two arrays, 1D and 2D. I need to plot plot the 1D on the X axis and the rows of the 2D on the Y. So for every X value, I have a row in the 2D array that should be plotted in the Y. I can plot the 1D against a single value from the 2D, but I keep getting a dimensional mismatch error when I try to plot the entire row against the 1D, and I'm not sure why.

Here I'm trying to plot a single row against the 1D array, the end goal plotting every row against every value in the 1D array.
Code:
plot(drive_force[0:j],theta[2,0:n])
drive_force is 1 x j and theta is n x j. Would it work if I transposed theta to j x n?
__________________

flickher

What's this about a brownie in motion?

Last edited by cowmoo32; 03-17-2013 at 10:34 AM.
cowmoo32 is offline   Reply With Quote
Old 03-17-2013, 11:45 AM   #25
Redline
Registered User
 
Redline's Avatar
 
Join Date: Dec 2009
Location: Florida
Posts: 2,202
My Ride: ///M3 Vert
I can't math
__________________
k.

///M
Redline is offline   Reply With Quote
Old 03-17-2013, 11:47 AM   #26
nikkeiS2K
Registered User
 
Join Date: Mar 2005
Location: N/A
Posts: 353
My Ride: N/A
Send a message via ICQ to nikkeiS2K Send a message via AIM to nikkeiS2K Send a message via MSN to nikkeiS2K Send a message via Yahoo to nikkeiS2K
you need a nested for loop

Last edited by nikkeiS2K; 03-17-2013 at 11:47 AM.
nikkeiS2K is offline   Reply With Quote
Old 04-27-2013, 09:18 AM   #27
cowmoo32
drunken science
 
cowmoo32's Avatar
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 5,532
My Ride: Trek 1.5
edit: Igore that, I figured it out.

So let's say I have a 2D array filled with integers of either 1 or -1. How could I assign each value a color and plot the array? For example, -1==blue, 1==red and I want to plot them as a grid showing the value of each point in the array.
__________________

flickher

What's this about a brownie in motion?

Last edited by cowmoo32; 04-27-2013 at 09:25 AM.
cowmoo32 is offline   Reply With Quote
Old 04-27-2013, 09:27 AM   #28
So Lowww
Registered User
 
Join Date: Jun 2009
Location: Philly
Posts: 4,979
My Ride: E36M
Came in for the Counter Strike, saw math and almost shot myself
__________________
S T A N C E | W O R K S
So Lowww is offline   Reply With Quote
Old 04-27-2013, 10:52 AM   #29
z00
Registered User
 
Join Date: Oct 2009
Location: Boston
Posts: 338
My Ride: E46 M3 Manual
Iterate over each element of the array and assign a color, then plot the array. What's the problem?

Quote:
Originally Posted by cowmoo32 View Post
edit: Igore that, I figured it out.

So let's say I have a 2D array filled with integers of either 1 or -1. How could I assign each value a color and plot the array? For example, -1==blue, 1==red and I want to plot them as a grid showing the value of each point in the array.

Last edited by z00; 04-27-2013 at 10:52 AM.
z00 is offline   Reply With Quote
Old 04-27-2013, 09:31 PM   #30
nikkeiS2K
Registered User
 
Join Date: Mar 2005
Location: N/A
Posts: 353
My Ride: N/A
Send a message via ICQ to nikkeiS2K Send a message via AIM to nikkeiS2K Send a message via MSN to nikkeiS2K Send a message via Yahoo to nikkeiS2K
Quote:
Originally Posted by cowmoo32 View Post
edit: Igore that, I figured it out.

So let's say I have a 2D array filled with integers of either 1 or -1. How could I assign each value a color and plot the array? For example, -1==blue, 1==red and I want to plot them as a grid showing the value of each point in the array.
First you need to iterate through the 2D array then you can either a) determine what element you are looking at and plot it as a certain color or b) assign each element a color value and then plot them.
nikkeiS2K is offline   Reply With Quote
Old 04-27-2013, 09:37 PM   #31
cowmoo32
drunken science
 
cowmoo32's Avatar
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 5,532
My Ride: Trek 1.5
It was a lot easier than that. Python has a function that does it automatically


If any of you are interested, I'm running the Ising model on a 100x100 lattice and investigating how magnetizing certain parts of the grid affects the overall energy & mangetization
__________________

flickher

What's this about a brownie in motion?

Last edited by cowmoo32; 04-27-2013 at 09:39 PM.
cowmoo32 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Censor is ON





All times are GMT -5. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
(c) 1999 - 2011 performanceIX Inc - privacy policy - terms of use