what is the equivalent matlab function for the operator || || ?
11 次查看(过去 30 天)
显示 更早的评论
I am having an expression r=||x-Ab|| which I have to convert it into a matlab code.But i have no idea what is this || || operator.can anyone tell me what does it mean and what is the equivalent matlab fuction for it.
1 个评论
Geoff Hayes
2015-3-14
mari - please provide some context for this operator. What does it mean to you? What goes between the two pairs of vertical bars?
采纳的回答
Andrew Newell
2015-3-14
编辑:Andrew Newell
2015-3-14
You're probably referring to the matrix norm, which is a generalization of the idea of "distance". The equivalent MATLAB function is norm. If there is no subscript on your operator symbol, it probably represents the 2-norm, which is the default for the MATLAB function. For your example, you could write
r = norm(x-A*b);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!