Answered
A = 'hello' B = [0;0;0;0] How do I rename variable B with hello?
Here it is A = 'hello'; B = [0;0;0;0]; v = genvarname(A); eval([v,'=B']);

9 years ago | 0

Answered
Averaging the 3D-array
You may want to histogram the 3D array by 3D histogram. There many functions in Matlab central, just search for "N dimensional h...

9 years ago | 4

| accepted

Solved


A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

9 years ago

Problem


A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

9 years ago | 2 | 75 solvers

Solved


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

9 years ago

Solved


UICBioE240 problem 1.8
Given a list of grades in a class, write a script that gives the 2nd highest grade in the class and the average for the class. ...

9 years ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

9 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

9 years ago

Solved


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

9 years ago

Solved


exactly?
given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

9 years ago

Solved


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

9 years ago

Solved


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

9 years ago

Solved


Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

9 years ago

Solved


Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

9 years ago

Solved


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

9 years ago

Solved


Local Minima
Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

9 years ago

Solved


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

9 years ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

9 years ago

Solved


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

9 years ago

Solved


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

9 years ago

Solved


prime test 2
enter the only non prime,non composite number

9 years ago

Solved


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

9 years ago

Solved


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

9 years ago

Solved


Test of Quiz
Answer the questions and write in vector. Only one answer is correct. The founder of fuzzy logic is 1a) D. Golberg 1b)...

9 years ago

Solved


Celsius to Kelvin
Degrees Celsius = Kelvin - 273.15

9 years ago

Solved


Hydrogens in a Saturated Hydrocarbon
Given (c) carbon atoms in a saturated hydrocarbon molecule (all single bonds), how many hydrogen atoms (h) are in the molecule?

9 years ago

Solved


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

9 years ago

Solved


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

9 years ago

Answered
Why 2D sinusoidal grating Phase spectrum looks horizontal line?
Basically Matlab function FFT2 computes the discrete 1D FFT on image columns first, and then again it applies 1D FFT to the rows...

9 years ago | 4

| accepted

Answered
separate colors of image
Here is an example with a default matlab image to extract color bands: IMG=imread('peppers.png'); RED=IMG(:,:,1); GRE...

9 years ago | 4

Load more