已回答
Calculate the area between two curves
f =@(x) sin(3.*x+1) ; g=@(x) exp(abs(x)/2 -2)-1; a=3; b=6; x=linspace(a,b,73); S=0; for k=1:length(x)-1 S=S+abs( ...

10 years 前 | 0

| 已接受

已回答
How can I know if MATLAB is using 64 bit double precision?
Actually, I don't know if that changes how the computations are made, or how the results are shown.

10 years 前 | 0

已回答
How can I know if MATLAB is using 64 bit double precision?
If you want all numeric results appear in 64 bits, you have to use: float('double') float('long')

10 years 前 | 0

已回答
How to write part of a structure to an output file (.txt)?
Take this as an example: x={'1', '2', '3'} fileName='test.txt' fid=fopen(fileName, 'w') for k=1:length(x) fprintf...

10 years 前 | 0

已回答
Help finding error in gauss seidel method
I think it has to fail int the 'while' loop: you dont have a prior value for the variable 'errorx', so it will probably will say...

10 years 前 | 0

已回答
How to use data in a structure
If all your data is inside the structure A, you should call data and txt like this: B=A.data C=A.txt

10 years 前 | 0

已回答
Solving a non linear differential equation
syms f(t) ; S = dsolve(diff(diff(f)) == ( (12.12*sin(417*t)+0.065)-((18043*(cos(417*t)-sin(417*t)))+110))*f + 431*sin(417*t...

10 years 前 | 0

已回答
solving systems of differential equations
I give you an example to solve a system of 2 differential equations: syms f(t) g(t) % one for every function S = dsolve(...

10 years 前 | 0

已回答
Parsing a text file by character
If there are several lines, you can extract them using this: fid=fopen(fileName) B = textscan(fid, '%f %f %f', 'Delimiter'...

10 years 前 | 0

已回答
Using fscanf to read in data
You are right dpb, i think textscan is better in this case; the next code extract 3 columns according to the format described: ...

10 years 前 | 0

已回答
??? Error using ==> plot Conversion to double from sym is not possible...help?
It´s not clear what you are trying to do, but there are some bad things here: 1) when you use int command, you dont give the ...

10 years 前 | 0

| 已接受

已回答
How to find the element in on boundary or interior?
If you suppose there is only one value 2 in the matrix, this code may be useful: a=[3 4 5;6 2 1; 1 6 9] % interior value ...

10 years 前 | 0

已回答
code for integral function
The common way to do this will be like: syms r d y; f= (r^(r+d))*( d^2 * y^2)/( (d+r)^2*d^3 ) F = int(f, y) % Calcu...

10 years 前 | 0

已回答
How can I generate text file in loop?
You sould open the file with the 'append' modificator. fid= fopen(filename, 'a') % Use fprintf (for example) to print the ...

10 years 前 | 0

| 已接受