how to fill pre allocated matrix using two columns vectors
Show older comments
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 Comment
Shashank Sharma
on 26 Jun 2019
It is unclear as to what you are attempting.
What is the expected output of your code ?
Accepted Answer
More Answers (2)
KSSV
on 26 Jun 2019
X = [ 35;43;22] ;
Y = [75;44;67] ;
[X,Y] = meshgrid(X,Y);
madhan ravi
on 26 Jun 2019
% Illustration
Matrix = zeros(5);
X = (10:10:50).'; % column vectors
Y = (40:10:80).';
Matrix(end,:) = X.';
Matrix(:,1) = Y
5 Comments
M.S. Khan
on 26 Jun 2019
M.S. Khan
on 26 Jun 2019
madhan ravi
on 26 Jun 2019
Show how your result should look like?
M.S. Khan
on 26 Jun 2019
Edited: madhan ravi
on 26 Jun 2019
madhan ravi
on 26 Jun 2019
Honestly, how are the certain fields yellow?
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!