get only one value from 251x150 double in matlab

Assuming you want to extract a single element from a matrix in MATLAB which has dimensions 251x150, you can simply use indexing. For example, to extract the element at row 10 and column 20, you can write:

main.m
mat = rand(251,150); % create a random 251x150 matrix
val = mat(10,20);    % extract the element at row 10 and column 20
121 chars
3 lines

This will assign the value at (10,20) in the matrix mat to val. You can replace 10 and 20 to extract any other element you want.

related categories

gistlibby LogSnag