Answered
I want to solve the equation find metric
Sorry, but your question makes no sense mathematically. H is 64x199. Frf is 100x5. So H*Frf is 64x5. No problem there. Both mat...

5 years ago | 1

Answered
Why is this output nothing and what can i change to make it work
I had to laugh at your statement that there is nothing wrong with the code. That seems counter to the fact that it produces noth...

5 years ago | 0

| accepted

Answered
fminsearch curve fitting HELP!!
You use sl in places in your code, yet you never defined sl. Yes, that is a lower case L, not the number 1. My guess is you mean...

5 years ago | 0

Answered
Solving system of 8 non-linear equations
This is a nonlinear homogeneous problem, in the sense that the all zero solution "works". See that if x5==x6==0, then the logs g...

5 years ago | 0

Answered
Integrate z where z=xy
Why does this seem obvious? Yet, the result that you seem to want is incorrect. syms z x y zint = int(-2/z,z) subs(zint,z,x*...

5 years ago | 0

| accepted

Answered
Unifrnd generates a large number of uniform distributions. Is a part of it still uniform?
Short answer: Yes. Long answer: yyyyyeeeeeessssssss. Think of it like this: These numbers have the property of beeing iid. Ind...

5 years ago | 0

| accepted

Answered
Jacobi Method in calculating solution, number of iterations, and relative residue
If you think your code runs slowly, an important thing you want to do is look at the profiler tools in MATLAB. help profile Do...

5 years ago | 0

Answered
Is there a way to suppress output, given a condition, from within fprintf?
Could you do it? Well, probably. You would need to construct some pretty elaborate conditional operations inside the fprintf. ...

5 years ago | 1

Answered
My code is returning complex numbers
What value of x yields cos(x) == 2? It might be the new math, but I don't recall any common values of x, such that cos(x) is ev...

5 years ago | 0

Answered
Fzero for Colebrook Equation
What you do not understand is that function have their own workspaces. If you create thse variables outside the function, then c...

5 years ago | 0

| accepted

Answered
Is it possible to include New Algorithms In reinforcement learning toolbox
There is no question about MATLAB in this. Answers is not customer support, nor is it the place to post feature requests. And no...

5 years ago | 0

Answered
Determine polynomial coefficients so that it's roots lie on the unit circle
This seems simple enough, though the result may not seem terribly pretty. Brute force often has that result. syms a b z P = ...

5 years ago | 0

Answered
Generate an iteration to determine the characteristic polynomial of several matrices
What can you do? Learn to use MATLAB properly. Here, that means to learn to use matrices and arrays, especially cell arrays. A...

5 years ago | 0

| accepted

Answered
Numerical analysis. Can't use syms, if not the aproximation is different.
This is numerical analysis. Hey, you are supposed to know this! Well, maybe the goal of the problem is to teach you these facts....

5 years ago | 0

| accepted

Answered
Is it possible to automatically output many possibilities using a loop?
What you want to do does not seem to make a lot of sense, nor how you will get those initial factors. But I'm sure you have some...

5 years ago | 0

| accepted

Answered
find a point on a graph
You COULD approximate the curve with some function. Best to choose one that can be intelligently extrapolate. Then since you nee...

5 years ago | 0

Answered
define N as the number of eigenvectors needed to capture at least "99.9" of the variation in d
Lets see. Do you know how to compute what is the total variation? I hope so! Call it totalVar. What is 99.9% of that number? to...

5 years ago | 0

Answered
New Matlab release vs updates
Are they the same? No. You can look at the release notes to see what changes were made, and to decide if anything in there is im...

5 years ago | 0

| accepted

Answered
Cosh of a variable
You do it by writing much like what you did, but in the proper order, and using proper syntax. For example, using symbolic tools...

5 years ago | 1

| accepted

Answered
2 Variables and 2 Unknowns Returning Incorrect Results
This is a linear system of two equations in two unknowns. The solution is unique, since the sysem is full rank. If we look at yo...

5 years ago | 0

Answered
Is it possible to find a seed to generate given set of integers?
Even for short sequences, finding a seed that would recover a given sequence will potentialy be difficult and it would strongly ...

5 years ago | 0

Answered
Concept of the null operator question
MATLAB does not allow arrays with empty elements. Double precision arrays are always nice rectangular things. So, for example, t...

5 years ago | 0

| accepted

Answered
Finding the sum of the first n primes and to use a while function
You stopped your while loop the wrong way. As it is, if you allow prime_count to be less than or EQUAL to n, then it adds ONE mo...

5 years ago | 0

| accepted

Answered
use vpasolve's engine without vpasolve
You cannot access vpasolve without using vpasolve. There is no way to access the code for vpasolve. You cannot use fminsearch o...

5 years ago | 0

Answered
Generate cell of random numbers with same size arrays
Simple enough. A = rand(15,200); B = mat2cell(A,repmat(5,3,1),repmat(100,1,2)); size(B) size(B{1,1}) class(B{1,1}) So B is...

5 years ago | 1

Answered
Is it possible to create an optimizableVariable of integer type as an array with step different from 1?
Suppose X is an integer variable, that takes on only the values 1:5. But what you want are non-integer levels of some paramete...

5 years ago | 1

| accepted

Answered
Divide a number N into K numbers
The dissection of an integer into a sum of integers is called an integer partition. Assuming these are integers in the sum, the...

5 years ago | 2

| accepted

Answered
how does double integration work
x = -100: 1/10:100; f = 6*x; first_integral_plot = cumtrapz(x, f); % Integration second_integral_plot = cumtrapz(x, first_int...

5 years ago | 1

| accepted

Answered
Readability of matlab code
AVOID GLOBAL VARIABLES. They will not improve your code. Intead they will make it difficult as hell to debug your code when ther...

5 years ago | 2

Answered
I want to create normally distributed random variables, and refer to them as my independent variables
The answer is, DON'T. https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamic...

5 years ago | 0

Load more