回答済み
Is there a built-in function to concatenate arrays in the third direction?
Logically, one would just use cat. How might you have found this? READ THE HELP! That is, near the end of the help for all MATL...

2年以上 前 | 0

| 採用済み

回答済み
How to evaluate sym using certain known multiple values?
Easy peasy, though using matlabFunction here is not my recommendation. syms('x',[1,3]) So x is a vector, with elements [x1,x2,...

2年以上 前 | 2

回答済み
Trying to Solve quadratic inequalities
syms x ineq = x^2-2*x+7>12; sol = solve(ineq, x,'returnconditions',true) sol.x sol.conditions The result is two half-infini...

2年以上 前 | 1

回答済み
Compute linear interpolant in pp form and find derivative
n = 10; x_grid = linspace(-5,5,n)'; f_grid = x_grid.^2; % A simple quadratic polynomial fn = spapi(2,x_grid,f_grid) Convert ...

2年以上 前 | 0

| 採用済み

回答済み
How can I create randomly scattered points between two circles?
Let me explain it differently than the rest, with a simple, intuiitive derivation. Again, the problem is perfectly symmetric in...

2年以上 前 | 2

回答済み
Hi, everyone! I have a question about generating random meshgrid.
Any better way? Sorry, but no. You want to generate a "randomly" perturbed mesh, but one where each cell has exactly equal area?...

2年以上 前 | 0

回答済み
Determine if 3d point belongs to polyhedron
Since I'm going to show how to do it using a triangulation anyway, I might as well post it as an answer instead of a comment. x...

2年以上 前 | 1

| 採用済み

回答済み
Coefficent of determination in a nonlinear system
R^2 is not always a meaningful thing to compute for nonlinear regression models. On some problems (those with no constant coeffi...

2年以上 前 | 0

回答済み
How to find the slope of a linear area
There is NO linear region in such a curve. Only a region which is moderately close to linear. It is a CURVE. Not a straight line...

2年以上 前 | 1

回答済み
How to locate the answer in the given code?
Let me expand on what @Dyuman Joshi has said. Suppose you use any function in MATLAB. We will see what happens here, if it is us...

2年以上 前 | 2

回答済み
Record n values and once finished start replacing the oldest values with new ones
There are many ways to solve such a problem. A simple one is to just do a shift at each step, shuffling all of the elements in t...

2年以上 前 | 0

回答済み
Matlab giving incorrect matrix multiplication :/
This is a common error I see novices to programming make. They do something strange, get something stranger yet, and immediately...

2年以上 前 | 2

回答済み
Thomas algorithm tri diagonal matrix
DON'T WRITE YOUR OWN CODE FOR A PROBLEM LIKE THIS. Instead, just create the tridiagonal matrix, as a sparse matrix. Then use b...

2年以上 前 | 0

回答済み
Help with the equation
So why not try it? First, use valid variable names, not greek letters for the variables. rho = 1.025; L = 130.2608788; B = 2...

2年以上 前 | 0

| 採用済み

回答済み
Solving the arising equation with preconditioned iteration method.
I'm not sure what you are talking about. BOTH PCG and GMRES are written in MATLAB itself. So the source code is provided to you....

2年以上 前 | 0

| 採用済み

回答済み
Optimization involving complex variable.
If you just need to find a new matrx B, then there is ABSOLUTELY NO reason to use optimization techniques! A is assumed to be a...

2年以上 前 | 0

回答済み
Finding coefficients and bias term for equation y = (x-B)*A
As my comment stated, this question is impossible to answer in any meaningful way. That is, given 1x3 vectors X and Y, can you f...

2年以上 前 | 0

回答済み
how can i create a smooth curve through data points
It VERY much depends on what you define as "smooth". A smooth curve would generally not have a derivative singularity in it, yet...

2年以上 前 | 0

| 採用済み

回答済み
Is it possible to use polyfit in a way that it takes into account the errorbars?
Different people mean different things when they say error bars. But you also use the word weights, which is a bit more standard...

2年以上 前 | 1

回答済み
I am looking for advice on the best way to learn matlab. I am a second year PhD student trying to familiarize myself with problems or projects. Any advice?
There is no "best" way to learn. It surely depends on you and your own learning style. Ok, probably the best way would be to hir...

2年以上 前 | 0

回答済み
Derivative of spline with respect to y-values
Bruno is correct. Anyway, is there a good reason why he would lie? Just because something is more complicated, does not make it ...

2年以上 前 | 1

回答済み
How can obtain the probability density function for a random discreate set of data and fit a custom distribution function ??
Can you write custom code to fit a PDF to data? Yes. It is not that truly difficult, if you know what you are doing. HOWEVER, SH...

2年以上 前 | 1

回答済み
How to solve equation with several unknown variables for a specific variable?
When you pose it as you did to solve, solve assumes you are trying to solve TWO equations, one of which is the equation cos...

2年以上 前 | 1

回答済み
How can I plot the innermost contour?
As an aside, since @Cris LaPierre has already suggested the use of LevelList to do the job. And that arguably is the correct ans...

2年以上 前 | 0

| 採用済み

回答済み
why I get the error message like "Attempt to execute SCRIPT bar as a function"?
Don't use existing function names as the names of your own scripts. If you do, then eventually you will get strange errors like ...

2年以上 前 | 0

回答済み
Element wise multiplication of a 4D Matrix
A confusing question. MAYBE you are asking how to take the product of the elements along the 4th dimension? That is consistent w...

2年以上 前 | 2

回答済み
round() function does not work as expected
Sorry, but it is often the case that your vector X is not what you thought it was, or you have written a function named round. ...

2年以上 前 | 1

| 採用済み

回答済み
How can I cut four numbers after the decimal number without rounding using MATLAB ?
You want to truncate after the 4th decimal place? Easy peasy. You shift where the decimal place lies, then use floor. format l...

2年以上 前 | 2

| 採用済み

回答済み
Why isn't vectorization faster than repeating loop comparing 6 about years ago.
Things change. Vectorization OFTEN is faster. But nothing says it MUST ALWAYS be faster. Remember that vectorization often trade...

2年以上 前 | 1

回答済み
Matlab solver for unconstrained convex optimization
Everybody wants things to be incredibly fast. Large problems can take large time. Nothing stops you from writing a simple gradi...

2年以上 前 | 1

| 採用済み

さらに読み込む