Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quiver3() reshape error #51

Open
jackparmer opened this issue May 26, 2015 · 1 comment
Open

quiver3() reshape error #51

jackparmer opened this issue May 26, 2015 · 1 comment

Comments

@jackparmer
Copy link
Contributor

quiver3() always seems to get this error for me:

>> fig2plotly()
To RESHAPE the number of elements must not change.
We had trouble parsing the quiver object.
This trace might not render properly.
% Create a grid of x,y, and z values
[x, y, z] = meshgrid(-0.8:0.2:0.8, -0.8:0.2:0.8, -0.8:0.8:0.8);

% Calculate homogenous turbulence values at each (x,y,z)
u = sin(pi*x).*cos(pi*y).*cos(pi*z);
v = -cos(pi*x).*sin(pi*y).*cos(pi*z);
w = sqrt(2/3)*cos(pi*x).*cos(pi*y).*sin(pi*z);

% Draw a 3 dimensional quiver plot using the quiver3 function
figure
quiver3(x, y, z, u, v, z)

% Set the axis limits
axis([-1 1 -1 1 -1 1])

% Add title and axis labels
title('Turbulence Values')
xlabel('x')
ylabel('x')
zlabel('z')

image

@jackparmer
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant