Respondida
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( ...

casi 10 años hace | 0

| aceptada

Respondida
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.

casi 10 años hace | 0

Respondida
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')

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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(...

casi 10 años hace | 0

Respondida
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'...

casi 10 años hace | 0

Respondida
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: ...

casi 10 años hace | 0

Respondida
??? 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 ...

casi 10 años hace | 0

| aceptada

Respondida
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 ...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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 ...

casi 10 años hace | 0

| aceptada