Why wont Matlab plot these two arrays?
显示 更早的评论
clc;
fprintf('Please select the .txt file with your values\n');
pause(1);
clc;
fileName = uigetfile('*.txt');
load(fileName);
inputValues = load(fileName);
maxStress2 = zeros(1,size(inputValues,1));
for n = 1:size(inputValues,1)
maxStress2(1,n) = momentStress2(inputValues(n,1),inputValues(n,2), ...
inputValues(n,3),inputValues(n,4),inputValues(n,5),inputValues(n,6));
end
for n = 1:size(inputValues,1)
y = (maxStress2(n));
x = inputValues(n,n);
plot(x,y);
If I use disp(x) and disp(y) I get the values I want as the same size array... so why cant they be plotted?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!