Community Profile

Voss

Last seen: Today Con actividad desde 2013

All

Ver insignias

Content Feed

Ver por

Respondida
How to display specific values in xticks?
I think it's working. You want xticks at 0, 1000, 2000 and 3000 iterations, but your data has only 101 elements, so you only see...

alrededor de 7 horas hace | 0

Respondida
How do I make a column vector to add to my original matrix?
A = [1 3 5; -10 -8 -6; (sin(pi/2)) 5^3 (exp(-2))]; B_one = A(1,:) + 4; B_two = A(2,:) - 1; B_three = [(sin(pi/2)) 5^3 (exp(-2...

alrededor de 8 horas hace | 1

Respondida
Doing arithmatic to specific rows of a matrix
Here's an example that adds 6 to the second row of a matrix M: % define M M = [1 2 3; 4 5 6; 7 8 9] % add 6 to the second r...

alrededor de 11 horas hace | 1

Respondida
4D Table Interpolation
Swap your definitions of m and n (or equivalently use rand(n,m)). Like you said, alpha is 1st dimension, beta is 2nd. alpha = ...

alrededor de 21 horas hace | 0

Respondida
DIR multiple file extensions
You can put those dir() calls in cellfun: ext = {'*.txt','*.py','*.mp3','*.exe','*.jpg'}; extensions = cellfun(@(x)dir(f...

1 día hace | 0

Respondida
i don't know why the legend doesn't take the same type of line that simulated , for example if dashed line used , so the legend should be dashed also ?
This happens when you specify fewer legend entries than you have lines in your axes. For example: % plot three lines: plot(1:1...

1 día hace | 0

Respondida
I'd like to plot some points over an image in a dialog.
The reason it doesn't work when the "colormap(ax,parula)" line is commented-out: dialog() creates a figure with an empty Colorm...

1 día hace | 1

Respondida
Plot different data in one figure
Use ellipses (...) at the end of those lines where you define the long vectors, because using a line break without ellipses caus...

2 días hace | 0

Respondida
How do i connect and running different loop at the same time?
Combine the two loops into one loop, so that they actually run at the same time: t = linspace(0,10,5); y = [ 3 2 1 4 5 ]; rud...

2 días hace | 0

Respondida
How to read matrix data in a loop
You already have all the data from all the files, stored in T1. You can remove this loop: for i = 1 : 327 { T1i}...

2 días hace | 0

Respondida
how to create matrix c, where first column is vector a, and the last column is vector b without a loop
a = [1;2;3;4;5]; N = 3; c = a+(0:N)

2 días hace | 2

Respondida
I need to replace some values with NaN and some values with zeros
I've entered the values from your left-hand table into Excel and saved the attached xlsx file. Read the file into a matrix and ...

3 días hace | 0

Respondida
How do I make a randomized test on Matlab?
Use the 's' option in input to capture what the user types as a character array (as opposed to evaluating it), and use strcmp in...

3 días hace | 0

Respondida
Efficient code for multiple string replace
You can store all those variables in a structure, and use dynamic field names. sec = ["T", "N"]; co = ["H","F"]; nco...

3 días hace | 0

Respondida
Randomize vector avoiding consecutive values
Here's a method that picks values randomly, one at a time, from a set that excludes the most recently picked value leftSides = ...

3 días hace | 0

Respondida
Selecting a file to create a plot on MATLAB
uigetfile is the standard way to prompt the user to select a file. https://www.mathworks.com/help/matlab/ref/uigetfile.html

3 días hace | 1

Respondida
How to change the label properties on geoxes?
ax = geoaxes(); ax.LongitudeLabel.String = 'Lon.'; ax.LatitudeLabel.String = 'Lat.'; ax.LongitudeLabel.FontSize = 20; ax.Lat...

3 días hace | 0

Respondida
How does ismember and assert work in this code?
[ism,idx] = ismember(A,B(:,1)); returns ism, a logical array the same size as A saying whether each element of A is in B(:,1), ...

3 días hace | 0

Respondida
How to separate a column which has a comma separated values, into 2 different values?
city = ["Abilene, TX"; "Waco, TX"; "Arcata/Eureka, CA"]; t = table(city) city_state = split(t.city,", "); t.city = city_state...

4 días hace | 0

Respondida
How to round values of table with mixed types?
If those columns that contain numeric values are cell arrays, as in FW = ["EVT64"; "EVT64"; "EVT64"]; SetTemp = {[400;225]; [2...

4 días hace | 0

Respondida
global legend in subplot
That cane be done using tiledlayout instead of subplot. x = 1:10; y = 1:10; x1 = 1:10; y1 = 2:11; tiledlayout(3,7) for t...

4 días hace | 0

Respondida
Click items in the legend to show or hide the associated line in plot
freq = 1:10; eps1 = rand(10,1); eps2 = rand(10,1); eps3 = rand(10,1); figure plot(freq,eps1); hold on; plot(freq,eps2);...

5 días hace | 1

Respondida
How to replace duplicate elements with the elements of the second array?
Maybe something like this? a = [23 34 56 78 100 10 12]; b = [2 2 2 4 6 0 0 11 11 11 6];% contains repeating elements yougo...

5 días hace | 0

Respondida
How to extract specific data from a .txt file
type FILE.TXT % show the contents of FILE.TXT, for reference data = readlines('FILE.TXT'); % read the file Here's one way to g...

5 días hace | 1

Respondida
one matrix that is made from multiple vectors of different lengths that don't start at the same point
Assuming data{1,10} is a row vector (i.e., the cell data(1,10) contains a row vector), then the following would work: M(10,5570...

5 días hace | 0

Respondida
reset pareto chart on App Designer
pareto creates a new axes and returns the two axes as the second output. You can store that new axes and cla(_,'reset') it along...

5 días hace | 0

Respondida
Color in white only pixels defined by a matrix [rx2]
BW = imread('blobs.png'); imshow(BW) r1 = 163; c1 = 37; contour = bwtraceboundary(BW,[r1 c1],'W'); hold on plot(contour(:,...

5 días hace | 0

Respondida
Exponential approximation for vector input
vect = [-5.0000 -5.0000 -5.0000 1.0000 0.9000 0.8000 0.7000 -5.0000 -5.0000]; Using / (matrix right divisi...

5 días hace | 0

Respondida
I have a list of objects in matrix A and object list and their corresponding masses in matrix B.Howto generate a matrix containing masses of objects present in orderof matrxA
A = ["C"; "A"; "E"; "F"; "I"] B = ["A", 1;"B", 34;"C" 56;"D" 32;"E",11;"F",8;"G", 7;"H",9;"I" 77] [ism,idx] = ismember(A,B(:...

5 días hace | 0