Community Profile

# VBBV

### PEC

Last seen: Today Attivo dal 2017

MATLAB enthusiast , Mechanical engineer (MeMe) :-)

All

#### Content Feed

Visto da

Risposto
How to display functions with 2 outputs
a = 212% input('Please enter a number '); disp("Select what conversion you want to do:"); disp('1. Celsius to Fahrenhiet') co...

circa 3 ore fa | 1

| accettato

Risolto

Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

circa 4 ore fa

Risolto

Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

circa 5 ore fa

Risolto

Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

circa 5 ore fa

Risolto

Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

circa 5 ore fa

Risolto

Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

circa 6 ore fa

Risolto

テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

circa 11 ore fa

Risolto

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

circa 12 ore fa

Risolto

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

circa 12 ore fa

Risolto

チェッカーボードを作ろう

circa 12 ore fa

Risolto

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

circa 13 ore fa

Risolto

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

circa 14 ore fa

Risolto

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

circa 14 ore fa

Risposto
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')

circa 15 ore fa | 1

| accettato

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

circa 18 ore fa | 0

Risolto

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

1 giorno fa

Risolto

2倍してみよう - ここからスタート！

1 giorno fa

Risolto

1 giorno fa

Risolto

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

1 giorno fa

Risolto

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

2 giorni fa

Risolto

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

2 giorni fa

Risolto

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

2 giorni fa

Risolto

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

2 giorni fa

Risolto

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

2 giorni fa

Risolto

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

3 giorni fa

Risolto

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

3 giorni fa

Risolto

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.

3 giorni fa

Risolto

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

3 giorni fa

Risolto

Find the Pattern 1

3 giorni fa

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

3 giorni fa | 0