matrix convertion needs modification
1 次查看(过去 30 天)
显示 更早的评论
I want to create a matrix with entries -1, 0, and 1 but it gives only -1 and 1, how to adjust
x = [9 3.6 9; 11 3.6 9; 9 4.4 9; 11 4.4 9; 9 3.6 11; 11 3.6 11;9 4.4 11; 11 4.4 11];
% convertion to -1, 0, and 1
V = ( x(:,1) - min(x(:,1)) )/(range(x(:,1))/2) - 1; %% This line needs some modifications
% NOW convert to MATRIX (-1. 0, and 1)
% Below lines also need some modifications
X = [(x(:,1) - min(x(:,1)))/1 - 1 (x(:,2) - min(x(:,2)))/0.4 - 1 (x(:,3) - min(x(:,3)))/1 - 1]
3 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!