Answered
Declaring a matrix with null dimension, or checking if a matrix exists
There is, but it is highly inadvisable to iteratively grow a matrix like you are doing. Here is one alternative: my_matrix=cel...

2 years ago | 0

| accepted

Answered
Is there any function that gives the smallest basic cycles of a Graph?
This might help, https://www.mathworks.com/matlabcentral/fileexchange/73630-spatialgraph2d?s_tid=srchtitle

2 years ago | 0

| accepted

Answered
rotate by a certain angle a plane in space around a node P
I can't tell from your illustration what defines the axes of rotation, but you can use this FEX download, https://www.mathworks...

2 years ago | 1

| accepted

Answered
Extrinsic calibration higher reprojection error compared to intrinsic calibration
Some possible causes? The estimates are based on intrinsics that already have some error in them. The error can only increase f...

2 years ago | 0

Answered
how to bin data
Or perhaps, [lat,lon,vals]=readvars('dataset.txt'); LAT=min(lat):2.5:max(lat); LON=min(lon):5:max(lon); G=findgroups(discr...

2 years ago | 0

Answered
how to bin data
[lat,lon,vals]=readvars('dataset.txt'); LAT=min(lat):2.5:max(lat); LON=min(lon):5:max(lon); VALS=griddata(lat,lon,vals, LAT...

2 years ago | 0

| accepted

Answered
How to call a function in a particular toolbox (or overload a function name and call the original)
You could save a handle to the true filtfilt function in a .mat file and then do something like this, function y = filtfilt(x)...

2 years ago | 0

| accepted

Answered
[Image Processing] Remove stripes / horizontal streaks in image
A=double(imread('pic.jpg')); Acorrected=A-medfilt2(A-medfilt2(A,[50,1]),[1,100]); immontage({A,Acorrected},'DisplayRang...

2 years ago | 1

| accepted

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

2 years ago | 0

| accepted

Answered
"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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 1

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

2 years ago | 0

| accepted

Answered
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 years ago | 2

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 3

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

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

2 years ago | 0

Answered
Calculating the differences of elements in an array
tsorted = sort(t-t(1))

2 years ago | 0

| accepted

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 1

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

2 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

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

2 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Load more