Question

pause-clc-fprintf-pause ... fprintf is ignored

My thinking was that this: fprintf('Test %d',1) pause clc fprintf('Test %d',2) pause should: Print "Test 1" Wait for t...

8 giorni ago | 0 answers | 0

Answered

Integration with pi - Rational Approximation?

Thanks so much. Makes perfect sense!

Integration with pi - Rational Approximation?

Thanks so much. Makes perfect sense!

circa un mese ago | 0

Question

Integration with pi - Rational Approximation?

I'm having trouble understanding the difference between these two integration commands: clear; syms y; int(1000*9.8*(10-y)*(pi...

circa un mese ago | 2 answers | 0

Solved

Calculate the sum of two polynomials

Calculate the sum of two polynomials if they are written in notation with their coefficients. example: a=[3 4 5]; b=[...

8 mesi ago

Solved

Multiply two polynomials p and q given in in vector representation.

Multiply two polynomials p and q given in vector representation. Example p=[-2 0 1 -1 3 2] q=[1 0 -1 2 ...

8 mesi ago

Solved

Derivative of polynomial

Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

8 mesi ago

Solved

Polynomial Multiplication

Multiply two polynomial equation.Given polynomial coefficients a and b.

8 mesi ago

Question

How to enable autocomplete in the editor (not tab complete or live editor)?

The newest version of MATLAB online seems to do a bit of the classical autocomplete found in many IDEs. For example: So far...

8 mesi ago | 0 answers | 0

Solved

Remove all the words that end with "ain"

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

9 mesi ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

9 mesi ago

Solved

Test for balanced parentheses

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

9 mesi ago

Solved

Vector Magnitude Calculator

'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

9 mesi ago

Solved

Angle between Two Vectors

The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

9 mesi ago

Solved

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

9 mesi ago

Solved

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

9 mesi ago

Solved

Program an exclusive OR operation with logical operators

Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

9 mesi ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

9 mesi ago

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

9 mesi ago

Solved

We love vectorized solutions. Problem 1 : remove the row average.

Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

9 mesi ago

Solved

Symmetry of vector

Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

10 mesi ago

Solved

CONVERT TAN TO SIN

In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

10 mesi ago

Solved

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

10 mesi ago

Solved

Create a Multiplication table matrix...

Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

10 mesi ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

10 mesi ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

10 mesi ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

10 mesi ago

Solved

Generate a random matrix A of (1,-1)

Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

10 mesi ago

Solved

Compute a dot product of two vectors x and y

x and y are input vectors, d is a number and contains their dot product

10 mesi ago

Solved

Is this is a Tic Tac Toe X Win?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

10 mesi ago