Comments (2)
That's it--I didn't notice that z
had to be rotated relative to x
and y
. Thanks!
from owl.
@mars0i I think the reason is the shape of these matrices don't match. The z
should have shape 9 x 8
instead of 8 x 9
. So if you use meshgrid
to create these two matrices x
and y
, then you can write
let x, y = Mat.meshgrid 0. 8. 0. 7. 9 8;;
C0 C1 C2 C3 C4 C5 C6 C7 C8 R0 0 1 2 3 4 5 6 7 8
R1 0 1 2 3 4 5 6 7 8
R2 0 1 2 3 4 5 6 7 8
R3 0 1 2 3 4 5 6 7 8
R4 0 1 2 3 4 5 6 7 8
R5 0 1 2 3 4 5 6 7 8
R6 0 1 2 3 4 5 6 7 8
R7 0 1 2 3 4 5 6 7 8
C0 C1 C2 C3 C4 C5 C6 C7 C8
R0 0 0 0 0 0 0 0 0 0
R1 1 1 1 1 1 1 1 1 1
R2 2 2 2 2 2 2 2 2 2
R3 3 3 3 3 3 3 3 3 3
R4 4 4 4 4 4 4 4 4 4
R5 5 5 5 5 5 5 5 5 5
R6 6 6 6 6 6 6 6 6 6
R7 7 7 7 7 7 7 7 7 7
(* then z should be 9 x 8 *)
let z = Mat.uniform 9 8;;
C0 C1 C2 C3 C4 C5 C6 C7 R0 0.222671 0.434721 0.650298 0.518921 0.881284 0.802989 0.91419 0.493246
R1 0.816488 0.249789 0.23474 0.653041 0.903702 0.776013 0.528878 0.786525
R2 0.881226 0.311529 0.215572 0.138114 0.800453 0.869957 0.356799 0.739012
R3 0.285757 0.575163 0.453706 0.856444 0.848671 0.267722 0.811779 0.436114
R4 0.670338 0.27585 0.271778 0.730103 0.485819 0.965297 0.415441 0.329227
R5 0.833202 0.493767 0.874061 0.965179 0.806662 0.191208 0.541577 0.468292
R6 0.457119 0.457139 0.27113 0.136853 0.534103 0.973245 0.8913 0.969978
R7 0.527856 0.856772 0.712637 0.134343 0.0414307 0.51925 0.190386 0.615259
R8 0.79921 0.171861 0.863142 0.279621 0.981742 0.57437 0.638904 0.681927
Plot.plot3d x y z;;
from owl.
Related Issues (20)
- The setter function for matrices in Owl_algodiff.D.Mat does not work HOT 2
- Cannot install owl-1.1 through opam because of `unmet availability conditions` HOT 2
- `libgfortran.so` not linked and causing compilation error HOT 8
- Cephes build warnings on Arch Linux
- Incorrect `Owl_const.min_float64` value? HOT 1
- Owl_dataframe shouldn' t use 'string_of_float' HOT 1
- Documentation is not in sync with current way plots are working
- OCaml cannot fins owl package HOT 1
- ssqr_diff' modifies inputs in place HOT 2
- Failure to load datasets for neural nets HOT 1
- Broken link to Algodiff module. HOT 2
- Exponential regression -- incorrect case HOT 1
- Test fails with GCC 13
- `Dataframe.to_cols` returns columns of incorrect size HOT 1
- Move project to ocaml-community HOT 7
- OCaml 5.2 support
- Reintroduce owl-plplot HOT 6
- Dead link to TODO list HOT 1
- Random.float bounds are inclusive, be careful with logarithms
- Dataframe issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owl.