Respondida
Trapezoidal numerical integration of f(y) = ( 1 / x(y) ) dy
You are confusing yourself here. Probably because you have created this variable x that has gotten you confused. But let me give...

más de 3 años hace | 1

| aceptada

Respondida
lsqnonlin providing very poor model fits
You have not posted the data, so it is impossible to test your code. Regardless, there are several common reasons why a solver ...

más de 3 años hace | 0

Respondida
What is the purpose of zero function?
Consider these two codes: tic x = []; for i = 1:100000 x = [x,i]; end toc clear x tic x = zeros(1,100000); for i...

más de 3 años hace | 1

Respondida
While loop that stops if certain number is inserted
You should read the help for while. What you wrote was not even close to valid MATLAB syntax. Look at the examples found in the ...

más de 3 años hace | 0

Respondida
multiplying row vector by a scalar
I think @Kay needs an example. A = ones(4,3) B = 1:3; A(3,:) = A(3,:).*B

más de 3 años hace | 0

Respondida
Doubt regarding angles of tan inverse
atan2 has nothing to do with it. At least not based on anything you said. The difference between angles can exceed the range yo...

más de 3 años hace | 0

Respondida
Bessel Function Calculation in Matlab
Several common problems in this, regardless of whether you got the factiorial/gamma problem solved. You want to use a series so...

más de 3 años hace | 1

Respondida
somebody help me please! I've gone over the irritation of approx_sqrt and the only way I've got each value of the function while using a calculator it was if I used y=2
The site seems to want an answer to your question, and we just answered you in the comments. Oh well. But seriously, your solut...

más de 3 años hace | 0

Respondida
How to remove noise (unwanted data)
Finding and removing what I might call singleton outlier's while leaving in place small amounts of noise can be a difficult task...

más de 3 años hace | 2

| aceptada

Respondida
How to check the proportionaly of columns of a complex rectagular matrix?
Checking if two vectors (in your case, just columns of a matrix) are proportional is pretty easy, as well as then computing the ...

más de 3 años hace | 1

| aceptada

Respondida
error with function ode45
You need to tell the ODEsolver FROM where, TO where will it integrate? So will the integration be, perhaps FROM 0 to 0.5? All y...

más de 3 años hace | 0

Respondida
save loop data with non integer steps
acvalues = 0.01:0.01:1; detectorsignal=zeros(size(acvalues)); for ind = 1:numel(acvalues) absorbing_coeff = acvalues(in...

más de 3 años hace | 0

Respondida
Write a function quadraticSolver that takes one 3-element array input and returns two outputs (root condition and root values). Use an if-elseif-else structure in your code.
The error message apparently tells you your array is composed of uint8 numbers. How do you convert a variable of integer type,...

más de 3 años hace | 1

Respondida
Creating an array of partial sums of certain array
For example, consider the vector (I've used syms here, so you can see that it works, and generate the correct terms. Had a been ...

más de 3 años hace | 2

Respondida
Numeric approximation of infinite sum
Um, first, legendreP will return either 1 or -1, depending on the value of n. So effectively, we can replace that call to Legend...

más de 3 años hace | 0

Respondida
how to solve two equations
Note that the two equations are fully uncoupled. This means U20 appeared only in one equation. It has absolutely no impact on th...

más de 3 años hace | 0

Respondida
How to find a root and know if fsolve or fzero is better?
IF you have a function of more than one variable, you ALWAYS need to use fsolve. fzero would not apply. IF you have a function ...

más de 3 años hace | 2

| aceptada

Respondida
Collection of Squares RGB Matrix
Really pretty simple. You have a list of colors. 24 of them, apparently. The thing is, all the examples you would see will hav...

más de 3 años hace | 0

| aceptada

Respondida
Finding Limits of Two variables
As stated in my comment to @Sulaymon Eshkabilov, the one variable at a time solution is rarely correct. Again, I'll give my exam...

más de 3 años hace | 0

Respondida
Finding the length of the longest continuous streak of a same number for each row of a matrix
When you have a question where there is some specific issue that you should know is a problem, TELL US ABOUT IT. Don't keep it a...

más de 3 años hace | 1

Respondida
how to get rid of the too many arguments error for "and" while keeping output the same
If you write invalid MATLAB synrtax, then you need to expect your code to fail. Perhaps some of those lines might be valid in ot...

más de 3 años hace | 0

Respondida
how to plot a signal in the time domain?
Nope. No other methods. Plot will plot what you give it. A common mistake made is to not understand that a vector of numbers is...

más de 3 años hace | 0

Respondida
How to save a symbolic function into a .txt file
You don't need to display it in the command window! For example, this expression will have 10001 terms in it. syms x P = expan...

más de 3 años hace | 0

Respondida
Why is 'Character#' not a valid mathlab variable name?
MATLAB itself can tell you. Just ask. why why why why why Do you want a better reason? Just because. Seriously, does there...

más de 3 años hace | 0

Respondida
How can I find out the index of the points here?
Pretty easy. (Easier yet, IF the lines were drawn at right angles. If they were, then we could do it in literally one line of co...

más de 3 años hace | 1

| aceptada

Respondida
Finding row index in a matrix in which the sum of the elements is greater than 1
Just do EXACTLY what you said. I'll break it down into pieces. S=[1,0,0;0,1,0;1,1,0;0,1,1;0,0,1] sum(S,2) % sum of the rows s...

más de 3 años hace | 1

| aceptada

Respondida
'erfi' not found in my MATLAB while it is in the MathWorks
which erfi -all erfi is part of the symbolic toolbox. It is NOT part of MATLAB proper. If you don't have the symbolic toolbox...

más de 3 años hace | 0

Respondida
Determine function from Poisson PDF with lambda < 1
I don't see the problem. Yes, you need good data. Not having sufficient data will kill any chances for do anything, but what do ...

más de 3 años hace | 0

Respondida
How to add commented description on new scripts
It would certainly be easy enough to write a set of tools to do that for you. In fact, that may be what you were using. https:/...

más de 3 años hace | 1

Respondida
Problem with surf plot shading - equal z values displayed as different colours
This is likely simpler than you think. Or maybe not. The colors for a surface are first chosen by a direct lookup into the curr...

más de 3 años hace | 0

| aceptada

Cargar más