Respondida
Get MatLAB to read data instead of text
Try readtable t=readtable('yourFile.csv');

más de 3 años hace | 0

Respondida
Add Letters in a sequence
l='abcdefghijklmnopqrstuvwxyz'; gap='defjklmrstuvwz'-96; l(gap)='-'

más de 3 años hace | 1

| aceptada

Resuelto


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

más de 3 años hace

Respondida
Why does my else doesnt work?
a = [-3.821; 0.135; 5.995; -5.557; -4.041; -3.094; -3.244; -3.074; -1.241; -4.216; -2.834; -0.424; 5.337; -0.088; 2.985; 4.136;...

más de 3 años hace | 1

| aceptada

Resuelto


Cricket - Report the Result (Part I: Limited Overs)
Given two scalar strings representing the scores for a limited-overs match, return a string reporting the result in the form "Te...

más de 3 años hace

Resuelto


Cricket - Peak Batting Average
Given a vector s of strings representing a batter's individual innings scores (in chronological order), return the highest batti...

más de 3 años hace

Resuelto


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

más de 3 años hace

Resuelto


Cricket - Career Bowling Statistics
Given a vector s of strings representing a bowler's individual innings records, return their career statistics as a 3-element (n...

más de 3 años hace

Respondida
'MarkerFaceColor' according to y value
x = linspace(0,3*pi,200); y = cos(x) + rand(1,200); sz = 25; c = y/max(y)*10; scatter(x,y,sz,c,'filled') hold on; plot(x,y...

más de 3 años hace | 0

Resuelto


List the nth term of Rozhenko’s inventory sequence
Consider a sequence constructed by repeated inventories. A new inventory begins each time a zero is encountered. The first few i...

más de 3 años hace

Resuelto


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

más de 3 años hace

Respondida
Difference between x = 0:0.1:2*pi and linspace(0,2*pi,0.1)
Linspace divides the interval into the exact number specified, while colon notation just keeps increasing the interval by the mi...

más de 3 años hace | 1

| aceptada

Resuelto


Slope intercept application
Find y given slope (m), x, and y intercept (b).

más de 3 años hace

Resuelto


Easy Sequences 81: Fibonacci Radicals
The radical of a positive integer is defined as the product of the distinct prime numbers dividing . For example, the distinct ...

más de 3 años hace

Resuelto


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

más de 3 años hace

Resuelto


Remove Duplicates
Remove duplicates from the vector of integers and display in sorted order

más de 3 años hace

Respondida
zeros populating most of my output vector
You will start running into problems with higher no_of_calls because the no_of_channels will increase and factorial numbers will...

más de 3 años hace | 1

| aceptada

Resuelto


Compute the drag on a moving vehicle
We assume no rolling resistance, and the simple rule for Drag : , where is the density of the fluid (assumed at 1.2 ), is the ...

más de 3 años hace

Resuelto


Determine if vector has any zeroes
Return 1 if vector has atleast 1 zero, else return 0

más de 3 años hace

Respondida
Generate random numbers with truncated Pareto distribution
Just write a simple function function x = ranPareto_trunc(H,L,alpha,n)%H=upper, L=lower, alpha>0, n=number of random numbers de...

más de 3 años hace | 0

Resuelto


Cricket - Career Batting Statistics
Given a vector s of strings representing a batter's individual innings scores, return their career statistics as a 4-element (nu...

más de 3 años hace

Respondida
is it possible to make this code shorter?
r=x/2.*cos(cumsum(rad)); R=[r(1),2*cumsum(r(1:6))+r(2:7)]; mg=flip(cumsum(flip(Fz.*R))); c=-mg./rad;

más de 3 años hace | 0

Resuelto


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

más de 3 años hace

Resuelto


Cricket - Average Partnership Contribution
The (infamous) Duckworth-Lewis method uses statistical models of how much each wicket partnership is worth to an innings (on ave...

más de 3 años hace

Resuelto


Cricket - Sort Batters by Distance Run
Given a string vector of batters' names, a vector of the total number of runs they scored, a vector of the number of 4s they sco...

más de 3 años hace

Resuelto


Easy Sequences 80: Sum of the n-th Row of Fibonacci Square Triangle
We shall call the following arrangement of Fibonacci numbers, as the Fibonacci Square Triangle: where...

más de 3 años hace

Respondida
Randomize a marker color for a graph
m='o+*.x'; c='rgbcmyk'; x=randi(20,1,8); y=randi(20,1,8); figure;hold on; for n=1:length(x) scatter(x(n),y(n),'LineWidth...

más de 3 años hace | 0

Respondida
why is this code not working?
Function works fine. f=@(x)x.^2.*sin(x)-x.*cos(x)+3;%sample function df=@(x)x.^2.*cos(x)+3*x.*sin(x)-cos(x); [root,iter,v]=ne...

más de 3 años hace | 1

| aceptada

Respondida
How to create a polar plot?
load S x = real(S); y = imag(S); rho = sqrt(x.^2+y.^2); theta = atan2(y,x);%use atan2 (4 quadrant) polarscatter(theta, rho,...

más de 3 años hace | 0

| aceptada

Respondida
custom distance with the kmeans
data=randi(100,10,2); centroid1=randi(100,1,2); centroid2=randi(100,1,2); m=sum(abs((data-centroid1)./std(data(:,1))),2); n=...

más de 3 años hace | 0

Cargar más