Réponse apportée
How to fix the size of markers when drawing in Matlab? Make the marker larger with local magnification instead of being fixed and unchanged.
Using image objects or patch objects instead of text objects will cause the "markers" to scale appropriately when you zoom in or...

presque 2 ans il y a | 2

| A accepté

Réponse apportée
How to make a scatter plot where each point is colored according to a given ID and the xlabel ticks are determined by the associated string.
Here's one way: % random data in a table N = 1000; Value = randn(N,1); Condition = char(randi(4,N,1)+64); ID = "ID "+randi(...

presque 2 ans il y a | 0

Réponse apportée
How to rearrange String Data within table relative to one Column of Data.
"Should I match the text pattern before Concatinating them into one Table?" You can do it that way, but since I don't know much...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How can I remove inverted repeat pairs of strings from a table?
T = readtable('table.csv') Here's one way to find pairs of reversed rows: temp = string(T.(1)) == string(T.(2)).'; [r2,r1] = ...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to have different line styles and markers in one plot?
% Define alpha values alpha_values = [0, 0.25, 0.5, 0.75, 1]; % Define gamma values for each alpha gamma_values = [ 1,...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Adding Legend of Data Categories
baseline_L = 885.63; baseline = baseline_L; % random data y_values = 2000*rand(90,4); [N,M] = size(y_values); % GRAPH...

presque 2 ans il y a | 0

Réponse apportée
Erorr when replace row's value of table in-array.
Sometimes the X don't exactly match (e.g., they're different by ~1e-15), so this finds the closest. for ii = 1:numel(jointTSS1)...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Why is this While Loop not running?
It's not possible for a number to be simultaneously less than 6 and greater than 12: while margin<6 && margin>12 Did you...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to plot correctly errorbars on grouped bar plot?
I am able to reproduce the problem; it looks like a bug in MATLAB, having to do with creating an errorbar in an axes that has a ...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
3D plotting of the bounding box around few boxes
Two problems that I can see: 1. The tranpose here (actually it's a complex-conjugate tranpose): item_vertices = vertices{i}'; ...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Subplot of a matrix 2x361x10
% random 2x361x10 data: data = rand(2,361,10); data(1,:,:) = data(1,:,:)*2; figure [~,n,p] = size(data); for ii = 1:p ...

presque 2 ans il y a | 0

Réponse apportée
Finding value for each degree from matlab figure
data = readmatrix('Naca LD1408 9R.txt'); f = fit(data(:,1), data(:,2),'smoothingspline','SmoothingParam',0.3); xi = -15:1:18...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
how to solve the error comes in line 25
These lines make sigma and beta tables with one variable each sigma = data(:,5); beta = data(:,6); which produces the...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
have a static text display box to display text (GUI) app designer
The app version of a static text uicontrol is a TextArea (uitextarea function).

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to avoid patch color in legend?
In the call to legend, you can specify which lines (or whatever) you want included. Here it's legend_lines: legend_lines = gob...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Index exceeds the number of array elements. Index must not exceed 1.
%% Design Project Part 2 % 2.1 % Constants: kapp = 0.009; % m^3/mol*min L = 1; % m Vtot = 0.25; % m^3 ...

presque 2 ans il y a | 0

Réponse apportée
How to open a .bin file containing several frame images
This would read the first frame: filename = 'myfile.bin'; fid = fopen(filename,'r'); time_stamp = fread(fid,1,'double')...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
"Unrecognized method, property, or field 'value' for class 'matlab.ui.control.NumricEditField'."
Use "Value" not "value".

presque 2 ans il y a | 1

| A accepté

Réponse apportée
what does the vertical line in the editor window mean?
<https://www.mathworks.com/help/matlab/matlab_prog/edit-and-format-code.html#brqxeeu-58>

presque 2 ans il y a | 1

| A accepté

Réponse apportée
I am trying to plot a line but it is not working.
Use element-wise division ./ in the calculation of Xe.

presque 2 ans il y a | 0

Réponse apportée
MATLAB App Designer - Reading Data
It's possible I'm not fully understanding how the app is supposed to work, but there are a few potential or likely problems that...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
I am struggling trying to figure out this code I have it completed but I keep getting errors, can you help?
Well, it doesn't take a crystal ball to see that this is not going to work (multiplying a 1x15 character vector by a 1x8 charact...

presque 2 ans il y a | 0

Réponse apportée
These 3 codes when run give error
In WHO.m lines 45-48, you have for i=1:Nfoal group(i).pos=lb+rand(1,dim).*(ub-lb); group(i).cost=fobj(group(i).pos); ...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Speed Up String Conversion
Avoid using table2cell for this; instead, access the table data directly (using curly braces {}, or, even better, dot indexing) ...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
how to change width and space in barplot?
"increase the width of the axis so that it is less compressed" Well, you can resize the figure, either manually or programmatic...

presque 2 ans il y a | 0

Réponse apportée
While Loop not running
This loop will never terminate if entered while Close>L_entry_price==false; i=i+1; end because only i changes. Close and...

presque 2 ans il y a | 0

Réponse apportée
How to calculate maximum distance between two points (coordinates) on a XY (2D) plane ?
"seem to be the largest distance" Seems to be, but it's not. The x-scale and y-scale are not quite the same. Use axis equal t...

presque 2 ans il y a | 2

| A accepté

Réponse apportée
How do structures work?
To create a scalar (as opposed to a 0x0) structure array, this 'AllSampleRates', {},... needs to be 'AllSampleRates', {{}},.....

presque 2 ans il y a | 0

Réponse apportée
Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 1-by-3. Error in pso_process_svc (line 31)
Looks like the function limit_chk_process2 returns a 1x3 vector, but you are expecting it to return a 1x2 vector.

presque 2 ans il y a | 0

| A accepté

Réponse apportée
plotting a 3d graph for a 3d table
M = readmatrix('file.xlsx') x = M(2:end,2); y = M(1,3:end); z = M(2:end,3:end); figure surf(x,y,z.')

presque 2 ans il y a | 0

| A accepté

Charger plus