Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
768 views
in Technique[技术] by (71.8m points)

linear algebra - How to create a set of output data that can be graphed for a range of variables in MATLAB

I am trying to create a graph of a velocity against my output variables from the set of matrices shown below on MATLAB.

system of matrices to be solved

It is quite a simple system of equations it is more so the method to create a code that will allow me to see the different values of delta d and delta t with respect to a change in V and at a range of angles of theta (0,5,10). Ideally I would like 3 curves on a graph representing 3 different angles at velocities from 0 to 100.

The code I have developed so far:

v = 8
 h = 7;
rho = 1.225;
theta = 5
i = 100
for v = 1:100
A = [v 0.5; h 1]
b1 = (rho*(v^2))
b2 = cosd(0)
B = [b1; b2]
C = AB
end

However I am unsure how to create a set of results which I can then plot as I need a range of outputs that vary with the velocity input and that is not working. Any help in resolving this would be much appreciated with comments for code used, and in being able to store the produced outputs as variables that can then be plotted.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...