RAMAKANT SHAKYA
Followers: 0 Following: 0
Statistics
0 Questions
18 Answers
RANK
9 514
of 295 467
REPUTATION
4
CONTRIBUTIONS
0 Questions
18 Answers
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
0
RANK
of 20 234
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 153 912
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
I am working on homework but i cannot figure out what is wrong
whenever you do array multiplication the no of elements in both array must be same or multiply with a constt number with array o...
mer än 5 år ago | 0
How do I calculate the difference between the elements of two vectors given a condition ?
for given vector x and y; x= [106, 306, 407, 607] % given x vector y = [101, 201, 301, 401, 501] %givrn y vector d=[]; for...
mer än 5 år ago | 0
| accepted
Coding taylor approximation of natural log
if you want to calculate log(1.9) and x=0.9 then you have apply taylor series log(1+x) see formula form google and change in to ...
nästan 6 år ago | 0
Write a function called fare that computes the bus fare one must pay in a given city based on the distance travelled. Here is how the fare is calculated: the first mile is $2. Each additional mile up to a total trip distance of 10 miles is 25 cents.
function Kcost= fare(d, A) d=round(d); %rounding the distance to nearest positive integer if d <=1 Kcost=2; %for f...
nästan 6 år ago | 0
Write a function called day_diff that takes four scalar positive integer inputs, month1, day1, month2, day2. These represents the birthdays of two children who were born in 2015. The function returns a positive integer scalar that is equal to the dif
function dd=day_diff(m1,d1,m2,d2) num_of_days=[31,28,31,30,31,30,31,31,30,31,30,31]; dd=-1; mmm1=round(m1);...
nästan 6 år ago | 0
How to do it?
function s=halfsum(a) [m,n]=size(a); s=0; a=flip(a); for r=1:m for c=n:-1:r s=s+a(r,c); end en...
nästan 6 år ago | 0
Write a function called spiral_diag_sum that takes an odd positive integer n as an input and computes the sum of all the elements in the two diagonals of the n-by-n spiral matrix. For example, starting with the number 1 and moving to the right in a c
function sd=spiral_diag_sum(n) s1=0; s2=0; a=spiral(n); for r=1:n %for below the diagonal elements s1=s1+su...
nästan 6 år ago | 0
A function called small_elements that takes as input an array named X that is a matrix or a vector. Could you help me to understand the meaning?
function ind=small_elements(v) [m,n]=size(v); j=0; ind=[]; for c=1:n for r=1:m if (r*c) > v(r,c) ...
nästan 6 år ago | 0
Indexing & Move Me function
function out= move_me(v,a) s=length(v); if nargin < 2 %for validation of input a=0; end for x=1:s if v(x)==a %co...
nästan 6 år ago | 0
How to transform years into centuries
function s= centuries(n) p={'I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII',' XVII...
nästan 6 år ago | 0
Write a function called integerize that takes as its input a matrix A of integers of type double, and returns the name of the “smallest” signed integer class to which A can be converted without loss of information.
function cls=integerize(a) if isscalar(a) if a>0 mina=0; maxa=a; else maxa=0; min...
nästan 6 år ago | 0
Hey Guys can you help me with that.
function s2=dial(n) p=[n]; s1=''; tx = ismember(p, ['A':'Z','0':'9']);%only digits and capital letters tx1=sum(tx); if leng...
nästan 6 år ago | 0
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list: 2 ABC, 3 DEF, 4 GHI, 5 JKL, 6 MNO, 7 PQRS, 8 TUV, 9 WXYZ Hence, a phone-number specification can include uppercase letters and digits.
function s2=dial(n) p=[n]; s1=''; tx = ismember(p, ['A':'Z','0':'9']);%only digits and capital letters tx1=sum(tx); if leng...
nästan 6 år ago | 0
Can anyone help me with this question..?
function s2=dial(n) p=[n]; s1=''; tx = ismember(p, ['A':'Z','0':'9']);%only digits and capital letters tx1=sum(tx); if leng...
nästan 6 år ago | 0
Write a function called digit_counter that takes the name of a text file as input and returns the number of digits (i.e., any of the characters, 0-to-9) that the file contains. If there is a problem opening the file, the function returns -1.
function d=digit_counter(filename) fid=fopen(filename,'r'); if fid<0 d=-1; else A = char(fr...
nästan 6 år ago | 0
Write a function called circular_primes that finds the number of circular prime numbers smaller than n, where n is a positive integer scalar input argument. For example, the number, 197, is a circular prime because all rotations of its digits:
function out=circular_primes(no) prim=primes(no);% find the all prime number till the given number pr=0; nos=[]; po=[]; for...
nästan 6 år ago | 0
How can I solve this problem?
function out=circular_primes(no) prim=primes(no);% find the all prime number till the given number pr=0; nos=[]; po=[]; for...
nästan 6 år ago | 0
Number of first days of the month equals to Mondays
function counter=day_counter(y) counter=0; year=rem(y,100); % no of years in century lp=fix(year/4); %leap year if y~=19...
nästan 6 år ago | 0