Answered

How to get part of 2D array from a 2D array. (i.e. 4x4 array to 2x2x4)

A=reshape([a(1:2,:),a(3:4,:)],2,2,4);

How to get part of 2D array from a 2D array. (i.e. 4x4 array to 2x2x4)

A=reshape([a(1:2,:),a(3:4,:)],2,2,4);

2 hours ago | 0

Solved

Calculate the h-index

H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

13 hours ago

Solved

Calculator spelling - Numbers to Letters

Using the numbers on a calculator, and rotating the display 180 degrees, many words can be spelled. In particular, the following...

13 hours ago

Solved

Leftovers? Again?!

I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

13 hours ago

Solved

My Problem, Find the square of the horizontal concatenation of the third and fifth elements of a vector.

given the 1x5 vector x, y must be the square of the horizontal concatenation of the third and fifth elements. So, if x = [1 1 1 ...

14 hours ago

Solved

Pattern Sum

Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

14 hours ago

Solved

Electric Flux

Calculate the flux passing through a surface. E is electric field, A is area.

15 hours ago

Solved

number of groups

In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

15 hours ago

Solved

first step for Huffman Coding (easy)

Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

1 day ago

Solved

Guess

A random number between 1 and 10 is created for the variable y. Guess what its value is.

1 day ago

Solved

Divide the Least Common Multiple by the Greatest Common Divisor of two numbers

Divide the Least Common Multiple by the Greatest Common Divisor of two numbers. For example, for x=12345 and y=54321, the answer...

1 day ago

Solved

Insert Special character in character cell array.

input={'a','b','c'} then ans={'a','*','b','*','c'}

1 day ago

Solved

Deleting Specific part.

if input is x= { /*[0..10]*/ 0, 11, 21, 31, 41, 55, 50, 10, 810, 9.10, /*[10...25]*/ 100, 110, 120, 130, 140, 255 ...

1 day ago

Solved

Replace Negative(-) by 0 and positive by 1

In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

1 day ago

Solved

Help the Patriots get to the Super Bowl

Given a football by the Patriots, return it to them with 2 psi less air in it. (The original psi is passed as a number to the...

1 day ago

Solved

New Matrix with vector addition on diagonal

consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

1 day ago

Answered

Subtraction matrix for all values

for m=1:size(A,2) for n=1:size(A,2) B(:,(m-1)*size(A,2)+n)=A(:,m)-A(:,n); end end

Subtraction matrix for all values

for m=1:size(A,2) for n=1:size(A,2) B(:,(m-1)*size(A,2)+n)=A(:,m)-A(:,n); end end

1 day ago | 0

Answered

How can I plot my function?

hold on i=-1000:1000; x=i/1000; for n=1:20 u=(((2*(-1)^n))/(n*pi))*((6/((n^2*pi^2)^3))-1)*sin(n*pi*x); plot(x,u); end

How can I plot my function?

hold on i=-1000:1000; x=i/1000; for n=1:20 u=(((2*(-1)^n))/(n*pi))*((6/((n^2*pi^2)^3))-1)*sin(n*pi*x); plot(x,u); end

1 day ago | 0

Answered

if statement find criteria not doing what I want it to do

function[out]=neqchek(k) c=find(k==1) if ~isempty(c) k(1)=10 out=k end end

if statement find criteria not doing what I want it to do

function[out]=neqchek(k) c=find(k==1) if ~isempty(c) k(1)=10 out=k end end

1 day ago | 0

| accepted

Answered

why is my plot plotting blank?

g = 9.8; %m/s^2 rohp = 1800;%kg/m3 Dp = 0.208e-3; %m T = 298.15; %K roh = 994.6; %kg/m3 vis = 8.931e-4; %kg/m · s Vt=0:0....

why is my plot plotting blank?

g = 9.8; %m/s^2 rohp = 1800;%kg/m3 Dp = 0.208e-3; %m T = 298.15; %K roh = 994.6; %kg/m3 vis = 8.931e-4; %kg/m · s Vt=0:0....

1 day ago | 0

Solved

Vector to 3-Column Matrix

Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

1 day ago

Solved

Basic matlab numeric and string manipulations

If entered input (n) is _numeric_ , compute its *log to the base (n+2)* , if it is a _lower case_ alphabet, *convert it to i...

1 day ago

Solved

Identify primorial primes

Cody Problems <https://www.mathworks.com/matlabcentral/cody/problems/46054-count-trailing-zeros-in-a-primorial 46054> and <https...

1 day ago

Solved

Calculating Ring Area

In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...

1 day ago

Solved

Find out next state (NS) of T Flip-Flop.

Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

1 day ago

Solved

Generate this matrix

Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

1 day ago

Solved

Case-insensitive Character Detection

Find the index of a particular character in a string ignoring case. Example Input: x = 'aAbhhfdf' n = 'a' ...

1 day ago

Solved

Find smallest number to leave a remainder of 1

given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

1 day ago