Answered
FORTRAN POPPAR Equivalent in Matlab
The obvious answer is the simple answer... sum(dec2bin(I) - '0')

5 years ago | 0

| accepted

Answered
ode45 solving a differential equation that has no solution for given boundary conditions
So, you formulated a 2nd degree ODE. Converted it as: syms x(t) eqn = diff(x,2) + x == 0 [V] = odeToVectorField(eqn) M = m...

5 years ago | 0

| accepted

Answered
manually-written floor function code for rounding non-integers
If you want a mathematical expression, WRITTEN in MATLAB (where it will not have been written in the actual code) this could wor...

5 years ago | 2

| accepted

Answered
Questions on "Ordinary kriging"
As Jan told you, vstruct is provided by variogramfit. Where can you find that code? You need to download variogramfit, also prov...

5 years ago | 1

Answered
Rescaling curves by a factor to a single curve
You are looking to fit these curves using some nonlinear model. But you have not even said what model you want to use, just that...

5 years ago | 1

Answered
Can I solve a constrained optimization of general form of algebraic equation using matlab?
The problem is, even a simple function as you have written is is not as simple as you think. This is a problem of understanding ...

5 years ago | 0

| accepted

Answered
Problem when testing long decimal numbers
The problem is merely your understanding of floating point numbers and the methods used to store them. MATLAB uses only 52 bina...

5 years ago | 0

| accepted

Answered
Solving Ax=b but only for the values in some rows of x
We are given a problem where A is a large sparse matrix. We wish to compute the solution for the problem A*X == b where b ...

5 years ago | 1

| accepted

Answered
Optimization solvers change their performance in different programming languages?
No. The language makes NO choices. It does not prepare the problem differently. A language is not in itself sufficiently intelli...

5 years ago | 0

Answered
I have a problem with my code, it works fine but the results it isn't correct because the code is not compatible with the equations .. description below
This is one of those questions that tend to languish unanswered on the site. Why? Because you just say that your code does not w...

5 years ago | 0

Answered
Lsqnonlin problem for calibrating accelerometer
Um, the solution is not to find Q. Because it is difficult to constrain a matrix to be positive definite. You don't want to try ...

5 years ago | 0

Answered
control the threshold of random numbers
You just say you want a distribution of numbers that is not uniform. But if you say only what it is not, that is not enough to s...

5 years ago | 0

| accepted

Answered
Find the transformation matrix
First, learn to use matrices, NOT numbered variables. Assuming that you have a matrix X, and a matrix Y, with x1 x2, y1, y2 as c...

5 years ago | 1

| accepted

Answered
how to solve 3 equations with a known variable and 3 unknown variables
The solution is simple, as I said, and somehow, I imagine you will end up changing the question again. I'll give you an answer, ...

5 years ago | 0

Answered
How can I identify the most important independent variable in an equation?
Is it possible? Not really. Not using MATLAB or anything else. You have ONE expression. You might describe the "most important" ...

5 years ago | 0

| accepted

Answered
Does Matlab have a library for Monte Carlo integration
Do they have a "library"? Not really what I would call a "library". Maybe you might. But why would they? They offer random numbe...

5 years ago | 0

Answered
How to get rid of small difference (or error) when I multiply 0.1?
You do understand that MATLAB, as is true of almost any programming language, uses binary storage methods to store all floating ...

5 years ago | 2

Answered
Masonry interpenetration issue in 2D simulation
What caused it? Since we cannot see code that you have not posted, my crystal ball is freaking out. It refuses to tell me anythi...

5 years ago | 0

Answered
Will there be an option in the future where Simscape or Simulink can solve PDE's?
Note that anyone who does know the answer to this is also under a non-disclosure agreement, so they could not tell you if they d...

5 years ago | 0

| accepted

Answered
How to draw perpendicular line from scatter points in 2-D plot
I would STRONGLY recommend you learn to use descriptive variable names. a? b? z? MATLAB does not charge more for you to use two...

5 years ago | 0

Answered
Solve function is unable to return the results of System of equations in the desired single number format instead of fraction ? help
Sure it is. You just need to convert the result from a fraction, into a floating point number. So either use double to create a ...

5 years ago | 0

| accepted

Answered
if statement with greater than and less than
This is a common shorthand notation in mathematics, thus A < B < C where we know that what is really meant is a pair of ...

5 years ago | 1

Answered
Is there a way to report/flag submissions on the File Exchange?
Best is to report them to the FEX admin. I'll do that for the ones you have shown. If you see other sustpect ones, and you just ...

5 years ago | 1

Answered
Finding curve length of vector r(t)=<2t, t^2, 1/3t^3> Given0<=t<=1
Just for kicks, I'll use my arclength tool, see how well it can do. t = linspace(0,1,100); X = 2*t;; Y = t.^2; Z = t.^3/3; ...

5 years ago | 0

Answered
Can someone help me with this function assignment
The name of the m-file must be MyTimeConversion.m, or MATLAB will not see it as such. You cannot have other functions in the sam...

5 years ago | 0

Answered
reshape matrix with variable length to vector
Look at the order the elements were returned. Do you know how the elements of a matrix are stored? DOWN THE COLUMNS. So when you...

5 years ago | 0

Answered
How to solve a differential equation with two unknown variables
This is a PDE. A partial differential equation. ODE45 CANNOT solve it, as it is not designed to solve that class of problem. (No...

5 years ago | 0

| accepted

Answered
diff function rearranges symbolic expression leading to non-vanishing terms
This is a floating point problem, but it comes when MATLAB takes your constants and turns them into symbolic numbers. Do you see...

5 years ago | 0

Answered
what kind of program is suitable for developing with simulink
This is very vague and confusing as a question. Are you asking what types of problems do people tend to solve using Simulink? P...

5 years ago | 0

Load more