Risposto
Displaying the name of the moving text file in the animation
Suppose you import the conent of the .txt files by doing: filename = 'FrameXX.txt'; framData = readmatrix(filename); Then the...

oltre un anno fa | 0

Risposto
Finding self-locating loops in pi, receiving "Index exceeds the number of array elements. Index must not exceed 50."
The error comes from the fact that 50 is the maximum number of digits for pi. You can have a proof of this by doing: nDigits =...

oltre un anno fa | 0

Risposto
I want to extract the temperature from the IR image at every pixel
You might want to take a look at imread and interp1.

oltre un anno fa | 0

Risposto
convert table to image
% Define example table: tab = table(rand(100)); % Convert table to array: arr = table2array(tab); % Display array: imsh...

quasi 2 anni fa | 0

Risposto
assigning leads to empty value
The function fe containts a function called whittakerM which is not explicit and it can't be derived. The problem originates f...

quasi 2 anni fa | 0

Risposto
legend is not copied in figure editor
I suggest you to do this programmatically. You can load your two figures with: f = openfig('filepath'); and merge them with ...

quasi 2 anni fa | 0

Risposto
Suppress output for yline?
As you can see the ans does not come from the piece of code you provided but must be somewhere else. The values appear to be co...

quasi 2 anni fa | 1

| accettato

Risposto
Removing vertical lines in a piecewise function when discontinuty points are not known
EDIT: Thanks to @Torsten figure; tiledlayout(2,2); for N = 2 : 5 nexttile; f{1} = @(x)sin(2*pi*x); for i = 1...

quasi 2 anni fa | 1

Risposto
How to remove specific box lines in 3d plot?
Bit artificious but does the trick: z = 0:0.05:10*pi; x = cos(z); y = sin(z); figure; hold all; plot3(x,y,z) % Remove...

quasi 2 anni fa | 1

Risposto
Assign a value to a dictionary of dictionary
The impossibility of multiple indexing is a remarkable limitation that has also been discussed on the forum. Unfortunately, I d...

quasi 2 anni fa | 0

| accettato

Risposto
appdesigner vs matlab app
Appdesigner doesn't run applications. It is a tool to develop GUIs, and writes some of the code for you. The main difference i...

quasi 2 anni fa | 0

Risposto
3D surface plot with thickness
You can't give thickness to plotted data, but you can plot the outisde surface with isosurface. Have a look at @darova answer f...

quasi 2 anni fa | 0

Risposto
The requested array exceeds the maximum allowed variable size
A double in Matlab occupies 8 bytes of memory and you are creating 3 cubic arrays with 83014^3 doubles. This corresponds to mor...

quasi 2 anni fa | 0

Risposto
Plotting funtion scalar, or character error
figure; ylabel('$\Gamma_I, \; R_{IC}$ (MJ/m$^3$)','FontSize',32,'Interpreter','latex') Or you can also use \frac{}{}.

quasi 2 anni fa | 0

| accettato

Risposto
help with matlab code!
fs = 44100; % Sampling frequency Ts = 1/fs; % Time step t1 = 0 : 2*pi*Ts : 2*pi; x1 = square(t1); y1 = 0; for i = 1 : 8 ...

quasi 2 anni fa | 0

Risposto
Can't see quiver plot
Because there are too many arrows and they overlap, causing the automatic scaling to not display anything. Set the scale to 'of...

quasi 2 anni fa | 0

| accettato

Risposto
Why is the Matches variable too large?
Because you initialise the variable matches two times You first set it as a vector, and then for each loop iteration you set it...

quasi 2 anni fa | 0

| accettato

Risposto
A faster and more compact way to create a list of distances among all the pairs of points
N = 1e4; x = randi(10,N,1); y = randi(10,N,1); tic xIdx = repmat(1 : length(x), length(x), 1); yIdx = xIdx'; vectorIdx = (...

quasi 2 anni fa | 1

| accettato

Risposto
How do show points on plane going through 3d plot
Not sure if I understood what you need. You can have plane transparency using 'FaceAlpha'. Is this helpful? Otherwise I ask yo...

quasi 2 anni fa | 0

Risposto
A faster and more compact way to create a list of distances among all the pairs of points
You can build the indeces without for loop: N = 5e2; x = randi(10,1,N); y = randi(10,1,N); % Loop method: tic; k = 1; f...

quasi 2 anni fa | 1

Risposto
Empty plot window pop up with App Designer
Your problem is that you are apparently initialising a new empty figure for no reason. Try to remove these two lines: fig1 = f...

quasi 2 anni fa | 0

| accettato

Risposto
Why can't I use a 1x19 string to assign y-tick values on a barh plot?
You also have to setup the location of the ticks accordingly. In the following example I set the range of y axis between 0 and ...

quasi 2 anni fa | 0

| accettato

Risposto
How can I plot a truss using cartesian coordinates with lines connecting specific points
nodes = [ 0.0 , 0.0; 1.5 , 3.3; 3.0 , 2.0; 4.5 , 3.9; 6.0 , 2.0; 7.5 , 3.3; 9.0 , 0.0]; elems = [ 1.0 , 2.0; 1.0 , 3.0; 2.0 , ...

quasi 2 anni fa | 0

| accettato

Risposto
rectifyStereoImages Rotation Matrix output is coming out 3 x 4 instead of 3 x 3
It looks like you are missing two output arguments, so what you call R1 is actually camMatrix1. The default syntax of the fun...

quasi 2 anni fa | 1

| accettato

Risposto
Make changes to a text file with numbers and text
str = fileread('hector_400km.txt'); lines = regexp(str, '\r\n|\r|\n', 'split'); for line = 20 : length(lines) modifiedD...

quasi 2 anni fa | 0

Risposto
trivial matrix question: how to rearrange matrices in a given order
A = reshape(1:3^3,3^2,[]) B = permute(reshape(A',[],3,3),[2,1,3]) A = reshape(B,[],3)

quasi 2 anni fa | 1

Risposto
Non linear fit of y=f[x] where y can have multiple values for a single value of x
You can't fit this because bijective mapping is required between x and y. Maybe this can hekp with your task. x = [1,2,3,2,4,6...

quasi 2 anni fa | 0

Risposto
Switching between two integrators, spacecsaft dynamics
I highly discoruage you to switch between dynamical systems because you are making your life much harder for no reason. First, ...

quasi 2 anni fa | 0

Carica altro