Answered
Generating numbers whose sum is 1 during genetic algorithms optimization
lb=zeros(12,1); ub=lb+1; Aeq=ub'; beq=1;

2 years ago | 0

Answered
How to open new command window?
You can launch a new Matlab session with its own command window, but the way you are going about saving work is very peculiar. M...

2 years ago | 0

Answered
Speeding up interpolation with scattered interpolation
Your data is gridded, so you should be using griddedInterpolant, as opposed to scatteredInterpolant. Gridded interpolation is mu...

2 years ago | 0

| accepted

Answered
Why does abs cause bad matlabfunction evaluation?
It is not the matlabFunction version that is evaluating things badly. It is the first version, with the double application of su...

2 years ago | 0

Answered
Show img in coordinate system and perform transformations
I=flipud(imread('peppers.png')); T = [1 0 2 1]; T(3,3)=1; [Iw,R]=imwarp(I, affine2d(T')); h=imshow(Iw); ax...

2 years ago | 1

| accepted

Answered
Supply partially complete Jacobian for fsolve()
and let MATLAB use its own numerical methods for the missing ones? fsolve cannot be made to do finite difference calculations ...

2 years ago | 0

| accepted

Answered
Sum of following elements in array
sum_following = cumsum([s(2:end),0],"reverse");

2 years ago | 0

| accepted

Answered
How to deal with files in which rows have different numbers of columns
I think you would probably have to read the file in as a string array using readlines, and then do your own text parsing.

2 years ago | 0

Answered
plot strain ellipse and principal stress axes using eigenvalues and eigevectors.
a=10; %long axis b=3; %short axis theta=30; %rotation angle p=rotate( scale(nsidedpoly(1000),[a,b]) ,theta); plot(p)

2 years ago | 0

Answered
Intersections between two discretised functions
f = @(x) x.^2; x = linspace(-5, 5, 100); v1 = f(x); v2 = ones(size(v1)); X0=x(diff(sign(v1-v2))~=0); X=nan(size(X0)); ...

2 years ago | 1

Answered
Im trying to implement this equation in matlab
It's normally better to use FFTs for cyclic convolution, but if you insist on doing it on the non-Fourier domain, then you can u...

2 years ago | 0

Answered
exportgraphicsunusably slow and memory overruns
Try export_fig, https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig

2 years ago | 0

Answered
Plot image in 2d plain and apply operations like translation/rotation and reflection
Use imrotate, imtranslate, and flip.

2 years ago | 0

Answered
Manually modifying title position in tiledlayout environment
I was wondering if it is possible to move the title a little closer to the upper limit of the figure environment than it current...

2 years ago | 1

| accepted

Answered
Newtons Method but error message "Singular Matrix"
Landing on a point with ill-conditioned J is a hazard of plain-vanilla Newton's method. That's why people usually don't use it. ...

2 years ago | 0

Answered
Error : Unable to use a value of type optim.problemdef.OptimizationVariable as an index.
It sounds like the better approach would be to have the 4x4 binary matrix AssignedMatrix be the fundamental unknown optimization...

2 years ago | 0

Answered
how to incorporate boundary conditions as constraints in fmincon optimization?
Use fcn2optimexpr to implement nonlinear constraints.

2 years ago | 0

Question


Programmatically determine which Deep Learning layer properties contain learnables
In the Deep Learning Toolbox, there are a variety of layer object types. The display methods of these objects indicate which obj...

2 years ago | 2 answers | 1

2

answers

Answered
Rotate 3D Shape so Specific Face is Normal to Given Vector
You can use this to compute the alpha and direction arguments needed for rotate. function [alpha,direction]=vecrot(vstart,vend)...

2 years ago | 0

| accepted

Answered
How to solve large linear complex equations
Since it is a linear and unconstrained system of equations, just use mldivide, \

2 years ago | 0

| accepted

Answered
Help with parametrizing a function and creating points
syms x y P [1,2] syms r(t) P1=[x1, y1]; P2=[x2, y2]; r(t)=P1+t*(P2-P1)

2 years ago | 0

| accepted

Answered
How can i extract data from given variables, for suppose i want to extract charge and discharge separately.
I will assume your data is in a table: type=["charge";"discharge";"discharge";"charge"]; data=(1:4)'; T=table(type,data) ...

2 years ago | 0

Answered
Wanna find specific index(raw) which meet multiple(~3) conditions
use ismembertol to allow for floating point noise, A=rand(5,3); A(4,:)=[39,13.9,17.2]+100*eps Index = find( ismembertol(A...

2 years ago | 0

Answered
Does anybody know what the exact meaning of the following command?
It defines an anonymous function of x,y. Everything after @(x,y) is the expression that will be evaluated. E.g., D=@(x,y) x+y; ...

2 years ago | 0

| accepted

Answered
How can I import this data with a for loop?
Data{i} = importdata(compose("PendulumTestData/TD%d/IK/HR_1.mot", x(i)));

2 years ago | 2

Answered
How to interpolate 2 dimensions of a 4D array ?
You can use imresizen, to be downloaded from https://www.mathworks.com/matlabcentral/fileexchange/64516-imresizen-resize-an-n-d...

2 years ago | 0

Answered
How to avoid NaN in the Mini-batch-loss from traning convolutional neural network?
I found that changing the solver (from "sgdm" to "adam") resolved the problem.

2 years ago | 1

Answered
How to represent gray scale images as affine subspaces?
So how Can I get the direction and origins so I can compute the grassman distance? Here is another variant that gives a Basis/...

2 years ago | 0

Answered
how to get reference in app designer
It is possible, and what you've shown should have worked, unless your Matlab version is really old. The Code view should show t...

2 years ago | 1

| accepted

Answered
How to convert values of 0 to NaN
NaNs will not appear bright on an image display. You would have to replace them with a large value. Image(Image==0)=brightValue...

2 years ago | 0

Load more