CHRIS_MALL Δημοσ. 15 Ιουνίου 2005 Δημοσ. 15 Ιουνίου 2005 Gnwrizei kaneis pws ylopoieitai i entolh div se kwdika Matlab.?? Na epishmanw pws distyxws exw matlab 5.3
Axelfc Δημοσ. 15 Ιουνίου 2005 Δημοσ. 15 Ιουνίου 2005 Σου αντιγραφω απο το help του Matlab. Υποθετω πως ψαχνεις για την divergence (δεν βρηκα κατι για div). Α, ψαξε μπας και βρεις το 6.1 τουλαχιστον. θα δεις τεραστια διαφορα απο το 5.3... Εκτος απο τις συναρτησεις που εχει επιπλεον το help του σου εξηγει σχεδον τελεια τα παντα. divergence Computes the divergence of a vector field Syntax div = divergence(X,Y,Z,U,V,W) div = divergence(U,V,W) div = divergence(X,Y,U,V) div = divergence(U,V) Description div = divergence(X,Y,Z,U,V,W) computes the divergence of a 3-D vector field U, V, W. The arrays X, Y, Z define the coordinates for U, V, W and must be monotonic and 3-D plaid (as if produced by meshgrid). div = divergence(U,V,W) assumes X, Y, and Z are determined by the expression: [X Y Z] = meshgrid(1:n,1:m,1:p) where [m,n,p] = size(U). div = divergence(X,Y,U,V) computes the divergence of a 2-D vector field U, V. The arrays X, Y define the coordinates for U, V and must be monotonic and 2-D plaid (as if produced by meshgrid). div = divergence(U,V) assumes X and Y are determined by the expression: [X Y] = meshgrid(1:n,1:m) where [m,n] = size(U). Examples This example displays the divergence of vector volume data as slice planes using color to indicate divergence. load wind div = divergence(x,y,z,u,v,w); slice(x,y,z,div,[90 134],[59],[0]); shading interp daspect([1 1 1]) camlight
CHRIS_MALL Δημοσ. 15 Ιουνίου 2005 Μέλος Δημοσ. 15 Ιουνίου 2005 Σου αντιγραφω απο το help του Matlab. Υποθετω πως ψαχνεις για την divergence (δεν βρηκα κατι για div). Α' date=' ψαξε μπας και βρεις το 6.1 τουλαχιστον. θα δεις τεραστια διαφορα απο το 5.3... Εκτος απο τις συναρτησεις που εχει επιπλεον το help του σου εξηγει σχεδον τελεια τα παντα. divergence Computes the divergence of a vector field Syntax div = divergence(X,Y,Z,U,V,W) div = divergence(U,V,W) div = divergence(X,Y,U,V) div = divergence(U,V) Description div = divergence(X,Y,Z,U,V,W) computes the divergence of a 3-D vector field U, V, W. The arrays X, Y, Z define the coordinates for U, V, W and must be monotonic and 3-D plaid (as if produced by meshgrid). div = divergence(U,V,W) assumes X, Y, and Z are determined by the expression: [X Y Z'] = meshgrid(1:n,1:m,1:p) where [m,n,p] = size(U). div = divergence(X,Y,U,V) computes the divergence of a 2-D vector field U, V. The arrays X, Y define the coordinates for U, V and must be monotonic and 2-D plaid (as if produced by meshgrid). div = divergence(U,V) assumes X and Y are determined by the expression: [X Y] = meshgrid(1:n,1:m) where [m,n] = size(U). Examples This example displays the divergence of vector volume data as slice planes using color to indicate divergence. load wind div = divergence(x,y,z,u,v,w); slice(x,y,z,div,[90 134],[59],[0]); shading interp daspect([1 1 1]) camlight File mou ti vrika kai sto google afth th synartisi!Dystyxws den yparxei sto 5.3 par'olo pou yparxei i mod!!! Mipws mporeis na mou ti steileis opws kai proigoumenws? Se efxaristw kai pali!
Axelfc Δημοσ. 15 Ιουνίου 2005 Δημοσ. 15 Ιουνίου 2005 Παρε και αυτη τη συναρτηση, αλλα να ξερεις πως πριν ησουν τυχερος που ειχε dependancies η προηγουμενη τα οποια υπαρχουν στο 5.3. Και στο google αμα ψαξεις για divergence.m πιστευω να την βρεις παντως... > function div=divergence(varargin) %DIVERGENCE Divergence of a vector field. % DIV = DIVERGENCE(X,Y,Z,U,V,W) computes the divergence of a 3-D % vector field U,V,W. The arrays X,Y,Z define the coordinates for % U,V,W and must be monotonic and 3-D plaid (as if produced by % MESHGRID). % % DIV = DIVERGENCE(U,V,W) assumes % [X Y Z] = meshgrid(1:N, 1:M, 1:P) where [M,N,P]=SIZE(U). % % DIV = DIVERGENCE(X,Y,U,V) computes the divergence of a 2-D % vector field U,V. The arrays X,Y define the coordinates for U,V % and must be monotonic and 2-D plaid (as if produced by % MESHGRID). % % DIV = DIVERGENCE(U,V) assumes % [X Y] = meshgrid(1:N, 1:M) where [M,N]=SIZE(U). % % Example: % load wind % div = divergence(x,y,z,u,v,w); % slice(x,y,z,div,[90 134],[59],[0]); shading interp % daspect([1 1 1]) % camlight % % See also STREAMTUBE, CURL, ISOSURFACE. % Copyright 1984-2001 The MathWorks, Inc. % $Revision: 1.3 $ $Date: 2001/04/15 12:04:13 $ [x y z u v w] = parseargs(nargin,varargin); % Take this out when other data types are handled u = double(u); v = double(v); w = double(w); if isempty(w) % 2D [msg x y] = xyuvcheck(x,y,u,v); error(msg) if isempty(x) [px junk] = gradient(u); [junk qy] = gradient(v); else hx = x(1,; hy = y(:,1); [px junk] = gradient(u, hx, hy); [junk qy] = gradient(v, hx, hy); end div = px+qy; else %3D [msg x y z] = xyzuvwcheck(x,y,z,u,v,w); error(msg) if isempty(x) [px junk junk] = gradient(u); [junk qy junk] = gradient(v); [junk junk rz] = gradient(w); else hx = x(1,:,1); hy = y(:,1,1); hz = z(1,1,; [px junk junk] = gradient(u, hx, hy, hz); [junk qy junk] = gradient(v, hx, hy, hz); [junk junk rz] = gradient(w, hx, hy, hz); end div = px+qy+rz; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [x, y, z, u, v, w] = parseargs(nin, vargin) x = []; y = []; z = []; u = []; v = []; w = []; if nin==2 % divergence(u,v) u = vargin{1}; v = vargin{2}; elseif nin==3 % divergence(u,v,w) u = vargin{1}; v = vargin{2}; w = vargin{3}; elseif nin==4 % divergence(x,y,u,v) x = vargin{1}; y = vargin{2}; u = vargin{3}; v = vargin{4}; elseif nin==6 % divergence(x,y,z,u,v,w) x = vargin{1}; y = vargin{2}; z = vargin{3}; u = vargin{4}; v = vargin{5}; w = vargin{6}; else error('Wrong number of input arguments.'); end
alkisg Δημοσ. 15 Ιουνίου 2005 Δημοσ. 15 Ιουνίου 2005 Δοκίμασε με απλή διαίρεση και στρογγύλευση (αυτό μάλλον θα είναι κάτι σε round ή floor).
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.