해결됨

MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

1년 이상 전

답변 있음
How to plot the figure using Matlab ?
You can combine four plot commands or use four curves (lines) to plot it for example plot([0,1],[1,0],'r', [1,2,4,8],[0,-1,-2,...

1년 이상 전 | 1

답변 있음
how to fit a signal using polynomial fit with hogher order?
try polyfit function: polyfit function

1년 이상 전 | 0

답변 있음
How can i run my integer number from this question ?
You can convert the strinng to a double number then apply int8 or int16: int16(str2double(inputLetter))

1년 이상 전 | 0

답변 있음
error using plot vectors must be the same length
try to use this line of code inside the loop. For now, the code returns a single point for error; for i=2:test_points x_rec(...

1년 이상 전 | 0

| 수락됨

답변 있음
How to describe function with varying variables?
You can multiply the first equation by a vector that is 1 for t<=L/v and is zero when t>L/v h=(H/2)*(1-cos(2*pi*v*t/L)).*( t<=...

1년 이상 전 | 0

해결됨

Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.&#8519;^(-&lambda;t)*cos(2πft)| where |A|, |&lambda;|, and |f| ...

1년 이상 전

해결됨

Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

1년 이상 전

해결됨

Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

1년 이상 전

답변 있음
How to save each loop data?
You can make a vector of points as here: c=3e8; %speed of light u=0; uv=[]; yv=[]; while u<(c) y=1/(sqrt(1-((u^2)/...

1년 이상 전 | 1

| 수락됨

해결됨

Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

1년 이상 전

해결됨

How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

1년 이상 전

해결됨

Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

1년 이상 전

해결됨

Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

1년 이상 전

해결됨

Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

1년 이상 전

해결됨

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

1년 이상 전

해결됨

Solve a System of Linear Equations
*Example*: If a system of linear equations in _x&#8321_ and _x&#8322_ is: 2 _x&#8321;_ + _x&#8322;_ = 2 _x&#8321;...

1년 이상 전

답변 있음
How to solve 'vector must be the same length', 'functions behave unexpectedly' errors when graphing vector equation
in the first code, instead of x=3; use this one: x=3*ones(size(t));

1년 이상 전 | 0

| 수락됨

해결됨

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

1년 이상 전

해결됨

Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

1년 이상 전

해결됨

Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

1년 이상 전

해결됨

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

1년 이상 전

해결됨

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

1년 이상 전

해결됨

Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

1년 이상 전

해결됨

Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

1년 이상 전

해결됨

Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

1년 이상 전

답변 있음
Working with complex numbers in the Symbolic Math Toolbox. Why does angle(A) returns atan2(sin(alpha),cos(alpha)) instead of just alpha?
if you want to find the numerical value of alpha, one solution is to use double function: double(angle(A))

1년 이상 전 | 0

답변 있음
Can I save a MATLAB variable generated by a function into another MATLAB function?
You can use global variables by this line of code in all functions that share the same variables: global var1 var2 var3

1년 이상 전 | 0

답변 있음
Factorial without the Command
Using only basic operations: function f = Factorial(n) % % initial value, 0! and 1! f = 1; if n > 1 for i=2:n ...

1년 이상 전 | 0

답변 있음
Factorial without the Command
function f = Factorial(n) % % if n = 0 || n = 1 f = 1; elseif n >= 1 f = n * Factorial(n-1); end

1년 이상 전 | 0