Answered

Trouble using pchip to interpolate

This is a common problem in interpolation using splines. So long ago, I wrote a utility to solve it for you. It has been on the ...

Trouble using pchip to interpolate

This is a common problem in interpolation using splines. So long ago, I wrote a utility to solve it for you. It has been on the ...

17 days ago | 0

Answered

Problem of Nonlinear Regression

I'm not terribly sure why you want to fit that choice of model, especilly if it does not fit. First, with t as time, and T as t...

Problem of Nonlinear Regression

I'm not terribly sure why you want to fit that choice of model, especilly if it does not fit. First, with t as time, and T as t...

18 days ago | 0

Answered

is there a built in function to find inflection points of an array of data?

No. I'm not sure why there should be, as it is something that few people seem to have asked to do, and there are several ways to...

is there a built in function to find inflection points of an array of data?

No. I'm not sure why there should be, as it is something that few people seem to have asked to do, and there are several ways to...

20 days ago | 0

| accepted

Answered

Faster numerical integration for vector functions

First, why does integral2 not allow arrayvalued integration? I can only conjecture, but I think this is reasonable - integral2 i...

Faster numerical integration for vector functions

First, why does integral2 not allow arrayvalued integration? I can only conjecture, but I think this is reasonable - integral2 i...

21 days ago | 0

| accepted

Answered

Finding the lowest cost for moving from right to left in a matrix

