当前位置:首页 >> 电力/水利 >>

Matlab转换Tecplot文件


Matlab Tutorial Session 4
This tutorial session covers the following topics 1. 2. 3. 4. 5. Variable number of arguments in functions Return, break and continue commands Advanced input and output including file input and output find and findstr commands Example programs: Output for Tecplot from Matlab, Reading a Tecplot datafile in Matlab

Next tutorial will cover (i) cell arrays and structures, (ii) differential equation solvers, and (iii) introduction to symbolic math toolbox.

Review of Session 3
? Functions in Matlab are written in a separate M-file. This M-file begins with the header
function output = functionname(input1, input2, …, inputN)

The output may be a single variable (such as function T = trace(M)), or there may be multiple output variables specified as a vector (such as function [r, theta] = polar(cpx)). ? The input and output variables are not pre-typed to be integers, strings etc. The function is written assuming proper types of variables and it is up to the user (or calling program) to provide the function with proper arguments and collect the outputs. Otherwise the user will experience error in execution. A function has no access to any variables outside it. Everything required must be passed as arguments. There is an exception to this, which is to specifically define certain variables in the workspace as global using the global command. This is discussed in this session. Function M-file must be in the current directory or in matlab path so that matlab can find it. Otherwise matlab issues an error that such a function does not exist. Subfunction may be placed in a function M-file at the end. But they cannot access the main function’s variables. They must again be passed everything as input arguments. A function may be executed by the following syntax in the program:
[out1, out2 , …, outM] = functionname ( inp1, inp2, …, inpN)

?

? ?

?

or by using the feval command
[out1, out2 , …, outM] = feval(‘functionname’,inp1,inp2,…,inpN)

? ? ? ? ?

