Question

Bus and model variants

Hello, I used to have a variant subsystem and wanted to change to model variant to avoid compiling again and again some parts...

4 years ago | 0 answers | 0

Solved

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

4 years ago

Solved

Circle area using pi

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

4 years ago

Answered

Order and plot two linked vectors

Another simple way is to use indice in the second output of the sort function. [rho_sorted order]= sort(rho); h_rho=h(or...

Order and plot two linked vectors

Another simple way is to use indice in the second output of the sort function. [rho_sorted order]= sort(rho); h_rho=h(or...

4 years ago | 0

Question

How to keep color in a configurable subsystem

Hello, To make easier the choice the change of one element in a complex system, I am currently trying to create a library wit...

5 years ago | 0 answers | 0

Solved

The Goldbach Conjecture

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

5 years ago

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

5 years ago

Solved

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

5 years ago

Solved

Reverse the vector

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

5 years ago

Question

Matlab, Excel and validation of data

Hello, I wanted to create some rule of validation on some cells in Excel documents. I used the macro-recording to see which me...

5 years ago | 3 answers | 0

Solved

Fahrenheit to Celsius using multiple statements

Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

5 years ago

Solved

Back and Forth Rows

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

5 years ago

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

5 years ago

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

5 years ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

5 years ago

Solved

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

5 years ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

5 years ago

Solved

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

5 years ago

Solved

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

5 years ago

Question

How to change a template

Hello everybody, In order to fill my powerpoint with Matlab pictures, I want to open a new powerpoint and fill it with Matlab...

5 years ago | 0 answers | 0

Question

Manage powerpoint on Matlab

Hello, Part of my job is now to create powerpoint with a lot of figure which "that is good ..." "that is not..". And all of t...

5 years ago | 1 answer | 0

Answered

how to find nearest distant points for two unequal sized pair of data

When you do A3=A2(P); B3=B2(P); P is a "boolean", it is either at 0 or 1 depending of the inequality. I tried this, an...

how to find nearest distant points for two unequal sized pair of data

When you do A3=A2(P); B3=B2(P); P is a "boolean", it is either at 0 or 1 depending of the inequality. I tried this, an...

5 years ago | 0

| accepted

Answered

How to plot values from excel sheet

First of all, you must to import these values in your workspace in Matlab. So you have to use the <http://fr.mathworks.com/he...

How to plot values from excel sheet

First of all, you must to import these values in your workspace in Matlab. So you have to use the <http://fr.mathworks.com/he...

5 years ago | 0

| accepted

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

5 years ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

5 years ago

Answered

How do I get output arguments from a function without calling it (not as ans)

I'm not 100% sure but I don't think this is possible and this is better. I mean, imagine you already have the variables R,X,Y...

How do I get output arguments from a function without calling it (not as ans)

I'm not 100% sure but I don't think this is possible and this is better. I mean, imagine you already have the variables R,X,Y...

5 years ago | 0

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

5 years ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

5 years ago