Yifan He
Texas Tech University
Followers: 0 Following: 0
Programming Languages:
MATLAB
Spoken Languages:
English, Chinese
MATLAB
Spoken Languages:
English, Chinese
Feeds
已回答
name value pairs with variable input arguments
function db = name_value_pairs(varargin) if nargin == 0 db = {}; elseif nargin/2 ~= fix(nargin/2) db = {}; elseif s...
name value pairs with variable input arguments
function db = name_value_pairs(varargin) if nargin == 0 db = {}; elseif nargin/2 ~= fix(nargin/2) db = {}; elseif s...
2 years 前 | 0
已回答
how to find the element which is greater than or equal to its row and smaller or equal to its column in a matrix
function indices = saddle(M) m = size(M,1); n = size(M,2); indices = []; for i = 1:m for j = 1:n if (sum(M(i,j)...
how to find the element which is greater than or equal to its row and smaller or equal to its column in a matrix
function indices = saddle(M) m = size(M,1); n = size(M,2); indices = []; for i = 1:m for j = 1:n if (sum(M(i,j)...
2 years 前 | 0
已回答
Caesarts Cipher encryption algorithm assistance
function coded = caesar(v,s) x = double(v); y = x + s; if y >= 32 n = fix((y-32)/95); else n = fix((y-126)/95); e...
Caesarts Cipher encryption algorithm assistance
function coded = caesar(v,s) x = double(v); y = x + s; if y >= 32 n = fix((y-32)/95); else n = fix((y-126)/95); e...
2 years 前 | 0
已回答
Write a function max_sum that takes v a row vector of numbers & n,a positive integer as inputs.The function needs to find n consecutive elements of v whose sum is largest possible.It returns summa & index of first element of n consecutive integers.
function [summa,index] = max_sum(v,n) if n > length(v) summa = 0; index = -1; end if n <= length(v) summa = su...
Write a function max_sum that takes v a row vector of numbers & n,a positive integer as inputs.The function needs to find n consecutive elements of v whose sum is largest possible.It returns summa & index of first element of n consecutive integers.
function [summa,index] = max_sum(v,n) if n > length(v) summa = 0; index = -1; end if n <= length(v) summa = su...
2 years 前 | 0