* Given vec = 1:10, which statement below produces the same value of s as does the ?following script s = 0; for i=1:length(vec) s = s+vec(i)*vec(i); end s = sum(vec^2); O s = vec*vec'; O =vec'*vec; O s = vec.^2; O s = vec.*vec; O
* Given vec = 1:10, which statement below produces the same value of s as does the ?following script s = 0; for i=1:length(vec) s = s+vec(i)*vec(i); end s = sum(vec^2); O s = vec*vec'; O =vec'*vec; O s = vec.^2; O s = vec.*vec; O
Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter1: Fundamental Concepts Of Algebra
Section1.1: Real Numbers
Problem 28E
Related questions
Question
![Given vec = 1:10, which statement below
produces the same value of s as does the
?following script
S = 0;
for i=1:length(vec)
s = s+vec(i)*vec(i);
end
s = sum(vec^2); O
s = vec*vec'; O
s = vec'*vec; O
s = vec.^2; O
s = vec. *vec; O](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4e112d98-6f82-4ba1-811d-37f6c92acb78%2Faa808d76-d644-4006-b8a0-8bf1cf4a50f0%2Flsfd7bp_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Given vec = 1:10, which statement below
produces the same value of s as does the
?following script
S = 0;
for i=1:length(vec)
s = s+vec(i)*vec(i);
end
s = sum(vec^2); O
s = vec*vec'; O
s = vec'*vec; O
s = vec.^2; O
s = vec. *vec; O
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
![Elementary Algebra](https://www.bartleby.com/isbn_cover_images/9780998625713/9780998625713_smallCoverImage.jpg)
Elementary Algebra
Algebra
ISBN:
9780998625713
Author:
Lynn Marecek, MaryAnne Anthony-Smith
Publisher:
OpenStax - Rice University
![Mathematics For Machine Technology](https://www.bartleby.com/isbn_cover_images/9781337798310/9781337798310_smallCoverImage.jpg)
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
![Elementary Algebra](https://www.bartleby.com/isbn_cover_images/9780998625713/9780998625713_smallCoverImage.jpg)
Elementary Algebra
Algebra
ISBN:
9780998625713
Author:
Lynn Marecek, MaryAnne Anthony-Smith
Publisher:
OpenStax - Rice University
![Mathematics For Machine Technology](https://www.bartleby.com/isbn_cover_images/9781337798310/9781337798310_smallCoverImage.jpg)
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
![Algebra: Structure And Method, Book 1](https://www.bartleby.com/isbn_cover_images/9780395977224/9780395977224_smallCoverImage.gif)
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell
![PREALGEBRA](https://www.bartleby.com/isbn_cover_images/9781938168994/9781938168994_smallCoverImage.gif)
![Intermediate Algebra](https://www.bartleby.com/isbn_cover_images/9780998625720/9780998625720_smallCoverImage.gif)