Community Profile

photo

礼欣


Last seen: 8 mois il y a Actif depuis 2022

Followers: 0   Following: 0

2150343

Statistiques

  • Commenter
  • Promoter
  • Solver

Afficher les badges

Feeds

Afficher par

A résolu


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

plus d'un an il y a

A résolu


Max of a Vector
Write a function to return the max of a vector

plus d'un an il y a

A résolu


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

plus d'un an il y a

A résolu


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

plus d'un an il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

plus d'un an il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus d'un an il y a

A résolu


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

plus d'un an il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

plus d'un an il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

plus d'un an il y a

A résolu


What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

plus d'un an il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

plus d'un an il y a

A résolu


radius of a spherical planet
You just measured its surface area, that is the input.

plus d'un an il y a

A résolu


Inner product of two vectors
Find the inner product of two vectors.

plus d'un an il y a

A résolu


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

plus d'un an il y a

A résolu


Is my wife right?
Regardless of input, output the string 'yes'.

plus d'un an il y a

A résolu


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

plus d'un an il y a

A résolu


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

plus d'un an il y a

A résolu


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

plus d'un an il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

plus d'un an il y a

A résolu


Create a vector
Create a vector from 0 to n by intervals of 2.

plus d'un an il y a

A résolu


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

plus d'un an il y a

A résolu


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

plus d'un an il y a

A résolu


文字列の最初と最後の文字だけ抜き出しましょう。
文字列の最初と最後の文字をつなげて返すような関数を作成しましょう。 もし文字が一つしかない場合、その文字は最初と最後の文字のため、関数はその文字を二回返すようにしておきましょう。 例: stringfirstandlast('borin...

plus d'un an il y a

A résolu


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.3333 と...

plus d'un an il y a

A résolu


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

plus d'un an il y a

A résolu


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

plus d'un an il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

plus d'un an il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

plus d'un an il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

plus d'un an il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

plus d'un an il y a

Charger plus