Solved

NO _________ ALLOWED....

So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

7 hours ago

Solved

How many Fibonacci numbers?

Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

8 hours ago

Solved

Neither minima nor maxima

Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

8 hours ago

Solved

Vector push

Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

1 day ago

Answered

Find the maximum value corresponding to the specific index

Assuming a two column matrix maX= max(yourMatrix(yourMatrix(:,1)==1,2));

Find the maximum value corresponding to the specific index

Assuming a two column matrix maX= max(yourMatrix(yourMatrix(:,1)==1,2));

2 days ago | 0

| accepted

Answered

Find Number of values filtered through conditioned for loops

No loops needed. x=rand(1,100); y=rand(1,100); filtered_array=[x(abs(x)<=.5),y(abs(y)<=.5)]; a=length(filtered_array);%this ...

Find Number of values filtered through conditioned for loops

No loops needed. x=rand(1,100); y=rand(1,100); filtered_array=[x(abs(x)<=.5),y(abs(y)<=.5)]; a=length(filtered_array);%this ...

2 days ago | 0

Answered

How do I use elements in a vector to create a number

Take whatever indexes of the vecture you want to create the number out of say 1:3 x=[1 2 3 4 9 7]; y=num2str(x(1:3)); y=str2d...

How do I use elements in a vector to create a number

Take whatever indexes of the vecture you want to create the number out of say 1:3 x=[1 2 3 4 9 7]; y=num2str(x(1:3)); y=str2d...

2 days ago | 0

| accepted

Answered

calling function output variable names from a defined vector

Make sure you are saving the function as a code file (hit new function and enter and save the function there...not the command l...

calling function output variable names from a defined vector

Make sure you are saving the function as a code file (hit new function and enter and save the function there...not the command l...

2 days ago | 0

Answered

How to find the closest value between a matrix and a vector and print out its index?

You mean something like this? I=[]; for k=1:length(v) [~,idx]=min(abs(m-v(k)),[],'all','linear'); I=[I,idx]; end

How to find the closest value between a matrix and a vector and print out its index?

You mean something like this? I=[]; for k=1:length(v) [~,idx]=min(abs(m-v(k)),[],'all','linear'); I=[I,idx]; end

4 days ago | 0

| accepted

Answered

creating a specific markov probability matrix

If you use linear indexing (iaw Matlab), then the bottom left vertix of your graph is 8 and the top right vertix is 57. Then the...

creating a specific markov probability matrix

If you use linear indexing (iaw Matlab), then the bottom left vertix of your graph is 8 and the top right vertix is 57. Then the...

4 days ago | 0

| accepted

Answered

Undefined function 'mtimes' for input arguments of type 'function_handle'.

c = [.01; 1]; x = 0:10:100; tbolt1 = [0.165,1.85,2.87,3.78,4.65,5.5,6.32,7.14,7.96,8.79,9.69]; t0 = tbolt1(1); te = tbolt1(...

Undefined function 'mtimes' for input arguments of type 'function_handle'.

c = [.01; 1]; x = 0:10:100; tbolt1 = [0.165,1.85,2.87,3.78,4.65,5.5,6.32,7.14,7.96,8.79,9.69]; t0 = tbolt1(1); te = tbolt1(...

4 days ago | 1

Answered

For loop not showing plot?

I answered your previous question also. This is the same answer. No loop is needed. Your override error on each loop to a single...

For loop not showing plot?

I answered your previous question also. This is the same answer. No loop is needed. Your override error on each loop to a single...

4 days ago | 0

Solved

Justify the character string in center with proportional fonts

how to justify a string of character into center with proportional fonts? Example: x='justify string ' output is ' justif...

4 days ago

Solved

Solve The Equation

The coefficients of a system of equations are given in two vectors, x1 and x2. Write a function to solve the equation and return...

4 days ago

Solved

Find The Difference

Vector x is given.calculate the difference between the biggest and the smallest number that we can create from elements of x. f...

4 days ago

Solved

Add 3 (x<=100) Or Subtract 100 and add 3(100<x)

Add 3 to every element. However, if the value is greater than 100, subtract 100 and add 3. eg. input x = [45 106; 67 1...

4 days ago

Solved

A kind of decryption

Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

4 days ago

Solved

Sort complex numbers into complex conjugate pairs

Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

4 days ago

Solved

Construct a string from letters and counts

Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

4 days ago

Solved

Snakes on a plane

Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

4 days ago

Solved

Four digit number ABCD reversal

write a MATLAB function to find the four-digit number ABCD when multiplied by 4 returns DCBA. The function takes an input x=4.

4 days ago

Solved

How many apple

You have x apples I take from you y apples now how many apples you have ?

4 days ago

Solved

Convert base 10 to base x (2-16)

Convert input number(s) (double) in base 10 to base x (2 through 16). Output should be a cell of character arrays. Compute outpu...

4 days ago

Answered

Need help in creating a script without using for loops.

N=length(x); Xk=sum(x.*exp((-1i*2*pi/N*(0:N-1)).*(0:N-1)'),2);

Need help in creating a script without using for loops.

N=length(x); Xk=sum(x.*exp((-1i*2*pi/N*(0:N-1)).*(0:N-1)'),2);

5 days ago | 0