The inline command can be used to define simple mathematical functions spontaneously, e.g. tryfunc = inline(‘sqrt(x*x + y*y + z*z’) User input can be obtained through input command. Output can be displayed more neatly by using disp command in conjunction with string functions such as strcat, num2str, mat2str. Two useful matrix-related commands are size (to obtain the size of a matrix in terms on number of rows and columns) and length (to obtain length of a vector). Empty matrix [], Infinity inf, and Not a Number nan are special constants. They can be tested by isempty, isinf and isnan Matlab functions respectively.

Passing variable number of arguments to functions
There are two ways of receiving variable number of inputs in a function – ? When the maximum number of arguments is fixed and reasonable small: The function is defined in usual form with all arguments and Matlab accepts the user’s passing less number of arguments than those defined. However if user tries to pass more number of arguments, Matlab will give error. Internally, the function must check how many arguments were actually passed by the user and should not try to use the variables that were not passed. Matlab provides nargin command by which the function can check how many arguments were passed. Following is an illustration (vector norm).
function R=vecnorm(V,p) % To compute Lp norm of vector V if nargin==0 % nargin = number of arguments received error('Too few parameters passed'); elseif nargin==1 p=2; % p is not specified, so computing L2 norm else p=round(p); % Ensuring that p is an integer end V2 = abs(V); % The abs function will act on the whole vector R = ( sum( V2.^p ) ) ^ (1/p); Output

>> vecnorm([1 1]) ans = 1.4142 >> vecnorm([1 1],1) ans = 2

? p?p Here R is computed as ? ? Vi ? . The error command in a function terminates ? i ? the execution of the function immediately and displays the specified error string on Matlab command window.

1

?

When the maximum number of arguments is large or unknown: The unknown arguments are specified using the name varargin. Varargin returns a cell-array of arguments. Cell arrays will be discussed in the next tutorial. For now, the syntactical difference from usual arrays is that cell arrays are indexed using curly braces instead of round braces, e.g. C{i,j} instead of C(i,j). Similarly, any number of arguments can be returned back using varargout. Following example function illustrates use of varargin and varargout.
function varargout=vecnorm(p,varargin) % To compute Lp norm of any number of given vectors % The usage format will be: % [r1,r2,...,rn]=vecnorm(p,v1,v2,...,vn) if nargin<2 error('Too few parameters passed'); else p=round(p); % Ensuring that p is an integer end for i=1:(nargin-1) V=varargin{i}; V2 = abs(V); R = ( sum( V2.^p ) ) ^ (1/p); varargout{i}=R; end Output: >> [r1,r2,r3]=vecnorm(2,[1 1],[1 1 1],[1 1 1 1]) r1 =

1.4142 r2 = 1.7321 r3 = 2

?

Notes: o The input arguments that are necessary must be placed in the beginning of the function, as Matlab does not allow arguments skipped in between. For example if user has to provide the fourth argument, he must also provide first three. For the same reason, arguments are usually ordered according to decreasing necessity. o Varargin and vargout are last input / return arguments. E.g.
function [a,b,varargout]=xyz(d,e,f,varargin)

Return, Break and Continue
? It is possible to exit out of a Matlab function suddenly by using the return command. For example, following is a modified version of the Newton Raphson (NR) function (discussed in tutorial session 3). In previous NR function, exit criterion was that either error (= xnew – x) becomes less than tolerance, or we diverge to infinity. Here the check for divergence is modified that error keeps on increasing for 5 continuous iterations. The return command helps exit out of iterations in the middle.
function Root=NewtonRaphson(F,FD,guess,tol) % % % % F is the user defined function passed as a string FD is the derivative function of F, again passed as a string guess is the initial guess tol is the error tolerance

error=inf; iter=0; x=guess; count=0; % In this variable we will count the number of times % that error is consecutively increasing while (error>tol) prev_error=error; iter=iter+1; fx=feval(F,x); fdx=feval(FD,x); % Storing the previous error

xnew=x-fx/fdx; error=abs(xnew-x); x=xnew; % The following statements check for progressively % increasing errors and quit if NR is diverging. if prev_error>error count=count+1; else count=0; end if count>4 disp('Divergence occured'); Root=nan; return; end end Root=x;

Output
>> f1=inline('log(x)') f1 = Inline function: f1(x) = log(x) >> f1d=inline('1/x') f1d = Inline function: f1d(x) = 1/x >> NewtonRaphson(f1,f1d,0.8,1.0e-5) ans = 1.0000 >> NewtonRaphson(f1,f1d,2,1.0e-5) Divergence occured ans = NaN

?

Similarly it is possible to end a for loop in between using break. Following is an illustration
% Computing the product of elements of a vector V P=1; % P will store the product

for i=1:length(V) if V(i)==0 P=0; break; % No need to multiply further terms else P=P*V(i); end end

?

The continue command does not break the for loop, but skips one iteration. From the point in the iteration where the keyword continue appears, that iteration of the for loop is abandoned and next iteration continues. For example
% Computing the product of elements of columns % of a matrix M only for those columns which % have sum not equal to zero [nr,nc]=size(M); for j=1:nc V=M(:,j); if sum(V)==0 P(j)=nan; continue; end % nr = no. of rows, nc=no. of columns

% since this column has sum 0, we skip

P(j)=1; for i=1:nr if V(i)==0 P(j)=0; break; else P(j)=P(j)*V(i); end end end

?

Hence the difference between break and continue is that break terminates the whole for loop, while continue terminates only one iteration.

Advanced Input / Output
Matlab provides low level input and output commands which have exactly same name and format as those available in C language. These input / output commands are listed in the table below with their syntax Command sprintf sscanf Syntax
S=SPRINTF(FORMAT,varargin) A = SSCANF(S,FORMAT,SIZE)

Purpose Gives formatted output as a string Input formatted data as a string

fopen fclose fseek frewind ftell feof fread fgetl fgets fscanf fwrite fprintf

FID = FOPEN(FILENAME,PERMISSION) ST = FCLOSE(FID) ST = FSEEK(FID, OFFSET, ORIGIN) FREWIND(FID) POSITION = FTELL(FID) FEOF(FID) A=FREAD(FID,SIZE,PRECISION,SKIP) TLINE = FGETL(FID) TLINE = FGETS(FID, NCHAR) A = FSCANF(FID,FORMAT,SIZE) FWRITE(FID,A,PRECISION) FPRINTF(FID,FORMAT,varargin)

Open a file for read / write. Close an open file Go to a specified position in file Go to the beginning of the file Check the current file position Test whether end of file is reached Read a specific variable from file Read one line from a text file Read one string from a text file Read formatted data from a file Write a specific variable to file Write formatted data to file

For most practical purposes, only the following commands are required: sprintf, sscanf, fopen, fclose, feof, fgetl, fprintf, fscanf. One common feature of sprintf, sscanf, fprintf and fscanf commands is the FORMAT string. The format string defines what is to be output and with what formatting. Format string contains format specifiers, which begin with the character %. This is illustrated by examples below. The sprintf command below outputs a string according to the format string and given variables. This output string is displayed by disp command.
>> disp(sprintf('A simple string')) A simple string % when the format string is a simple string, it is output % ditto >> an_int=10; >> disp(sprintf('A simple integer %d is displayed',an_int)) A simple integer 10 is displayed % The format specifier %d specifies that integer will come at % that position. At this point, it will be useful to look at % the table below which lists all format specifiers >> disp(sprintf('Pi = %f is a real number',pi)) Pi = 3.141593 is a real number % Here, %f denotes a floating point number to be displayed >> disp(sprintf('Pi = %20.10f is a real number',pi))

Pi = % % % % %

3.1415926536 is a real number

This is an example of specifying the width and precision fields (please refer table below). Here width=20 specifies that 20 columns are to be used to display the full number and precision=10 indicates that we want to see up to 10 decimal places

>> disp(sprintf('Pi = %0.10f is a real number',pi)) Pi = 3.1415926536 is a real number % when specified width (here zero) is less than the required % number of columns, it is neglected >> disp(sprintf('Pi = %15.10e is a real number',pi)) Pi = 3.1415926536e+000 is a real number % Here the conversion symbol e denotes exponential notation >> A=[1:10; 2:11]; >> [nr,nc]=size(A); >> disp(sprintf('The matrix A is a %d x %d matrix.',nr,nc)) The matrix A is a 2 x 10 matrix. % % % % This example demonstrates how more than one format specifier can occur in a format string. Correspondingly number of parameters passed to sprintf increases. sprintf function can accept any number of arguments.

General syntax of format specifier is %[width][.precision] conversion symbol (square braces indicate optional parameters) Conversion symbol c i,d o Meaning Example
>> sprintf('%c',75) ans = K % K is ascii 75 >> sprintf('%d',75) ans = 75 >> sprintf('%o',75) ans = 113 % (113)8 = (75)10 >> sprintf('%X',75) ans = 4B % (4B)16 = (75)10

Single character Integer Octal output Hexadecimal output (capital X produces all capital letters A-F, small x produces a-f)

x,X

u s f e,E g,G %

Unsigned integer String Floating point format real number Exponential format real number Either of floating point or exponential format, whichever is more compact The % character

>> sprintf('%u , %d',-75, -75) ans = -7.500000e+001 , -75 >> sprintf('%s %s',[75 76 77 78],'def') ans = KLMN def >> sprintf('%f',1.1e-4) ans = 0.000110 >> sprintf('%e',1.1e-4) ans = 1.100000e-004 >> sprintf('%g',1.1e-4) ans = 0.00011 >> sprintf('75%%') ans = 75%

Apart from format specifiers, there is another set of special symbols that occur in the format string. These begin with the backslash character \. For example one very often occurring symbol is \n, which specifies a newline (linefeed or carriage return) character.
>> disp(sprintf('The newline \n character')) The newline character >> disp(sprintf('A(1) = %d \nA(2) = %d',A(1),A(2))) A(1) = 1 A(2) = 2

A whole list of special symbols is shown in the table below Special symbol \n Meaning Example
>> sprintf('abc\n75') ans = abc 75 >> sprintf('abc\r75') ans = abc 75 >> sprintf('abc\t75') ans = abc 75

Newline character (ascii 10)

\r

Carriage return (ascii 13)

\t

Tab (ascii 9)

\b

Backspace (ascii 8)

>> sprintf('abc\b75') ans = ab75 >> sprintf('abc\f75') ans = abc? 75 >> sprintf('abc\\75') ans = abc\75 >> sprintf('abc\251def') ans = abc?def

\f

Formfeed (ascii 12)

\\

Backslash Where num is a number in octal form (base 8), gives ascii(num)

\num

The sscanf command The sscanf command does the opposite of sprintf – it obtains values of variables out of a formatted string according to the specified format. It has the syntax,
A = sscanf(S,FORMAT_STRING,SIZE)

However it is much less powerful as i. It can process only one variable at a time, ii. It cannot handle presence of other unnecessary characters in the string, iii. It requires almost exact formatting otherwise it can get confused. E.g.
>> A=sscanf('3.141','%f') A = 3.1410 >> A=sscanf('3.141','%d') A = 3 >> A=sscanf('Pi = 3.141','%f') A = '' % sscanf could not extract the number >> A=sscanf('Pi = 3.141','Pi = %f')

A = 3.1410 % when exact formatting was given, it could get the number >> A=sscanf('Pi = 3.141','Alpha = %f') A = '' % but by slight change, it again failed >> [a,b]=sscanf(SS,'%d apples and %f oranges') a = 8.0000 9.2500 b = 2 % The above example demonstrates failure of sscanf to handle % more than one variable at a time. The correct procedure % in this case would be: >> b=sscanf(SS,sprintf('%d apples and %%f oranges',a)) b = 9.2500 % Please note that double % sign (%%) is used to specify a % single % sign in the output of sprintf

?

Matlab string commands (such as strcat, num2str, mat2str etc. discussed in tutorial session 3) can be handy in this context. For example
>> sprintf('The matrix A is %s\n',mat2str(A)) ans = The matrix A is [1 2 3;2 3 4]

File input / output The above sprintf and sscanf commands are extended to files by fprintf and fscanf commands. An overview of low level file processing in Matlab is as follows.

Just as figure windows (tutorial session 2) had a unique integer figure ID assigned to them, each open file has an integer file ID assigned to it. This integer is technically called a handle. Figure handle, file handle, user interface handle, … are various types of handles. Handles in general are integers or real numbers. A file handle is obtained by fopen command. The fopen command can also be told whether we want to read the file, write to it, do both, or append to it etc., although it is not necessary to specify this. Then the obtained file handle can be used with various commands such as fprintf, fscanf, fgetl, feof etc. When the work is over, the file must be closed using the fclose command, otherwise some error or loss may occur. File operations are illustrated in the example programs and appropriate comments are given all along.

Example Programs
1. This program generates a 2D mesh and outputs the data so that Tecplot can read it.
clear all; close all; % Generating a 2D mesh for Tecplot. % This is a mesh for an axisymmetric diffuser. % Parameters are below L1=10; L2=6; L3=4; R1=0.5; theta=deg2rad(5); % theta = 5 degrees converted to radians R2=R1+L2*tan(theta); % Number of elements or edges nex1=25; nex2=40; ney=40; % Rectangular zone end points are specified below Z1=[ 0,R1 ; L1,R1 ; L1,0 ; 0,0 ]; Z2=[ L1,R1 ; L1+L2,R2 ; L1+L2,0 ; L1,0 ]; % Now creating the edge points for zone 1. There are % four edge lines, each having several edge points % Function Pinterpol is listed after this main program listing E1=Pinterpol(Z1(1,1), Z1(1,2), Z1(2,1), Z1(2,2), nex1); E2=Pinterpol(Z1(4,1), Z1(4,2), Z1(3,1), Z1(3,2), nex1); % Now generating the mesh for Zone 1 for i=1:(nex1+1) V=Pinterpol(E1(i,1),E1(i,2),E2(i,1),E2(i,2),ney); M1(i,1:(ney+1),1:2)=V; end % Similarly for zone 2 E1=Pinterpol(Z2(1,1), Z2(1,2), Z2(2,1), Z2(2,2), nex2); E2=Pinterpol(Z2(4,1), Z2(4,2), Z2(3,1), Z2(3,2), nex2); for i=1:(nex2+1)

V=Pinterpol(E1(i,1),E1(i,2),E2(i,1),E2(i,2),ney); M2(i,1:(ney+1),1:2)=V; end % Now writing the output datafile for Tecplot h1=fopen('mesh1.dat','w'); % h1 gets the handle for file named "mesh1.dat". % 'w' specifies that it will be written. % Similarly 'r' is for reading and 'a' is for appending fprintf(h1,'TITLE = "Mesh from Matlab"\n'); fprintf(h1,'VARIABLES = "X" "Y"\n'); fprintf(h1,'ZONE T="Inlet zone"\n'); fprintf(h1,'I=%d, J=%d, K=1, F=POINT\n\n',nex1+1,ney+1); for j=1:(ney+1) for i=1:(nex1+1) fprintf(h1,'%f\t%f\n',M1(i,j,1),M1(i,j,2)); end end fprintf(h1,'ZONE T="Diffuser zone"\n'); fprintf(h1,'I=%d, J=%d, K=1, F=POINT\n\n',nex2+1,ney+1); for j=1:(ney+1) for i=1:(nex2+1) fprintf(h1,'%f\t%f\n',M2(i,j,1),M2(i,j,2)); end end fclose(h1);

(to be saved as Pinterpol.m) function E=Pinterpol(x1,y1,x2,y2,ne) xstep=(x2-x1)/ne; ystep=(y2-y1)/ne; for i=1:(ne+1) E(i,1) = x1 + (i-1)*xstep; E(i,2) = y1 + (i-1)*ystep; End

In this program, the quadrilateral zone is taken as follows:

?x2 , y2 ? ?x1 , y1 ?
?x3 , y3 ?

?x4 , y4 ?
Tecplot output is shown below

1 0.9 0.8 0.7 0.6

Y

0.5 0.4 0.3 0.2 0.1 0 0 5 10 15

X

Please use help fopen and help fclose in Matlab command window for details on these two commands.

Example 2.
This program reads a Tecplot output datafile and plots it in Matlab. Here, Tecplot was earlier used to extract a subzone from some data and this subzone was written to a datafile in ascii, point format. A sample of the datafile is shown below. This is to be read in Matlab and processed further.
TITLE = "Internally created dataset" VARIABLES = "X" "Y" ZONE T="SubZone" I=2, J=25, K=1,F=POINT DT=(SINGLE SINGLE ) 0.000000000E+000 0.000000000E+000 1.111111119E-001 0.000000000E+000 0.000000000E+000 0.000000000E+000 1.073250920E-001 2.875767089E-002 0.000000000E+000 0.000000000E+000 9.622504562E-002 5.555555597E-002 0.000000000E+000 0.000000000E+000 7.856742293E-002 7.856742293E-002 0.000000000E+000 0.000000000E+000 5.555555597E-002 9.622504562E-002 0.000000000E+000 0.000000000E+000 2.875767089E-002 1.073250920E-001 0.000000000E+000 0.000000000E+000 6.803368632E-018 1.111111119E-001 0.000000000E+000 0.000000000E+000 -2.875767089E-002 1.073250920E-001 0.000000000E+000 0.000000000E+000 -5.555555597E-002 9.622504562E-002 0.000000000E+000 0.000000000E+000 -7.856742293E-002 7.856742293E-002 ...................... (continued, total 50 lines)

With knowledge of some other data structures provided by Matlab (such as cell arrays, struct etc.), it is possible to build an efficient and general program that can parse various types of Tecplot files automatically, identifying the needful to be done in various situations. That will be included in some later session. The program below here is not very general but can identify I, J, K and number of variables. One important command introduced here is the find command. It finds indices of nonzero elements of the given vector or matrix. E.g. I = find(X) returns the indices of the vector X that are non-zero.
>> X=[2 4 0 3 1 0]; >> I=find(X) I = 1 2 4 5

It forms a powerful combination with relational operators, eliminating the need of multiple for loops and accomplishing complex tasks in a single line. E.g. ? To find all elements of a vector X which are greater than 100. Generally it will require a for loop, but here it is accomplished easily as
>> X=[50 233 75 110 99]; >> find(X>100) ans = 2 4

Because the relational operator > applied to matrix X returns a matrix of 1’s or 0’s indicating true or false for each element. ? To replace an occurrence of a number with another
>> X=[20 40 50 40 40 60]; >> X( find(X==40) )=100 X = 20 100 50 100 100 60

?

To limit a matrix to a maximum value
>> X=rand(2,6) X = 0.4186 0.8462 0.5252 0.2026 0.6721 0.8381 0.0196 0.6813 0.3795 0.8318 0.5028 0.7095

>> X( find(X>0.5) )=0.5 X = 0.4186 0.5000 0.5000 0.2026 0.5000 0.5000 0.0196 0.5000 0.3795 0.5000 0.5000 0.5000

There can be many other uses. find can also return the vector of non-zero elements.
>> X=[200 400 0 30 100 0]; >> [J,I,V]=find(X) J = 1 I = 1 V = 200 400 30 100 2 4 5 1 1 1

In this case, find command always assumes a rectangular matrix and thus returns (I, J) indices even for vectors. Another command used in the program is findstr, which locates the position of one string within another (whichever is smaller is searched in the larger). E.g.
>> findstr('ABCDE','BCD') ans = 2 % ‘BCD’ begins at position 2 within ‘ABCDE’ >> findstr('J=','I=10, J=11, K=1') ans = 7

Following is the Matlab program to process the Tecplot file. It is little complex, but it can automatically detect the number of variables and the values of I, J, K.
function [title, info, data]=readtecout(filename) % This is a function to read data from an output file generated % by tecplot. It is not too general, but can know I, J, K and % the number of variables f=fopen(filename,'r'); s=''; while (isempty(findstr(s,'TITLE'))) s=fgetl(f); % Reads one line from the text file and % assigns it as a string to s. end of line % character is identified by this command end a=find(s=='"'); % Looking for presence of double % quote character: " title=s( (a(1)+1) : (a(2)-1) ); % Now looking for variables s=''; while (isempty(findstr(s,'VARIABLES'))) s=fgetl(f); end a=find(s=='"'); NV=length(a)/2; % NV contains the number of variables found % since each variable name is within quotes (e.g. "X"), number % of variables = number of quotes / 2 % Finding more variables a=[]; while (isempty(findstr(s,'ZONE'))) NV=NV+length(a)/2; s=fgetl(f); a=find(s=='"'); end

% Now parsing the line with I, J, K values s=fgetl(f); a=findstr(s,'I='); s1=''; c=''; i=a+2; while (c~=',') c=s(i); s1=strcat(s1,c); i=i+1; end I=str2num(s1); a=findstr(s,'J='); s1=''; c=''; i=a+2; while (c~=',') c=s(i); s1=strcat(s1,c); i=i+1; end J=str2num(s1); a=findstr(s,'K='); s1=''; c=''; i=a+2; while (c~=',') c=s(i); s1=strcat(s1,c); i=i+1; end K=str2num(s1); a=findstr(s,'F='); F=s( (a+2) : (a+6) ); if (strcmp(F,'BLOCK')) % String compare command disp('No facility yet to process block format.'); return; end info=[I J K NV]; s=fgetl(f); %skipping the line that contains DT=(SINGLE...) % now reading the data LineNo=0; while (~feof(f)) s=fgetl(f); LineNo=LineNo+1; a=find(s==' '); % finding blanks L=length(a); b=a( find((a(2:L)-a(1:(L-1)))>1)+1 ); % finds only non-consecutive blank locations % which gives only the actual separators L=length(b); if L>0 b=[1 b length(s)]; for i=1:(L+1) N(LineNo,i)=str2num( s(b(i):b(i+1)) );

end end end % now all the data is in N LineNo=0; for k=1:K for j=1:J for i=1:I LineNo=LineNo+1; for v=1:NV data(v,i,j,k)=N(LineNo,v); end end end end % Data transferred to variable ‘data’

Output: The mesh is drawn in Tecplot using the following M-file
clear all; close all; [T,info,D]=readtecout('tecout.dat'); disp(sprintf('File title is "%s"',T)); disp(sprintf('I= %d',info(1))); disp(sprintf('J= %d',info(2))); disp(sprintf('K= %d',info(3))); disp(sprintf('No. of variables= %d',info(4))); n=0; for i=1:info(1) for j=1:info(2) for k=1:info(3) n=n+1; x(n)=D(1,i,j,k); y(n)=D(2,i,j,k); end end end plot(x,y);

Output in command window:
File title is "Internally created dataset" I= 2 J= 25 K= 1 No. of variables= 2

Output mesh is shown in figure below

0.15

0.1

0.05

0

-0.05

-0.1

-0.15

-0.2 -0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

As seen in Matlab
Frame 001 ? 06 May 2003 ? Internally created dataset

0.1

0.05

Y

0

-0.05

-0.1 -0.1 0 0.1

X

As seen in Tecplot


相关文章:
Tecplot画等值线的操作步骤详细介绍(第一部分)
1. 运行 FLAC3D 程序, 先调用 FLAC3D 计算结果的保存文件 xxxx.sav, 命令为: restore xxxx.sav 然后,调用 dynamax 编制的 flac3d 到 tecplot转换程序 ...
Tecplot速成帮手
文件倒入 tecplot 后: 1.为何在 fluent 后处理中...只不过麻烦一点 A: 当然最简单就是用 Matlab,我...从 再编程转换格式, 很多软件都能做, 上面的就是...
Tecplot功能介绍
暂无评价|0人阅读|0次下载|举报文档Tecplot功能介绍_理学_高等教育_教育专区。Tecplot...转换单元中心数据:在单元角(节点)点处插入单元中心数据。 映射和子集: 利用...
matlab中遇到的一些问题
建议使用 Tecplot,参见 Tecplot 手册中数据格式,将你 的三维数据读入 Tecplot,...文件: 1.将需要拷贝的图作为当前窗口 2.再转换matlab 命令窗口,print -...
TECPLOT7_流测FFT绘图
暂无评价|0人阅读|0次下载|举报文档 TECPLOT7_流测FFT绘图_IT/计算机_专业资料...基于Matlab和串口通信的... 8页 免费 n-InP在Fe3+Fe2+溶液中光... 暂无评...
matlab常见问题合集
将你 的三维数据读入 Tecplot,双击 zone,可以设置 ...文件,其中 cd yourpath 或者在 X:\matlab\toolbox...再转换matlab 命令窗口,print -deps filename....
matlab与fluent
matlab与fluent_信息与通信_工程科技_专业资料。%打开文件并读入数据 fid=fopen(...(fid) %用 tecplot 格式输出 fid=fopen('tecpost','w'); fprintf(fid,'...
更多相关标签: