Squares to a minus number

1 次查看(过去 30 天)
Liz Courtney
Liz Courtney 2019-11-10
How do I evaluate
Y to the square of -2

回答(2 个)

Image Analyst
Image Analyst 2019-11-10
Try this
exponent = (-2)^2; % Square of -2
result = Y .^ exponent

James Mwage
James Mwage 2019-11-10
y=(-2)^2
is what I would do
  1 个评论
Image Analyst
Image Analyst 2019-11-10
Yes, I thought of that also. The wording is ambiguous. What I thought "Y to the square of -2" most likely meant is "Y to the power of the square of -2", because of the word "to" in the phrase, though your guess is also a possible interpretation/guess at what she really meant. Perhaps Liz will re-state the question with more precise language.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by