Solved

dot calculation

Posted on 2007-04-09
2
600 Views
Last Modified: 2016-02-10
Hi, experts

I am kind of confuse about the syntax in matlab below
p ./ numel(I) --> there is a dot after p
p / numel(I) --> no dot after p

what is the difference between those two? I try couple different p matrix, but I don't see the different in answer.
0
Comment
Question by:rmtogether
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 4

Expert Comment

by:MacroLand
ID: 18904047
if there is dot between two like A./B then matlab divides the two matrices by their entries like A(i,j)/B(i,j)

if there is no dot between A/B  then matlab takes the inverse of B which is equivalent to A*inv(B)

Regards,
0
 
LVL 4

Accepted Solution

by:
MacroLand earned 500 total points
ID: 18904066
Example;

A=[10 12;6 3]

A =

    10    12
     6     3

>> B=[2 4;3 1]

B =

     2     4
     3     1

>> C=A./B

C =

     5(=10/2)     3(=12/4)  
     2     3

D=A/B

D =

    2.6000    1.6000
    0.3000    1.8000

>> D=A*inv(B)

D =

    2.6000    1.6000
    0.3000    1.8000

Regards,
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
NotAlone Challenge 20 88
scoreUp challenge 14 69
word0 challenge 3 112
recursion example 16 160
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question