Resuelto


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

más de 3 años hace

Resuelto


Locate image wells
A mathematical model of wells pumping groundwater near a boundary can be constructed using the method of images, which is also u...

más de 3 años hace

Resuelto


Determine if input is a Harshad number
In mathematics a harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digit...

más de 3 años hace

Resuelto


Compute the largest number with a given integer complexity
Cody Problems 42831 and 42834 ask us to compute integer complexity, the smallest number of 1s needed to construct a number with ...

más de 3 años hace

Resuelto


Compute the Tetris sequence
In the Tetris sequence, which starts with a 1, the next term is the smallest positive integer not already in the sequence that h...

más de 3 años hace

Resuelto


JannaT is Loved By Me
JannaT was sTarTed loved by me and that time was in 2020. A year when JannaT will starT loving me when the year divided from th...

más de 3 años hace

Resuelto


Easy Sequences 87: Perfect Power Modular Residue of a Nested Sum-product Function
For a positive integer , we define the function , as follows: ; and for . He...

más de 3 años hace

Resuelto


Compute a nested cube root
Consider the quantity . Write a function to compute without using loops or recursion.

más de 3 años hace

Resuelto


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

más de 3 años hace

Resuelto


Harmonic series counting
The function takes a positive limit as input, And counts how many terms must be summed in the harmonic series: 1/1, 1/2, 1/3, ...

más de 3 años hace

Resuelto


01-01: 正弦波の生成
「MATLABで学ぶ実践画像・音声処理入門」のプログラム1-1 と同じ正弦波を、サンプリング周波数 10kHz で生成し、返却する関数を作成せよ。

más de 3 años hace

Resuelto


Compute the Lagarias Riemann Hypothesis sequence
Write a function that takes an input number and produces a sequence (i.e., all values up to and including the th value) compute...

más de 3 años hace

Resuelto


Solve an equation involving primes and fractions
Write a function to find pairs of primes and satisfying the equation where is an integer. The function should take a numbe...

más de 3 años hace

Resuelto


Easy Sequences 83: Digits of Powers of 3
This problem is a simpler version of 'Easy Sequences 82: Digits of Powers of 2'. Given integers and , we are asked to return th...

más de 3 años hace

Resuelto


Dyck words
A Dyck word can be considered as a string of n X's and n Y's arranged to have at least as many X's in an initial segment of the ...

más de 3 años hace

Resuelto


Easy Sequences 86: The "real" Hyperprimorials
In Easy Sequences 85, we define the hyperprimorial of , as a exponent ladder of primes numbers from the -th prime down to first ...

más de 3 años hace

Resuelto


Easy Sequences 85: Hyperprimorials
Given an integer , the primorial of , , is defined as product of all primes from to the -th prime. In other words, if is the ...

más de 3 años hace

Respondida
How to find two values in a 3D table?
B=[ 16 17 17 17 19 17 23 22 22 22 24 24 31 29 28 27 29 31 38 36 ...

más de 3 años hace | 1

| aceptada

Respondida
Correlation with two matrices
You could just manually do it yourself. A=randi(100,10);B=randi(100,10); M=mean(A);N=mean(B); r=zeros(size(A,2),size(B,2)); ...

más de 3 años hace | 1

Respondida
How to draw tangent plot?
fplot(@tan,[0,2*pi])

más de 3 años hace | 0

Respondida
Location of a value in a matrix
x=0:.5:20; f=find(x==9.5) x(f)

más de 3 años hace | 0

Respondida
ELEMENTS IN ODD COLUMNS AND ROWS
M=randi(100,10) out=imp_index(M) function out = imp_index(M) out=M(1:2:end,1:2:end); out=out(:)'; end

más de 3 años hace | 1

Respondida
Creating array based on highest values using for loop
x=zeros(1000,16); c=1; for i=Peaks x(:,c)=Reshaped_array(i:999+i,c); c=c+1; end

más de 3 años hace | 0

| aceptada

Respondida
generating matrices from another matrix
x = [1,0,0,1,0,1]; d = diag(x); s(:,:,1)=d; for k=2:10 t=d;t(k)=1; s(:,:,k)=t'; end s

más de 3 años hace | 0

Respondida
using a Monte Carlo simulation with 100,000 trials to find the probability of a random integer that is larger than the other random integer in [4,21]
trials= 100000; % 100,000 trials A=repmat((4:21)',1,trials); B=randi([4 21],18,trials); A_win=sum(A>B,2); A_win_or_equal...

más de 3 años hace | 1

| aceptada

Respondida
Running Script 100 Times to get Mean
x=normrnd(0,2,100); y=mean(90*exp(0.25*x+0.0175),2); histogram(y,20)

más de 3 años hace | 0

Respondida
How to append in a while loop?
Where is 'a' assigned? Lots of guessing here, but this might help you. limit =0.01; Ad= (linspace(-2.5,2.5,26))'; b=2;a=1; ...

más de 3 años hace | 1

| aceptada

Respondida
Why does the solution contain the c1 variable even though I set the conditions?
Problem with y(0) condition (log(0) = -inf) syms y(x) ode = diff(y) == 2+y/x; cond = y(.001) == 0; ySol = dsolve(ode,cond) ...

más de 3 años hace | 1

Respondida
RK4 Function Code
dydx = @(x,y) 3.*exp(-x)-0.4*y; [x,y] = rk4(dydx,0,100,-0.5,0.5); plot(x,y,'o-'); function [x,y] = rk4(dydx,xo,xf,yo,h...

más de 3 años hace | 0

Respondida
How to find equal values/words between two string vectors?
a=["10", "25", "V4E", "64", "33"]; b=["64","V4E", "T2S", "10", "11"]; c=find(ismember(a,b)) d=a(c)

más de 3 años hace | 1

| aceptada

Cargar más