Answered
Function that makes Anonymous Functions
When I attempted this, the anonymous function contained variables instead of numerical coefficients I assume you mean that in t...

3 years ago | 0

| accepted

Answered
Why does argmin index of NaN array have a value of 1 and not NaN?
I imagine it is so that the logical test tf (below) will always return true. If the I output were NaN, an error message would r...

3 years ago | 0

| accepted

Answered
How to open neural network training screen?
I don't know what you mean by the "net.mat file" and I don't think you can reopen the screen. However, if you called trainlm wit...

3 years ago | 0

Answered
Numerical first derivative of irregularly spaced data
It seems to work: t=sort( rand(1,1000)*2*pi ); cos_t=gradient(sin(t))./gradient(t); I=1:20:1000; plot(t,cos(t),'b--' , t...

3 years ago | 0

| accepted

Answered
removeLayers function: Incorrect number or types of inputs or outputs for function removeLayers.
Your layers variable is a Layer object array, whereas removeLayer requires the input to be a LayerGraph. It is unnecessary, in a...

3 years ago | 1

| accepted

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

3 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...

3 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...

3 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...

3 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...

3 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 ...

3 years ago | 0

| accepted

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

3 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.

3 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)

3 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)); ...

3 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...

3 years ago | 0

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

3 years ago | 0

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

3 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...

3 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. ...

3 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...

3 years ago | 0

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

3 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...

3 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)...

3 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, \

3 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)

3 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) ...

3 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...

3 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; ...

3 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)));

3 years ago | 2

Load more