Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

9 mesi ago

Solved

Divide by 4

Given the variable x as your input, divide it by four and put the result in y.

9 mesi ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

9 mesi ago

Solved

Distance walked 1D

Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

9 mesi ago

Solved

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

9 mesi ago

Solved

Matlab Basics II - Minimum

Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

9 mesi ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

9 mesi ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

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

9 mesi 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]

9 mesi 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 + ...

9 mesi ago

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

9 mesi ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

9 mesi ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

9 mesi ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

9 mesi ago

Answered

Trouble using fsolve with two non-linear equations and 3 parameter

I think it will works like in this way: function F = eql_coef(x) % x(1) == a % x(2) == d K_H2O = 20.999; K_OH = 1.0478; p ...

Trouble using fsolve with two non-linear equations and 3 parameter

I think it will works like in this way: function F = eql_coef(x) % x(1) == a % x(2) == d K_H2O = 20.999; K_OH = 1.0478; p ...

9 mesi ago | 0

Answered

Is this a bug in bar plot

I suggest you to use two additional lines of code highValue=10E15; y = [2 2 3*highValue; 2 5 6*highValue; 2 8 9*highValue; 2 1...

Is this a bug in bar plot

I suggest you to use two additional lines of code highValue=10E15; y = [2 2 3*highValue; 2 5 6*highValue; 2 8 9*highValue; 2 1...

9 mesi ago | 0

Question

merge mat files with different size?

Hi, Consider I have different .mat files and I want to merge them all and remove the repeated values, but the first problem I a...

9 mesi ago | 1 answer | 0

Question

need help to plot a mesh

I just want to mesh plot a dirac delta function, can somebody help me to do so. I wrote some lines of code to plot dirac delta ...

circa un anno ago | 1 answer | 0

Question

What is the error in this computation?

Here I want to plot a simple sum. I computed it manually by iterating different values, and then did it same by using for loop,...

circa un anno ago | 1 answer | 0

Question

Error in computing numerical solution?

I am enable to compute numerical solution, as it generates weird Initial conditions (may be) compared to the inintial value of U...

circa un anno ago | 0 answers | 0

Question

Spectral Method without FFT in MATLAB

Can somebody guide me that how spectral method will be implemented in MATLAB to PDE (lets say homogeneous heat equation with per...

circa un anno ago | 0 answers | 0

Question

Specrtal Method for Heat Equation

I have one dimensional homogeneous heat eqaution. I want to solve it numerically using by supposing where Taking time deri...

circa un anno ago | 0 answers | 0

Answered

How do i use boundary conditions to find variables in an equation

if you let Lp=constant and make changes in soln = solve(u,eqns,vars); to soln = solve(eqns); you will get a structure soln ...

How do i use boundary conditions to find variables in an equation

if you let Lp=constant and make changes in soln = solve(u,eqns,vars); to soln = solve(eqns); you will get a structure soln ...

circa un anno ago | 0

| accepted

Answered

setting column of a matrix to zero

You haven't define constants a and z, and a vector mt, so I suppose a=-1, z=4 and mt=rand(1,50) and following lines of code to p...

setting column of a matrix to zero

You haven't define constants a and z, and a vector mt, so I suppose a=-1, z=4 and mt=rand(1,50) and following lines of code to p...

circa un anno ago | 0

Question

How to plot analytical solution in terms of Fourier Series

I want to plot the analytical solution of the equation given below: for x=-1:1 and t=0:0.4:2 for as suitable values of p. I...

circa un anno ago | 1 answer | 0

Question

How can i plot an inline function?

I wrote a code in which i got and inline function as U = Inline function: U(p,t,x) = (372863112183097.*exp(500....

circa un anno ago | 2 answers | 0