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

etwa 6 Stunden 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));

etwa 17 Stunden 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 ...

etwa 17 Stunden 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...

etwa 17 Stunden 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...

etwa 18 Stunden ago | 0

Answered

What is this question asking and where do I start?

[s',s'.^2*6,s'.^3];

What is this question asking and where do I start?

[s',s'.^2*6,s'.^3];

etwa 18 Stunden 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

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

3 Tage 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(...

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

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

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

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

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

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

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

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

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

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

3 Tage ago

Solved

How many apple

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

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

3 Tage 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);

4 Tage ago | 0

Answered

If for example, I have the letter 'a' in table punnettSquare(2,1) and I want to add a letter 'b' to that same cell so that the element of the cell would be 'ab'. What function should I use?

punnettSquare{2}{1}='ab';

If for example, I have the letter 'a' in table punnettSquare(2,1) and I want to add a letter 'b' to that same cell so that the element of the cell would be 'ab'. What function should I use?

punnettSquare{2}{1}='ab';

4 Tage ago | 0

Answered

No values in plot?

Not sure what you were doing, but each loop iteration you were overriding your data. No loop needed. My_numb_1=1:50; My_numb_2...

No values in plot?

Not sure what you were doing, but each loop iteration you were overriding your data. No loop needed. My_numb_1=1:50; My_numb_2...

4 Tage ago | 0

Answered

Detect consecutive positive numbers in an array

A(A<0)=0;%if negative numbers possible A(A>9)=9;%if >single digit possible a=num2str(A); a=a(a~=' '); B=[regexp(a,'[1-9]*')'...

Detect consecutive positive numbers in an array

A(A<0)=0;%if negative numbers possible A(A>9)=9;%if >single digit possible a=num2str(A); a=a(a~=' '); B=[regexp(a,'[1-9]*')'...

4 Tage ago | 1

| accepted

Solved

Finding fourier transform of a given vector

Find the fourier transform of a given input vector for ex a=[1 2 3 4] then y=[ 10.0000 + 0.0000i -2.0000 +...

4 Tage ago

Solved

replace empty matrices with '[]'

for example a=1;a(:,1)=[]; returns a = Empty matrix: 1-by-0 use this as the input,and the output should be '[]...

4 Tage ago