how to fill pre allocated matrix using two columns vectors
이전 댓글 표시
Matrix = zeros(5)
interval range =10
X = [ 35;43;22]
Y = [75;44;67]
40
50
Y 60
70
80
10 20 30 40 50
X - axis
how to fix these values inside the above grid using matlab coding.
i have tried a lot using for loops but its not comming correct.
All cooperation is highly appreicated.
Regards
댓글 수: 1
Shashank Sharma
2019년 6월 26일
It is unclear as to what you are attempting.
What is the expected output of your code ?
채택된 답변
추가 답변 (2개)
KSSV
2019년 6월 26일
X = [ 35;43;22] ;
Y = [75;44;67] ;
[X,Y] = meshgrid(X,Y);
madhan ravi
2019년 6월 26일
% Illustration
Matrix = zeros(5);
X = (10:10:50).'; % column vectors
Y = (40:10:80).';
Matrix(end,:) = X.';
Matrix(:,1) = Y
댓글 수: 5
M.S. Khan
2019년 6월 26일
M.S. Khan
2019년 6월 26일
madhan ravi
2019년 6월 26일
Show how your result should look like?
M.S. Khan
2019년 6월 26일
편집: madhan ravi
2019년 6월 26일
madhan ravi
2019년 6월 26일
Honestly, how are the certain fields yellow?
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
