How I can code ||x||=1 with first component x1>0, x is vector

2 次查看(过去 30 天)
How I can code |x|=1 with first component x1>0, x is vector
  1 个评论
James Tursa
James Tursa 2018-9-25
Please provide more detail. What problem are you solving with the code? How will this be used downstream in your code? Etc.

请先登录,再进行评论。

回答(1 个)

Dimitris Kalogiros
Dimitris Kalogiros 2018-9-25
You can use norm or vecnorm .
For example (and by usage of symbolic math toolbox):
clc;close all; clc
X=sym('X', [1, 3])
eq=norm(X)==1
You will receive:

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by