A résolu


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

plus de 5 ans il y a

A résolu


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

plus de 5 ans il y a

A résolu


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

plus de 5 ans il y a

A résolu


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

plus de 5 ans il y a

A résolu


Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

plus de 5 ans il y a

A résolu


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

plus de 5 ans il y a

A résolu


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

plus de 5 ans il y a

A résolu


Make an anonymous function that has variable output
Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

plus de 5 ans il y a

A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

plus de 5 ans il y a

A résolu


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

plus de 5 ans il y a

A résolu


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

plus de 5 ans il y a

Réponse apportée
Error using + Matrix dimensions must agree.
In line 43, x(:,i) is a column vector, while k1' is a row vector. Summing a column vector and a row vector is not allowed in ol...

plus de 5 ans il y a | 0

Réponse apportée
Golden Section Search algorithm, golden number why is 0.381
Let and be the end points of the current range. In golden ratio search we choose a new point such that the ratio of the two ...

presque 6 ans il y a | 1

Réponse apportée
Problem relating to mathematical expression
Ameer's answer is correct, of course. Here is another approach, without the elegant Matlab functions: N = 5; % Max window size...

presque 6 ans il y a | 0

Réponse apportée
Help text does not work for user-defined functions
Problem solved - finally! My Matlab 2019b and 2020a installations had several other odd behaviours in addition to the help prob...

presque 6 ans il y a | 3

| A accepté

Réponse apportée
Solution for system of two non linear equation
You can rewrite you equations as (Nd-x-y)-a*(x*(x+y)) = 0 (Nd-x-y)*(No-y)-b*(y*(x-y)) = 0 where x = Nd, y = Nonegative, a = ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Problem of erf when using fmincon
Your problem has infinitely many solutions. Whenver x(1)-x(3) = 1 and x(2)-x(4) = 1, fun = 0, which is the minimum value possib...

presque 6 ans il y a | 0

Réponse apportée
how to Nonlinear equations?(two variables)
Although R1 and R2 are nonlinear finctions of t, your equations are linear in x. So you write the equations on the form A(t)*...

presque 6 ans il y a | 2

| A accepté

Réponse apportée
How to count number of times a number appears in column B based on column A
letters = 'ABAACD'; numbers = [1,2,2,1,1,3]; uniqueletters = unique(letters); uniquenumbers = unique(numbers); n = length(un...

presque 6 ans il y a | 0

| A accepté

A soumis


nistdata(species,T,p)
Create tables of thermophysical properties for gases

presque 6 ans il y a | 37 téléchargements |

5.0 / 5
Thumbnail

Réponse apportée
Van der Waals equation - Newton's method
In your code, newton_ndim does not know the value of T and so cannot call fun(X,T). You can probably fix this by defining an in...

presque 6 ans il y a | 0

| A accepté

A résolu


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

environ 6 ans il y a

A résolu


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

environ 6 ans il y a

A résolu


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

environ 6 ans il y a

A résolu


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

environ 6 ans il y a

A résolu


Elastic Collision 001: 1-D
Elastic Collision of two particles. <http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision> Solve Conservat...

environ 6 ans il y a

A résolu


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

environ 6 ans il y a

A résolu


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

environ 6 ans il y a

A résolu


Determine if a four bar mechanism is of Grashof type
A four bar mechanism is composed of four links. if s is the smallest link, l the longest and p,q are the length of the other lin...

environ 6 ans il y a

A résolu


Find the jerk
No, it's not the author of this problem... Jerk is the rate of change in acceleration over time of an object. So, if given t...

environ 6 ans il y a

Charger plus