A résolu


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

3 jours il y a

A résolu


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

3 jours il y a

A résolu


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

3 jours il y a

A résolu


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

3 jours il y a

A répondu
plot legend shows wrong linespec
d = load('data.mat') %figure plot(d.t,repmat(d.molTot,length(d.t),1),'-rx',d.t,d.molGas,'-bo'); legend('a','b')

3 jours il y a | 1

| A accepté

A répondu
for loops within while loop
while t1< 2 & h2 >= 0 % your code end You could put both conditions together as above using single while loop.

4 jours il y a | 0

A résolu


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

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

4 jours il y a

A résolu


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

4 jours il y a

A résolu


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

4 jours il y a

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

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

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

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

5 jours il y a

A résolu


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

5 jours il y a

A résolu


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

5 jours il y a

A résolu


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

5 jours il y a

A résolu


Průměr z výběrového souboru
Napište funkci, která vrátí průměr z hodnot vektoru data. Např data = [1, 2, 3, 4, 5, 6, 7, 8, 9] je prumer = 5.

5 jours il y a

A résolu


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

5 jours il y a

A résolu


Find the Pattern 1

5 jours il y a

A répondu
How to Generate Subscripted Arrays in Live Scripts
\left(\begin{array}{ccc} z_{1} & z_{2} & z_{3} \end{array}\right)

5 jours il y a | 0

A résolu


SatCom #4: Satellite Orbit Altitude
Satellite and Space Engineering - Problem #4 This is part of a series of problems looking at topics in satellite and space comm...

5 jours il y a

A résolu


SatCom #3: Free Space Path Loss
*Satellite and Space Engineering - Problem #3* _This is part of a series of problems looking at topics in satellite and space...

5 jours il y a

A résolu


SatCom #2: Gain of a circular 'dish' antenna
Satellite and Space Engineering - Problem #2 This is part of a series of problems looking at topics in satellite and space comm...

5 jours il y a

A résolu


SatCom #1: Wavelength of an electomagnetic wave
*Satellite and Space Engineering - Problem #1* _This is the first of a series of problems looking at topics in satellite and ...

5 jours il y a

A résolu


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

5 jours il y a

A résolu


Converts numbers into characters
Converts numbers into characters

5 jours il y a

A résolu


Find the max element of the array
Find the max element of the array

5 jours il y a

A résolu


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

5 jours il y a

A résolu


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

5 jours il y a

Charger plus