94,677 questions
1
vote
0
answers
112
views
High-dimensional function inputs in MATLAB Experiment Manager
The specific Experiment Manager of interest is here https://www.mathworks.com/help/matlab/ref/experimentmanager-app.html. Other related documentation is specifically for AI, but I am interested in ...
0
votes
0
answers
70
views
Need help narrowing down range of interest to the tangent between an arc and rectangular block [closed]
Current Crack Detection
Hello, I need help narrowing down the range of interest to the tangent between the arc and rectangular block. It's able to highlight a small portion of the crack I want it to. ...
4
votes
1
answer
229
views
The same code runs on MATLAB but in R it is unstable
I am using spectral method to solve an ordinary differential equation.
The following R code and the MATLAB code are completely the same.
But the R code gets explode (the u value it solved would become ...
1
vote
0
answers
48
views
MATLAB Documentation for SPM1d
I am trying to use the two-sample ttest in the spm1d MATLAB package. I have watched the tutorial videos on Youtube and know how to run tests similar to what's shown in those videos. I am wondering if ...
Advice
1
vote
3
replies
72
views
Why the statement '[a] = size(x)' does not assign the product of dimensions of 'x'?
The command help size shows that:
[M1,M2,M3,...,MN] = size(X) for N>1 returns the sizes of the first N
dimensions of the array X. If the number of output arguments N does
not equal NDIMS(...
1
vote
1
answer
73
views
Simulink 2023b PV Model Outputs NaN Even With Constant Inputs — What Am I Missing?
I'm using MATLAB/Simulink 2023b and built a very simple PV model: constant irradiance (1000), a PV array block, and measurement blocks. But when I run the simulation, all outputs show NaN, even though ...
4
votes
1
answer
75
views
Display order for overlayed datasets in histogram
Let's say we have 3 datasets of the same size, that we want to plot on the same histogram:
Dataset_1 = [1 1 1 1 1 1 2 2 2 2 3 3];
Dataset_2 = [1 1 1 2 2 2 2 2 2 3 3 3];
Dataset_3 = [1 1 2 2 2 2 3 3 3 ...
Advice
1
vote
5
replies
99
views
How to show values from one matrix while coloring using another matrix with MATLAB heatmap?
This is the code from my current heatmap:
N = 36;
Lat_extended = [Latency; zeros(N*N - length(Latency), 1)];
Lat_matrix = reshape(Lat_extended, N, N);
figure;
heatmap(Lat_matrix)
And the figure,
The ...
1
vote
0
answers
56
views
Bad colormap interpolation when not using the default colormap
My code doesn't work well when I apply a custom colormap. It does well with the default colormaps; however, when I specify my own it doesn't work.
My current code is this:
mymap = [
0.769, 0.992, 1....
1
vote
0
answers
53
views
Extracting free spaces from a occupancy grid map in the MATLAB
How can I extract free spaces from a occupancy grid map in the MATLAB. I have the following code which gave the output that there is no free cell on the occupancy grid map.
clc;
clear;
close all;
rng(...
1
vote
0
answers
33
views
Configuration structure error with Fieldtrip in Matlab
I'm running into an error while attempting to setup a configuration structure for a single subjects EEG data using Fieldtrip. While I think the answer is plain, I am unable to figure out for the life ...
1
vote
0
answers
42
views
Want to get rid of "jagged teeth" from DTS simulator made in matlab
So I made a program in matlab that numerically simulates a DTS system and its almost right but there's one detail that there's "jagged teeth" in the graphic diagram ( circled in blue ) ...
-2
votes
0
answers
34
views
How to change size of marker in rltool matlab
I want to make my poles and zeros markers bigger. In PLOT I had this option in properties, but in rltool I don't have the same option. I've tried to use set(0, 'DefaultLineMarkerSize', 8); but this is ...
1
vote
0
answers
61
views
Reassigning a Matlab pointer in a loop without a memory leak
We are using Matlab to communicate with a C++ library, and are struggling with memory management.
We create a libpointer pointing to an array, and then try to update its value in a loop. I don't think ...
1
vote
0
answers
21
views
Grey Wolf Optimizer (GWO) MPPT in MATLAB/Simulink returns only lower bound value as reference speed
I am implementing a Grey Wolf Optimizer (GWO) for Maximum Power Point Tracking (MPPT) to generate the reference speed in a wind energy conversion system using Simulink.
However, when I run the ...