Answered
How can I extract two matrices 6x6(unknown) and 6x1(known) multiplied together to form 6x1(known) matrix. As it isn't a square matrix I cannot perform inverse. Kindly suggest what can be done
I am way too late for a useful answer. As has been said, the solution is not unique. (You do not need to use fsolve.) I'll assu...

5 years ago | 0

Answered
How to Derivative with bigger jumps than 1
I once wrote a tool that would take a vector, and find the smoothest vector consistent with the original vector, that was consis...

5 years ago | 0

| accepted

Answered
Calculating a function variable for a specific output
You will need a guess for z. I'll call it z0. zsolve = fzero(@(z) T(x,y,z) - Tend,z0);

5 years ago | 1

Answered
How to fit an exponential curve with known error bars
Some thoughts ... Here is your data: X=[-504,-494,-490,-484,-478,-456,-436,-402,-364,-322]*10^-6; Y=[4.85,4.37,4.07,3.65,3.24...

5 years ago | 0

| accepted

Answered
Why doesn't [] ~=1 yield logical one?
This has always been true as I recall, probably so since the mid-1980's, when I learned MATLAB. Note that the result is an EMPT...

5 years ago | 2

| accepted

Answered
solve the question ( fsolve , vpasolve)
I think you do not understand optimization. When you change the initial value, it is EXPECTED that the solver MAY converge to a ...

5 years ago | 0

Answered
Problem 45396. Design a tubesheet for shell-and-tube heat exchangers
I won't do your homework for you, and you clearly have been asked to think about this, not to ask someone else to think about it...

5 years ago | 1

Answered
why expm dose not show parameters?
A is a classic example of a defective matrix. https://en.wikipedia.org/wiki/Defective_matrix As such, it cannot be diagonalize...

5 years ago | 1

| accepted

Answered
How to expand the solve answer?
You want to convert them to floating point numbers. syms x y = 3*x.^2 - 10*x + 1.01; xsol = solve(y == 1, x); vpa(xsol) %...

5 years ago | 1

Answered
How to calculate between the elements in an array for consecutive indexes.
idx_1 = [32,33,34,35,36,37,38,39,40]; % 1 set of consecutive numbers idx_2 = [32,33,35,36,37,38,40,41,42]; % 3 sets of consec...

5 years ago | 1

| accepted

Answered
Can Ridge Regression solve my problem?
Don't buy a toolbox, if your only reason is to hope to use it to solve a problem where you don't fully understand how or why you...

5 years ago | 0

| accepted

Answered
How do I declare a for loop with a given number of elements?
I'll only have a loop 5 elements long, as I'm feeling tired right now. :) jvals = linspace(0,0.03,5); for j = jvals disp(j)...

5 years ago | 1

| accepted

Answered
How to make a function that calculates many coefficients (>100) and reclaim them on many functions without having to return all these values?
Return a single struct that contains all of these variables as fields.

5 years ago | 1

Answered
How to fit data to the partial differential equation for 1-D diffusion?
Ok. I had some time to look at your surface more closely, It does not fit that PDE. It cannot do so. Now that I have your data.....

5 years ago | 0

Answered
How can I introduce constraints to the nature of solutions provided by a boundary value problem solver such as bvp4c or bvp5c?
The simple fix that treats the problem in a way that is arguably correct, is to NOT work directly in terms of concentration! Tha...

5 years ago | 1

Answered
Find the max of a vector recursive
This is a godawful problem to solve using recursive coding. Why? Suppose your vector has a million elements in it. Then this cod...

5 years ago | 0

| accepted

Answered
How to fix this error “Index exceeds the number of array elements (57)” while using minboundquad function
That code was written so long ago, I forgot I ever wrote it. But also, it was written in the days when the convex hull and trian...

5 years ago | 0

Answered
matrix calculation for matrix
Simple. One line. No for loop. Nothing hard. B = A(10:10:end,:);

5 years ago | 1

Answered
Why this function infinity loop
Because if your powers grow larger than 2^53-1 (i.e., flintmax), the number is no longer expressable exactly as an integer. All ...

5 years ago | 0

Answered
why ga does not respect upper bounds ?
Um, ub = [40 1e6 1e6 1e6 1e4 1e4 9000]; numel(ub) I can count, but I let MATLAB do it for me. As you should see, you posed o...

5 years ago | 1

| accepted

Answered
i which library can i find those two functions (h-plane and e-plane) ?
There is NO such library, because those are not legal function names in MATLAB. A dash is not legal in a name, in a function OR ...

5 years ago | 0

Answered
How to neatly or properly display the answers for simultaneous equations?
You may want to learn how to use the symbolic toolbox, which can display answers in a form you may want. A = [2 3 5; 3 4 7; 1 1...

5 years ago | 0

| accepted

Solved


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

5 years ago

Answered
First order derivative using Curve Fitter (smoothing spline fit)
For example, we might try using the same fit, on some data where I know the answer. x = rand(100,1)*2*pi; y = sin(x) + randn(s...

5 years ago | 0

Answered
csv to .mat file
help csvread help save Perhaps you need to do the Onramp MATLAB tutorial?

5 years ago | 1

Answered
Optimize function wich only admits scalar input
FIRST, NEVER return a variable that has the same name as your function. That is a dangerously, recursively incestuous operation ...

5 years ago | 0

Answered
How to tell solver that symbols are matrices
A = sym('a',[2,2]) As you can see, A is a 2x2 matrix. B = rand(2,2); X = rand(2,2); Asol = solve(A*X == B,A) So now, for ...

5 years ago | 0

Answered
How to simplify this symbolic equation - nominator and denominator manipulation
I never did understand why people worry about making a symbolic tool give a result in a mathematically identical form, that happ...

5 years ago | 0

| accepted

Answered
Estimate area inside point cloud
As long as the curve is a sequence of points defining the perimeter and they are distinct, you can just compute the area using a...

5 years ago | 1

Answered
Graphing a polyfit function
DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! Do I need to say it ...

5 years ago | 0

Load more