Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

plus de 2 ans ago

Solved

merge two matrices together in one matrix

a= [1 2 3 4]; b=[5 6 7 8]; take the first column from matrix (a)and (b)then insert them in matrix (c) respectively, and so on;...

presque 3 ans ago

Solved

Sudoku square

We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

presque 3 ans ago

Solved

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

presque 3 ans ago

Solved

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

presque 3 ans ago

Solved

Area of an Isoceles Triangle

An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

presque 3 ans ago

Solved

Words Count: A String Array Approach

Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

presque 3 ans ago

Answered

How to use intervals within fplot?

In R2016a and beyond, you could use this: fplot(@f,[10,20],'MeshDensity',100) It's worth noting that |fplot| in these re...

How to use intervals within fplot?

In R2016a and beyond, you could use this: fplot(@f,[10,20],'MeshDensity',100) It's worth noting that |fplot| in these re...

environ 3 ans ago | 0

Answered

Does MATLAB have a function to winsorize outliers?

Here is a way to perform winsorization, using the |quantile| function from the Statistics and Machine Learning Toolbox: dat...

Does MATLAB have a function to winsorize outliers?

Here is a way to perform winsorization, using the |quantile| function from the Statistics and Machine Learning Toolbox: dat...

plus de 3 ans ago | 2

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

presque 5 ans ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

presque 5 ans ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

presque 5 ans ago

Answered

Reducing or simplifying the **symbolic** product of two integrals

What |simplify| currently cannot do is to rename your bound variable |eta| to |xi| at the right time. You may need to explicitly...

Reducing or simplifying the **symbolic** product of two integrals

What |simplify| currently cannot do is to rename your bound variable |eta| to |xi| at the right time. You may need to explicitly...

environ 5 ans ago | 0

Answered

Symbolic Output Display Problem

If I understand your problem correctly, you don't want approximations as given by |vpa|. In that case, here's the best advice I ...

Symbolic Output Display Problem

If I understand your problem correctly, you don't want approximations as given by |vpa|. In that case, here's the best advice I ...

environ 5 ans ago | 0

Answered

MUPAD plot multiple points

If you already have multiple points (not just the vector |r|), you can get a line through them this way: plot([[1,2],[3,10]...

MUPAD plot multiple points

If you already have multiple points (not just the vector |r|), you can get a line through them this way: plot([[1,2],[3,10]...

environ 5 ans ago | 2

| accepted

Answered

Creating new symbolic identities

Works for me: >> syms x y z >> S = x^2+y^2+z^2+x+y+z+1 S = x^2 + x + y^2 + y + z^2 + z + 1 >> su...

Creating new symbolic identities

Works for me: >> syms x y z >> S = x^2+y^2+z^2+x+y+z+1 S = x^2 + x + y^2 + y + z^2 + z + 1 >> su...

environ 5 ans ago | 0

Answered

Big integer and Precision

You can compute with exact integers and rationals using the symbolic toolbox, just make sure they are not cut off by computing i...

Big integer and Precision

You can compute with exact integers and rationals using the symbolic toolbox, just make sure they are not cut off by computing i...

environ 5 ans ago | 0

Answered

Error, (in expand/bigprod) integer too large in context ?

This error means the computation is trying to compute something like integer^integer with an exponent larger than 2^32. The resu...

Error, (in expand/bigprod) integer too large in context ?

This error means the computation is trying to compute something like integer^integer with an exponent larger than 2^32. The resu...

environ 5 ans ago | 0

Answered

Solve symbolic system of equations when specifying solutions

>> A = sym('a',[3 3]); >> b = sym('b',[3 1]); >> x = A\b x = (a1_2*a2_3*b3 - a1_3*a2_2*b3 - a1_2*a3_3*...

Solve symbolic system of equations when specifying solutions

>> A = sym('a',[3 3]); >> b = sym('b',[3 1]); >> x = A\b x = (a1_2*a2_3*b3 - a1_3*a2_2*b3 - a1_2*a3_3*...

environ 5 ans ago | 0

| accepted

Answered

Find degree of non-polynomial expression in Matlab

That depends on what exactly you are looking for in the general case. Here's something that works in this particular one: >...

Find degree of non-polynomial expression in Matlab

That depends on what exactly you are looking for in the general case. Here's something that works in this particular one: >...

environ 5 ans ago | 0

Answered

Comparing accuracy of symbolic computation with matlabFunction

Small correction to Christopher Berry's answer: |double(subs(s))| does not compute to 32 digits (unless the values substituted a...

Comparing accuracy of symbolic computation with matlabFunction

Small correction to Christopher Berry's answer: |double(subs(s))| does not compute to 32 digits (unless the values substituted a...

environ 5 ans ago | 1

Answered

simplifying symbolic expressions using assumptions

This approximation can be viewed as a special kind of truncated series: >> syms X Y >> A = X/(X*Y + 1); >> taylor(A, ...

simplifying symbolic expressions using assumptions

This approximation can be viewed as a special kind of truncated series: >> syms X Y >> A = X/(X*Y + 1); >> taylor(A, ...

environ 5 ans ago | 0

Answered

Using subs for multiple substitution when the symbolic expression is a matrix

If you want to substitute values for all variables, want to get a double, and plan to do that more often, I definitely recommend...

Using subs for multiple substitution when the symbolic expression is a matrix

If you want to substitute values for all variables, want to get a double, and plan to do that more often, I definitely recommend...

environ 5 ans ago | 0

Solved

Remove NaN ?

input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

environ 5 ans ago

Solved

All your base are belong to us

Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

environ 5 ans ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

environ 5 ans ago

Solved

Scrabble Scores

Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

plus de 5 ans ago

Solved

Test for balanced parentheses

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

plus de 5 ans ago

Solved

Maximum running product for a string of numbers

Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

plus de 5 ans ago

Solved

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

plus de 5 ans ago