답변 있음
How to access struct member via a string
Here is something simiilar: airplane.cockpit.controls.throttle = 'forward'; s={'cockpit','controls'}; getfield(airplane,s...

2년 초과 전 | 0

| 수락됨

답변 있음
"TiledChartLayout cannot be a parent." error message using pdeplot with tiledlayout
You can control the compactness of subplots using this, https://www.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subpl...

2년 초과 전 | 0

답변 있음
histogram for each column of 3d matrix
Something like this, perhaps: A=rand(8,8,1000); binwidth=0.1; %Fake input data edges=0:binwidth:1; Hist=num2cell(resha...

2년 초과 전 | 0

| 수락됨

답변 있음
Linear Interpolation code without using interp1
function ynew = interpolate(n,x,n2) %Doesn't use interp1 F=griddedInterpolant(n,x); ynew=F(n2); end

2년 초과 전 | 0

답변 있음
Linear Interpolation code without using interp1
n=1:8; x=rand(size(n)); n2=[1.8, 3.2, 6.7]; interp1(n,x,n2) interpolate(n,x,n2) function ynew = interpolate(n,x,n2) ...

2년 초과 전 | 1

답변 있음
Plot a struct field that is an array of doubles
plot([data.BO], vertcat(data.tota),'o')

2년 초과 전 | 0

| 수락됨

답변 있음
Nesting of tiledlayout objects not possible in R2019b?
I also looked into the documentation and found nothing about changes regarding Children and Parents since introduction in R2019b...

2년 초과 전 | 2

답변 있음
Optimization in a for loop
Perhaps this is what you wanted. If so, it is a rather ill-posed problem, because your C matrix is only rank 1. %Input data (ou...

2년 초과 전 | 0

| 수락됨

답변 있음
Values on plot do not match manually inputted values for an anonymous function.
Your defintiion of t is not using element-wise ./ and .* operators.

2년 초과 전 | 0

| 수락됨

답변 있음
Moving sum with variable window
x = 1:20; y = [1 2 3 4 2 5 3 7 2 4 5 4 7 6 3 9 5 5 3 6]; n=numel(x); c=[0,cumsum(x)]; s=c(2:end)-c((2:n+1)-y)

2년 초과 전 | 3

| 수락됨

답변 있음
How can I make a plate rotates around the central axis.
This should be helpful: https://www.mathworks.com/matlabcentral/fileexchange/30864-3d-rotation-about-shifted-axis

2년 초과 전 | 0

| 수락됨

답변 있음
lsqnonlin (interior-point) vs fmincon (interior-point): different converged solutions
It's a non-convex problem, so it can have multiple solutions, some possibly local/sub-optimal. There is no guaranteeing that dif...

2년 초과 전 | 0

답변 있음
For-loop finding the difference between 7 different arrays
T=cat(3, t1,t2,t3,t4,t5,t6,t7); A = T-tref;

2년 초과 전 | 0

답변 있음
Calculating the differences of elements in an array
tsorted = sort(t-t(1))

2년 초과 전 | 0

| 수락됨

답변 있음
Why is assignment with RedefinesParen so slow
Here is the proper way to time the operations. The difference isn't that big. x = TestCustomParen; x.X=rand(500); y=x.X; a...

2년 초과 전 | 1

| 수락됨

답변 있음
No of cores selection
And I use MATLAB 2022b. I want my MATLAB to use all the cores avaialable. That should happen automatically. And I want to us...

2년 초과 전 | 1

답변 있음
Summing a 30x30x30 matrix.
Download sepblockfun from, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-operations A = ones...

2년 초과 전 | 0

답변 있음
Advice constructing large sparse Jacobian arrays
I am undertaking non-linear optimization of tensor b spline coefficients used to describe thermodynamic surfaces. I suggest loo...

2년 초과 전 | 0

답변 있음
calculate the normal for a plane passing through more than three points
Use planarFit() from this FEX package, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fit...

2년 초과 전 | 0

답변 있음
Why is fminimax not accepting sparse constraint matrix data?
Tech Support says it's a documentation bug. fminimax doesn't do sparse.

2년 초과 전 | 0

| 수락됨

답변 있음
Set constraint for plot with two points that force him to go through a circle
% I have the following input data that is fixed: % 4 Points P{1}= [-18.595112081112493,1.050302529300339e+02,-72.160383747947...

2년 초과 전 | 0

| 수락됨

답변 있음
Cone fitting in Matlab
Consider using rightcircularconeFit(), which is non-iterative, from this FEX download, https://www.mathworks.com/matlabcentral/...

2년 초과 전 | 0

| 수락됨

답변 있음
how do I fill between 3 lines?
One way: b = 48; time = 0:1:40000; mFast = 6/30 ; mSlow = 4.3/30; yFast = (mFast*time)+b; ySlow = (mSlow*time)+b; plot(...

2년 초과 전 | 0

| 수락됨

질문


Why is fminimax not accepting sparse constraint matrix data?
From the documentation for fminimax, it appears that fminimax is supposed to accept constraint matrices in sparse form, e.g., ...

2년 초과 전 | 답변 수: 1 | 2

1

답변

답변 있음
What will be a suitable option to circumvent a non-invertible matrix?
The approach is valid if A is symmetric, positive definite, but 1e-10 may not be large enough to add substantial conditioning.

2년 초과 전 | 0

답변 있음
Curve fitting for 4 independent variables
If you have four unknown variables, you need four lb(i). Upper bounds would also help. Also, you should address the fact that y...

2년 초과 전 | 0

답변 있음
The simplify function is not completely simplifying my polynomials.
syms x prob2 = ((3*x-4)*(x^2-2*x+4)); problem2 = expand(prob2)

2년 초과 전 | 0

답변 있음
Why does the "fsolve" function in Optimization Toolbox not converge when using a quadratic cost function?
Very often, quadratic functions have no roots to find, e.g., fsolve(@(x) abs(x).^2+1, [1+1i;0+3i])

2년 초과 전 | 0

답변 있음
use the 'patch' function with different results (using different matrices)
If you are trying to recover the boundary from a surface triangulation, then, load trace [~,P]=freeBoundary(delaunayTriangul...

2년 초과 전 | 0

| 수락됨

답변 있음
Using an anonymous function handle as input into another function handle
It has nothing to do with nesting of hte handles. If you don't call an anonymous function with inputs, it can't return anything ...

2년 초과 전 | 0

더 보기