A résolu


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

plus de 3 ans il y a

A résolu


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

plus de 3 ans il y a

A résolu


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A répondu
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,...

plus de 3 ans il y a | 1

A répondu
how to fit a signal using polynomial fit with hogher order?
try polyfit function: polyfit function

plus de 3 ans il y a | 0

A répondu
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))

plus de 3 ans il y a | 0

A répondu
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(...

plus de 3 ans il y a | 0

| A accepté

A répondu
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<=...

plus de 3 ans il y a | 0

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A répondu
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)/...

plus de 3 ans il y a | 1

| A accepté

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A répondu
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));

plus de 3 ans il y a | 0

| A accepté

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A répondu
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))

plus de 3 ans il y a | 0

Charger plus