Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MATLAB, how do you plot vectors and the resultant force? It starts with an importanted excel sheet. First column in excel is the magnitude,

Using MATLAB, how do you plot vectors and the resultant force?

It starts with an importanted excel sheet. First column in excel is the magnitude, second column is the direction.

Need to use a "FOR Loop"

This is what I have so far:

data = xlsread('Project2.xlsx');

[r,c] = size(data);

for i = 1:r arrayx(i) = data(i,1)*cosd(data(i,2)); arrayy(i) = data(i,1)*sind(data(i,2)); end

x = sum(arrayx); y = sum(arrayy);

rmag = sqrt(x^2 + y^2); rdir = atan(y/x);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

Identify the various kinds of consumer and industrial goods.

Answered: 1 week ago