This is a fairly classic problem, posed for homework, etc. (In fact, it is the basis for at least one Project Euler problem, eas...

Finding the lowest cost for moving from right to left in a matrix

This is a fairly classic problem, posed for homework, etc. (In fact, it is the basis for at least one Project Euler problem, eas...

21 days ago | 0

Answered

How to generate a 4 D plot.

You want to plot some function of 4 variables. So essentially, you have a 5-dimensional plot you want to see. Not gonna happen. ...

How to generate a 4 D plot.

You want to plot some function of 4 variables. So essentially, you have a 5-dimensional plot you want to see. Not gonna happen. ...

22 days ago | 0

Answered

Fitting a Bimodal pore size distribution does not give the expected results, how to solve for correct solution?

Almost always, when an optimization like this fails, the problem arises from one of several circumstances. Sadly, it is impossib...

Fitting a Bimodal pore size distribution does not give the expected results, how to solve for correct solution?

Almost always, when an optimization like this fails, the problem arises from one of several circumstances. Sadly, it is impossib...

23 days ago | 0

| accepted

Answered

Fixed point(equilibrium points)

Why would you use an ODE solver to determine equilibrium points for an ODE? Yes, I know it somehow seems logical. But this is no...

Fixed point(equilibrium points)

Why would you use an ODE solver to determine equilibrium points for an ODE? Yes, I know it somehow seems logical. But this is no...

23 days ago | 0

| accepted

Answered

Curve Fitting for Artificial Topography

I have no idea what you are asking for here. Note that my gridfit tool has an example where I took scattered data from a hillsid...

Curve Fitting for Artificial Topography

I have no idea what you are asking for here. Note that my gridfit tool has an example where I took scattered data from a hillsid...

24 days ago | 0

Answered

convex hull in 3D binary matrix

It is easy enough to do, although I will suggest that a convex hull is often a bad idea when applied to color data. AN alpha sha...

convex hull in 3D binary matrix

It is easy enough to do, although I will suggest that a convex hull is often a bad idea when applied to color data. AN alpha sha...

24 days ago | 0

| accepted

Answered

Why does r have these many number of exact elements?

Here is your code. r = []; a = 0; n = 3; while a<15 a = rank(magic(n)); r(n) = a; n=n+1; end I initialized a as 0...

Why does r have these many number of exact elements?

Here is your code. r = []; a = 0; n = 3; while a<15 a = rank(magic(n)); r(n) = a; n=n+1; end I initialized a as 0...

25 days ago | 3

| accepted

Answered

Binary matrix that contains specific number of zeros in each row

At most 2 zeros out of 4 is easy. nchoosek(4,0) + nchoosek(4,1) + nchoosek(4,2) ans = 11 So 11 possibilities. If the nu...

Binary matrix that contains specific number of zeros in each row

At most 2 zeros out of 4 is easy. nchoosek(4,0) + nchoosek(4,1) + nchoosek(4,2) ans = 11 So 11 possibilities. If the nu...

25 days ago | 0

| accepted

Answered

Reshape: Math lesson help

Your matrix is 5x50. You need to understand how the elements lie in sequence in memory. MATLAB stores each column in sequence. ...

Reshape: Math lesson help

Your matrix is 5x50. You need to understand how the elements lie in sequence in memory. MATLAB stores each column in sequence. ...

27 days ago | 2

| accepted

Answered

spline interpolation image way to connect ?

Your problem is you have a vague idea of what you wanted to do. But you got it completely wrong. Absolutely, completely, so. Yo...

spline interpolation image way to connect ?

Your problem is you have a vague idea of what you wanted to do. But you got it completely wrong. Absolutely, completely, so. Yo...

27 days ago | 2

| accepted

Answered

what is the best method to fit a curve to strain-stress data?

NO polynomial will ever fit that curve (at least, not fit it well.) NONE. PERIOD. x = data_mathwork(:,1); >> y = data_mathwor...

what is the best method to fit a curve to strain-stress data?

NO polynomial will ever fit that curve (at least, not fit it well.) NONE. PERIOD. x = data_mathwork(:,1); >> y = data_mathwor...

28 days ago | 1

| accepted

Answered

Solving for 4 unknowns

Why do these not look like actual solutions to the equation system? subs(eq1,{L,V,x1,y1},[1.86, 0.29, 0.537, 0.258]) ans = 0 ...

Solving for 4 unknowns

Why do these not look like actual solutions to the equation system? subs(eq1,{L,V,x1,y1},[1.86, 0.29, 0.537, 0.258]) ans = 0 ...

28 days ago | 0

| accepted

Answered

Write a function to show a square “random” image. The function will take in “at least” one input argument which is the size of the image in pixels. As a default, the image will be shown in black-white. If a second input argument is provided, it will

Your problem is that you misunderstand nargin. By way of example, I wrote this very simple function. function week7hw1(pixels,...

Write a function to show a square “random” image. The function will take in “at least” one input argument which is the size of the image in pixels. As a default, the image will be shown in black-white. If a second input argument is provided, it will

Your problem is that you misunderstand nargin. By way of example, I wrote this very simple function. function week7hw1(pixels,...

28 days ago | 0

| accepted

Answered

64 bit binary number representation in matlab without rounding off

Maybe you are looking for something like this. I wrote a little utility recently that fully extracts the binary form of any nume...

64 bit binary number representation in matlab without rounding off

Maybe you are looking for something like this. I wrote a little utility recently that fully extracts the binary form of any nume...

29 days ago | 1

Answered

Why are all the examples for matlab functions hindered by useless simplistic examples that do not show how all features of the functions work? One cannot determine how to use any function of any complexity with the examples given.

As someone who has written dozens of toolboxes, with literally hundreds of functions, and someone who tends to be a manical perf...

Why are all the examples for matlab functions hindered by useless simplistic examples that do not show how all features of the functions work? One cannot determine how to use any function of any complexity with the examples given.

As someone who has written dozens of toolboxes, with literally hundreds of functions, and someone who tends to be a manical perf...

29 days ago | 3

| accepted

Answered

Fminsearchbnd vs. Pattern Search vs. Surrogate Optimzation to attempt to find the global optimal solution.

Each solver has what is called basins of attraction for each local solution. If you start the solver off in any point in one of ...

Fminsearchbnd vs. Pattern Search vs. Surrogate Optimzation to attempt to find the global optimal solution.

Each solver has what is called basins of attraction for each local solution. If you start the solver off in any point in one of ...

1 month ago | 2

| accepted

Answered

Random assignments through the use of a MatLab programmed Calender

This is not really a MATLAB question, because it is just programming, something you could do in any language at least in theory....

Random assignments through the use of a MatLab programmed Calender

This is not really a MATLAB question, because it is just programming, something you could do in any language at least in theory....

1 month ago | 0

Answered

sparse matrix operations to gain efficiency

Are those matrices mostly zero? No. It looks like they are 50% zeros. Sparse will not gain anything, because thre is also overhe...

sparse matrix operations to gain efficiency

Are those matrices mostly zero? No. It looks like they are 50% zeros. Sparse will not gain anything, because thre is also overhe...

1 month ago | 0

| accepted

Answered

How does function std process complex numbers

std uses the formula that is given by David, which is just the standard fornula, with no difference for complex inputs. But just...

How does function std process complex numbers

std uses the formula that is given by David, which is just the standard fornula, with no difference for complex inputs. But just...

1 month ago | 0

Answered

I need help in this question please?

What are you trying to do with the lines: syms B assume(B>1) Which have nothing to do with the problem? It looks like they a...

I need help in this question please?

What are you trying to do with the lines: syms B assume(B>1) Which have nothing to do with the problem? It looks like they a...

1 month ago | 2

Answered

how to apply cubic spline interpolation curve fitting

What I think you do not understand is those curves are noisy, and you do not understand splines. The curves you drew are not noi...

how to apply cubic spline interpolation curve fitting

What I think you do not understand is those curves are noisy, and you do not understand splines. The curves you drew are not noi...

1 month ago | 0

| accepted

Answered

please explain diag([rand(1,n-2) + 1, 1, 17])

When you have a problem, take it apart from the inside. What is inside-most? Was diag called with multiple inputs at all? (No.) ...

please explain diag([rand(1,n-2) + 1, 1, 17])

When you have a problem, take it apart from the inside. What is inside-most? Was diag called with multiple inputs at all? (No.) ...

1 month ago | 2

| accepted

Answered

How can I calculate the slope of third order polynomial fit

Is there a reason why you would not think to differentiate it? help polyder

How can I calculate the slope of third order polynomial fit

Is there a reason why you would not think to differentiate it? help polyder

1 month ago | 0

Answered

Symbol calculation and numerical values

You are doing things in the wrong order. k,e,m,w are not unknowns. They are knowns. So why have you set them up as symbolic? N...

Symbol calculation and numerical values

You are doing things in the wrong order. k,e,m,w are not unknowns. They are knowns. So why have you set them up as symbolic? N...

1 month ago | 0

| accepted

Answered

How to construct a weighed 2D histogram?

Just use accumarray to sum the weights in each bin.

How to construct a weighed 2D histogram?

Just use accumarray to sum the weights in each bin.

1 month ago | 0

Answered

How can I convert red curve in an image into a line ?

What does it mean to convert something into a "curve"? In fact, there is no need to do anything of the sort. You have a picture...

How can I convert red curve in an image into a line ?

What does it mean to convert something into a "curve"? In fact, there is no need to do anything of the sort. You have a picture...

1 month ago | 1

| accepted