Community Profile

photo

礼欣


Last seen: 8ヶ月 前 2022 年からアクティブ

Followers: 0   Following: 0

2150343

統計

  • Commenter
  • Promoter
  • Solver

バッジを表示

Feeds

表示方法

解決済み


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>...

1年以上 前

解決済み


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

1年以上 前

解決済み


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...

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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 [...

1年以上 前

解決済み


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...

1年以上 前

解決済み


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...

1年以上 前

解決済み


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 ...

1年以上 前

解決済み


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...

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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 ...

1年以上 前

解決済み


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

1年以上 前

解決済み


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.

1年以上 前

解決済み


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 ...

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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

1年以上 前

解決済み


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 ...

1年以上 前

さらに読み込む