COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

Matlab inverse matrix

• Email
• Follow

```hello all around,

have some problems with matlab with this script (newbie here, should I
precise)

p=[0:0.01:1];
t=(((p/(1.48))+((1-p)*(170E-3))));
v=1/t;

figure(2)
plot(p,v)
xlabel('porosity (%)')
ylabel('velocity (km/s)')

the corresponding error message is :

??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> geovthirdalternative at 33
v=1/t;

I guess that it might a little more complicated to inverse a vector...
Have you any hints to fix this situation ?

pretty thanks !!
```
 0

See related articles to this posting

```zoubbly <martin.stab@gmail.com> wrote in message <8dde9bb7-2f73-4001-a1e7-f214976a35de@r14g2000yqa.googlegroups.com>...
> hello all around,
>
> have some problems with matlab with this script (newbie here, should I
> precise)
>
>
> p=[0:0.01:1];
> t=(((p/(1.48))+((1-p)*(170E-3))));
> v=1/t;
>
>
>
> figure(2)
> plot(p,v)
> xlabel('porosity (%)')
> ylabel('velocity (km/s)')
>
>
> the corresponding error message is :
>
> ??? Error using ==> mrdivide
> Matrix dimensions must agree.
>
> Error in ==> geovthirdalternative at 33
> v=1/t;
>
>
> I guess that it might a little more complicated to inverse a vector...
> Have you any hints to fix this situation ?
>
> pretty thanks !!

Use the element-wise operator with a dot  ./

v=1./t;

James Tursa
```
 0

1 Replies
549 Views

Similar Articles

12/19/2013 10:02:06 PM
page loaded in 37862 ms. (0)

Similar Artilces:

matrix inversion in matlab
Hi I need to inverse a rather large matrix. Using 'inv' takes much time and I need to speed this up. What I actually have is the the follwing: B=V*D*V^{-1} Where V is an eigenvectors matrix, and D the eigenvalues diagonal matrix as [V,D]=eig(A) % in matlab delechelle wrote: > Hi > > I need to inverse a rather large matrix. Using 'inv' > takes much time and I need to speed this up. What I actually have > is the the follwing: > > B=V*D*V^{-1} > > Where V is an eigenvectors matrix, and D the eigenvalues diagonal matrix, > as > > [V,D]=ei...

Matrix Inversion and Distributed Matlab
Hi. I wanted to make sure that using distributed matlab be of any help with matrix inverse. I have dmatlab running on a distributed memory computer. I want to invert a large matrix, but do not have enough memory to do it on a single node with regular matlab. ...

Can Matlab avoid explicit matrix inverse?
In many texts it says to avoid explicitly calculating the matrix inverse. [I'm doing an optimal linear combination (least squares?) of two states X and Y with symmetric covariance matrices Px and Py to get a state Z with Pz] I need to calculate Pz where (several books tell me): Pz = inv(inv(Px) + inv(Py)); As I expected, when I calculate Pz - or even the inverse of a symmetric matrix it's no longer symmetric. I tried pinv but this is not much better. Am I missing some obvious mathematical trick to make sure Pz is symmetric? Is there some function similar to pinv to guarantee symmetr...

inverse matrix
Hi, I want to implement a Kalman-filter on a DSP56F8323. To do that I need t compute a matrix (9x9). Using Gauss-Jordan algorithmen I need to divide lot of figures. In my eyes there is a problem using fixed poin arithmetics. Its not allowed to divide a smaller figure through a bigge one because the figure range is -1 to 0.999 and it would result in bigge than 1. I am DSP newby so it would be nice when somebody could help me. Best regards, Maik Schormann This message was sent using the Comp.DSP web interface o www.DSPRelated.com mswu wrote: > Hi, > > I want to implement a Kal...

Inverse of a matrix
Hi all, Can anyone suggest simple algorithms for implementation of finding the inverse of a matrix (4 X 4)? Even information of IP Cores for such functionality will be greatly appreciated. Thanks in advance, Venkat. In article <1180507013.553103.267690@a26g2000pre.googlegroups.com>, Venkat <venkat.japan@gmail.com> wrote: >Hi all, >Can anyone suggest simple algorithms for implementation of finding the >inverse of a matrix (4 X 4)? Even information of IP Cores for such >functionality will be greatly appreciated. How long have you got? Gaussian elimination in softwar...

matrix inversion
Where I can find an example of generic matrix inversion algorithm implemented in fixed point computation (16 or 32 bits). Please help. Regards John John wrote: > Where I can find an example of generic matrix inversion algorithm > implemented in fixed point computation (16 or 32 bits). > Please help. > > Regards > > John > > try looking on google for implementations of "psuedoinverse" or pinv sdj ...

inverse matrix ...
hi, I have been analyzing sample apps from DX an I've had a problem to understand the water sample. Below I include the piece of code which I have problems in understanding. This is taken from the FrameMove() method: D3DXMATRIXA16 matT, matR; D3DXQUATERNION qR; vecT = m_vecVelocity * m_fElapsedTime * m_fSpeed; vecR = m_vecAngularVelocity * m_fElapsedTime * m_fAngularSpeed; D3DXMatrixTranslation(&matT, vecT.x, vecT.y, vecT.z); D3DXMatrixMultiply(&m_matPosition, &matT, &m_matPosition); D3DXQuaternionRotationYawPitchRoll(&qR, vecR.y, vecR....

Matrix inverse
Hi folks, Iam having trouble with finding the inverse of a 11*11 complex matrix.when i multiply the original matrix with the inverse matrix i dont get identity. Is there a way to get around this? Any help is appreciated. thanks Vijay Did you check for matrix singularity? end "vijay" <vijay_nomula@yahoo.co.in> wrote in message news:ef052cf.-1@webx.raydaftYaTP... > Hi folks, > Iam having trouble with finding the inverse of a 11*11 complex > matrix.when i multiply the original matrix with the inverse matrix i > dont get identity. Is there a way to get around this? ...

Inverse of a Matrix
Are there any methods available for finding approximate inverse for nearly singular matrices using MATLAB? Is there a way to avoid this? "Ravi " <vioravis.nospam@gmail.com> wrote in message <fdsglc\$6b7\$1@fred.mathworks.com>... > Are there any methods available for finding approximate > inverse for nearly singular matrices using MATLAB? Is there > a way to avoid this? > You could try the svd approach. Then you can do damping and truncation directly on the singular values. HTH, Bjoern "Ravi " <vioravis.nospam@gmail.com> wrote in message <f...

Re: IML Matrix Inversion
mmm this is why with MATA (Stata) and Matlab it fails. Very interesting thank you. On Mon, 17 Aug 2009 13:29:03 -0700, Dale McLerran <stringplayer_2@YAHOO.COM> wrote: >Howard, > >Oh my! How did I manage that? You are absolutely correct! > >In theory, a 64-bit computer (not running a Window's OS) could >be built with memory that allowed 800+ Gb of ram. Of course, >that is the amount of ram necessary for just storage of the >matrix. Additional ram of at least 1600 Gb or so would be >needed for computing the inverse. Thus, one would need a >64-be com...