Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to do something like this:

ContourPlot3D[
 Expand[Correlation[{0, 1, 2}, {b1, b2, b3}] == .5], {b1, -5, 
  5}, {b2, -5, 5}, {b3, -10, 10}]

But apparently this make the computer freeze.

share|improve this question
    
It works fine for me; it might be faster to plot expr = Re[Correlation[{0, 1, 2}, {b1, b2, b3}]] though. –  b.gatessucks Sep 1 '13 at 15:37
    
Or get rid of Expand and add Evaluated->True –  ssch Sep 1 '13 at 15:39
    
@b.gatessucks Could you please type out the whole command here? Thanks! –  qed Sep 1 '13 at 15:40
1  
ContourPlot3D[ expr == .5], {b1, -5, 5}, {b2, -5, 5}, {b3, -10, 10}]. –  b.gatessucks Sep 1 '13 at 15:52
    
I found your solution faster than the one proposed in the answer. Could you please post it as an answer? –  qed Sep 1 '13 at 18:55
add comment

1 Answer 1

First simplify your function:

f[b1_, b2_, b3_] = FullSimplify[Correlation[{0, 1, 2}, {b1, b2, b3}], 
  Assumptions -> {b1, b2, b3} \[Element] Reals]

enter image description here

The plot. Teared edge is where singularity happens. Stripes help you to see where the slope is steeper.

ContourPlot3D[
 f[b1, b2, b3] == .5, {b1, -5, 5}, {b2, -5, 5}, {b3, -10, 10}, 
 MeshFunctions -> {#3 &}, MeshShading -> {Red, Automatic}, 
 ContourStyle -> Directive[Opacity[0.5], Yellow]]

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.