A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

presque 6 ans il y a

A résolu


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

presque 6 ans il y a

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 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...

presque 6 ans il y a | 1 réponse | 0

1

réponse

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

environ 6 ans il y a | 1 réponse | 0

1

réponse

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

plus de 6 ans il y a | 1 réponse | 0

1

réponse

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

plus de 6 ans il y a | 1 réponse | 0

0

réponse

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

plus de 6 ans il y a | 1 réponse | 0

0

réponse

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

plus de 6 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
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 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 6 ans il y a | 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...

plus de 6 ans il y a | 1 réponse | 0

1

réponse

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

plus de 6 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
Adjust subscript style / height
use the following after the plot command xlabel("y_{" + n + "}", 'Interpreter', 'tex') %for alphabet and xlabel(" \Omega_{"...

plus de 6 ans il y a | 0

Question


I am facing problem with big fraction
Hello everyone, When i am writing the following code, "sumx" returns me value in fraction, i want to show my result in terms of...

plus de 6 ans il y a | 1 réponse | 0

0

réponse

Question


When L is not unique, how can I choose any of L
let say i have a vector S=[ 7 1 15 13 2 14 6 10 12 11 4 8 3 9 5]; and after ...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Question


find the longest monotonically increasing subsequence of a sequence of n numbers?
I have algorithm of the longest monotonically increasing subsequence of a sequence of n numbers Let S[1]S[2]S[3]...S[n] be the ...

plus de 7 ans il y a | 3 réponses | 0

3

réponses

Question


I want to save matrix at each iteration to later use for Multiplication
I have written a code, it is working fne, but i couldnot save the result at each step. clear all; clc a=0:1; b=0:1; c=0...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Question


how to call a function one m-file to another m-file
lets say i have one m-file named call1.m having: function t =call1(a,b) a=10; b=5; t=a+b; end and i want to ca...

plus de 10 ans il y a | 1 réponse | 0

1

réponse

Question


I want to have my error bar graph like given in picture
clear all; clc; C = [0.962 0.9416 0.9606 0.9845 0.9385]; N = [0.9392 0.979 0.948 0 0]; S = [0.9599 0.9276 0.9571 0.93...

plus de 10 ans il y a | 1 réponse | 0

0

réponse

Question


for loop for different set of values
Hi, i want to run for loop with different set of values as for example for i = 2:6,17:22 Y= 2*i; End Please do it ...

presque 11 ans il y a | 3 réponses | 0

3

réponses

Question


problem in solving coupled non-linear Initial Value ODE using finite difference method
Hi i wrote a code for 3 coupled non-linear Initial Value ODE ( u and w are second order and v is 1st order ODE) using finite dif...

presque 11 ans il y a | 1 réponse | 0

0

réponse

Question


Error in Exact solution and numerical Solution
Hi I am solving a 2nd order linear ODE using Forward Scheme Finite Difference Method and also computing the Exact solution and p...

presque 11 ans il y a | 1 réponse | 0

0

réponse

Question


Load MAT files and Then Save new MAT file with same Name after calculations
If I have a series of MAT files and want to load it and then perform some calculation on it and then save all the new MAT files ...

environ 11 ans il y a | 1 réponse | 0

1

réponse

Question


Save variable in vector form after a loop
here is y code for calculating norm between two vectors and then saving the minimum number and its index in variable r and c, i ...

environ 11 ans il y a | 1 réponse | 0

1

réponse

Charger plus