Feeds
質問
How do I change string to double without changing number of zero under decimal point?
a = '24.5';aa = "24.5"; b = str2double(aa) d = double(a) d = double(aa) c = cast(aa,'double') c = cast(a,'double') i know ...
5年以上 前 | 1 件の回答 | 0
1
回答質問
I have a question about using table
load patients whos Then the result shows Name Size Bytes Class Attributes A...
5年以上 前 | 1 件の回答 | 0
1
回答質問
Code for 'Reverse a Vector'
v = [1 2 3 4 5]; w = reversal(v) %----------------------------------------------------------- function w = reversal(v) ...
5年以上 前 | 6 件の回答 | 0
6
回答回答済み
Write a function called get_distance that accepts two character vector inputs representing the names of two cities. The function returns the distance between them as an output argument called distance. For example, the call get_distance('Seattle, WA'
function distance = get_distance(a,b) [~,~,excel] = xlsread('Distances.xlsx'); col = excel(1,:); row = excel(:,1)...
Write a function called get_distance that accepts two character vector inputs representing the names of two cities. The function returns the distance between them as an output argument called distance. For example, the call get_distance('Seattle, WA'
function distance = get_distance(a,b) [~,~,excel] = xlsread('Distances.xlsx'); col = excel(1,:); row = excel(:,1)...
5年以上 前 | 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.
%why second problem doesn't run? function [summa,index] = max_sum(v,n) s = size(v); b = 0; c = 0; index = 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.
%why second problem doesn't run? function [summa,index] = max_sum(v,n) s = size(v); b = 0; c = 0; index = 0; ...
5年以上 前 | 0
回答済み
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid. If any of the inputs is not
function x = valid_date(year,month,day) if nargin == 3 if isscalar(year) && isscalar(month) && isscalar(day) if ...
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid. If any of the inputs is not
function x = valid_date(year,month,day) if nargin == 3 if isscalar(year) && isscalar(month) && isscalar(day) if ...
5年以上 前 | 0


