Articles Download Safety & Security Forum myUR Go to Main Site

Universal Robots A/S
Energivej 51
DK-5260 Odense S

T: +45 8993 8989
sales@universal-robots.com

 
  • Articles
  • Download
  • Safety & Security
  • Forum
  • myUR
  • Go to Main Site
  • Support
  • Articles
  • URScript command - Linear Algebra Examples

URScript command - Linear Algebra Examples

This article brings to you some examples on how to create Linear Algebra script commands in your UR cobot

Last modified on Jan 29, 2025

Date Created: September 1st, 2020

Robots: CB-Series and e-Series

SW versions: 3.14 and 5.9 above

 

1. Introduction

As released on Software versions 3.14 (CB-Series) and 5.9 (e-Series), matrix operations are now supported in URScript command programming.

2. Linear Algebra Examples

This section shows some examples of linear algebra in URScript.

2.1. Example 1: Solving system of linear equations

Consider the following system of linear equations,


The above system can be stated on matrix vector form: .
A least squares solution can be found: .

Least square solution example:

The above example yields: .

2.2. Example 2: Homogeneous transformation

A homogeneous transformation can be written as: .

Homogeneous transformation example:

The above example yields: .

2.3. Example 3: Vector multiplication

When two lists are multiplied it is performed element-wise: .

To achieve dot product functionality between two vectors (e.g. to get mean value of a vector) it can be implemented as follows:

Dot product example:

The above example yields: .

 

 

Related articles

Examples of Script Commands
URScript: Dynamic Force Control
URScript: Move with respect to a custom feature/frame
TCP/IP socket communication via URScript
Interpolate a square or lattice using scripts
Interpolate a position using script
logo

Product

  • UR3e Robot
  • UR5e Robot
  • UR10e Robot
  • UR16e Robot
  • UR20 Robot
  • UR+ Products

Company

  • About us
  • Contact us
  • Careers We're hiring
  • UR merchandise

Training / Resources

  • Academy
  • Technical Resources
  • Articles
  • FAQ

Insights

  • Blog
  • Case stories
  • Content library
  • News centre
  • Podcast
  • Webinars & Events

Get in touch

  • Ask an Expert
  • Schedule a no-cost assessment
  • Find a distributor
  • Customer support

Connect with us

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com
  • Copyright @ Universal Robots 2025
  • Cookie policy
  • Privacy policy
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com

Copyright © Universal Robots 2025

Cookie policy
Privacy policy