Answered
recently updated my licence to the 2018b version. can i now uninstall the 2017b version?
You don't need to uninstall it, unless the disk space is a problem. Never an issue for me. In fact, I typically have 2-4 old rel...

7 years ago | 0

| accepted

Answered
Interpolate function using Spline and Lagrange interpolation and take definite integral from it
I'm not at all sure f(xpoints); s = @(x) spline(xpoints, ypoints); integral (s, 0, 3); what you think the line f(xpoints); ...

8 years ago | 1

| accepted

Answered
real & imaginary part
There is not a display or command window preference that will allow you to do as you have indicated. X = rand + i*rand X = ...

8 years ago | 0

| accepted

Answered
Facing a problem in calculating the sum of digits of 100!.
It looks like this question has gotten enough interest that it deserves a complete answer on how to do it using MATLAB. And sinc...

8 years ago | 4

| accepted

Answered
parabola wont show up?
fplot(@(x) -3.*x.^2+5.*x+10)

8 years ago | 0

Answered
My plot does not show anything
delta is a scalar. plot does not work well when one of the arguments is a scalar. I suppose some might call if a feature that ...

8 years ago | 1

Answered
Why does the solve function give me matrix instead of a number ?
You get 3 values, because there were 3 solutions found. You can convert them to numbers using vpa. syms z vpa([root(z^3 - (3...

8 years ago | 0

Answered
how to represent the purple color by a string value
You can't. MATLAB offers those string options for colors. If you want to set a specific color, you can, but as a numeric vector ...

8 years ago | 2

Answered
Hello everyone, Can I use predefined scattered values for the variables used in Genetic algorithms instead of ranges?
Well, you can, IF that is correct for your problem. For example, suppose you knew that you wanted variable x to take on 5 diff...

8 years ago | 0

Answered
Devide N points to S sets (all possible combinations)
All possible combinations? Seriously? 100 numbers, into all possible subgroups of 5 groups, or so? Roughly? Must all groups be t...

8 years ago | 1

Answered
Please can anyone clear my doubt regarding Concatenation of data.
Sorry, but there are soooo many reasons why you do not want to create those numbered variables. Having now done so however, you ...

8 years ago | 0

Answered
link this set of equations to a single unknown
Not gonna happen, well, not easily. For multiple reasons. You have a totally symbolic matrix A? Or are those all fixed numbers? ...

8 years ago | 0

Answered
Element wise multiplication .* rounding problem
Nope. It does not. Welcome to the wild, whacky wonderful world of floating point numbers and arithmetic. A place where computati...

8 years ago | 2

| accepted

Answered
3D point cloud
You need to learn to use the debugger. Or you need to learn to provide sufficient information, with the complete error message t...

8 years ago | 1

| accepted

Answered
modifying vectors help.
When all else fails, throw it at polyfit. (Well, actually, I know polyfit will work here, so it really is not a code of last res...

8 years ago | 0

Answered
Solve for symbol not finding explicit solution
And you "know" a solution exists? What is it? Not all problems have an analytical solution. How is it that you assert a solution...

8 years ago | 0

Answered
issorted alternative for optimization toolbox
Apparently not. However, you don't need it either. What stops you from just using a cumulative sum? Then constrain all elements ...

8 years ago | 0

Answered
i need a rough k means code anyone help me plzz ...the following code has some errors.
Easy, peasy. It is right here: https://www.mathworks.com/products/statistics.html Writing your own code to do what others have...

8 years ago | 0

Answered
picking those matrices whose determinant is greater than 0
WTP? if b > 0 disp(a) end

8 years ago | 0

| accepted

Answered
How to add custom equation for fitting
You are over thinking things, thinking you need to use sum, etc. What is a polynomial model? What do you have? What are the unk...

8 years ago | 0

Answered
use more digits in computing in matlab
Sorry. Unfortunately, you cannot simply request more precision in your computations in MATLAB. The trick is to learn to do your...

8 years ago | 2

Answered
I have a large vector, I would like to find a set of data which is a subset of the large vector.
ismember is exactly the tool to solve your problem. A = [1 3 5 7 9 8 6 4 2]; B = [5 6]; [LIA,LOCB] = ismember(A,B) LIA = ...

8 years ago | 1

Answered
Switch to write programs
You could write a switch statement for this. The problem is, since each case does a different thing, you effectively need 100 di...

8 years ago | 1

Answered
Double vs Single Precision, Matlab in 2019
This topic is worth discussing. X = zeros(10,10, 'single'); The construction: X = single(zeros(10,10)); is four times slower!!...

8 years ago | 2

| accepted

Answered
how to decrease precision
You cannot tell MATLAB to use an arbitrary lower or higher precision. At most, you can work in single precision instead of doubl...

8 years ago | 0

| accepted

Answered
pick numbers from matrix with probability
This is one of those question that are almost impossible to answer, because your goal is so fuzzy, too unclear to write code to ...

8 years ago | 0

| accepted

Answered
How do i plot 3 langrange polinomials in one figure?
Do you know how to plot ONE such polynomial? I hope so. If you do, then you need to use the hold command. That is, after you plo...

8 years ago | 0

Answered
Create binary vectors with specific hamming distance
Why does this seem pretty easy, if you just think about what Hamming distance means? https://en.wikipedia.org/wiki/Hamming_dist...

8 years ago | 2

| accepted

Answered
How to Show 1/4 in 1/2^2?
Do you mean this? format rat 1./(1:10).^2 ans = 1 1/4 1/9 1/16 1/25 ...

8 years ago | 2

Answered
It shows: Undefined function 'vpasolve' for input arguments of type 'double' when I run it. Can I know how to solve this?
Is f a symbolic variable? (No.) We see this: syms f f=zeros(rr); fn=1+2.*sqrt(f).*log(((rr)./3.7)+(2.51./(Re.*sqrt(f)))); f...

8 years ago | 1

| accepted

Load more