Réponse apportée
Plotting random number in a line
If you want to plot points on the x-axis, specify the y-coordinates as zero. X = rand(1,100); Y = zeros(1,100); plot(X,Y,'*')...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
slow drawing of a set of points on a plane
p = [ cos(0:.1:1.9*pi), -1:.2:1, 0*(-1:.2:1) ; sin(0:.1:1.9*pi), 0*(-1:.2:1), -1:.2:1 ] figure plot(p(1,:),p(2,:),'r.') grid ...

environ 2 ans il y a | 0

Réponse apportée
Issues with looping in structure: variable in the name
I guess this is something like your flight_data variable: flight_data = struct('fl',{permute(num2cell(rand(10,9,11),[1 2]),[3 1...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
too many open files even after adding fclose within my for loop
It may be that too many files are still open, coming from previous runs of the code where you did not have the fclose commands y...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
JOIN CVS FILES AND PLOT
fileDir = pwd; % current directory (or specify which one is the working directory) S = dir(fullfile(fileDir,'*.csv')); % get li...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to plot Mach Number Contours
Adding the line contourf(x,y,M) to the end of your code produces the following result: %% Initialize datapoint matrices clea...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Don't understand the reason this code is giving me errors.
You have an extra ")" here: [t,q] = ode45(@(t,r) (G5*p*r-G6*p*p-G6*r*r)+m/Jy), [0 10],0); % ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
how to change the direction of this code from right falling into left to left falling into right
figure x = 1:10; y = 10:-1:1; for ii = 1:numel(x) plot(x(ii),y(ii),'r.','markersize',40) axis([-1,11,-1,11]) p...

environ 2 ans il y a | 0

Réponse apportée
MEAN OF A VARIABLE WITH RESPECT TO OTHER VARIABLES
https://www.mathworks.com/help/matlab/ref/double.groupsummary.html

environ 2 ans il y a | 2

Réponse apportée
read part of a .txt file
filename = 'file.txt'; str = readlines(filename); C = arrayfun(@(s)sscanf(s,'%f %f %f %f %f %d:%d:%d %f'),str,'UniformOutput...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
read part of a .txt file
filename = 'file.txt'; T = readtable(filename,'CommentStyle','R','NumHeaderLines',0,'VariableNamingRule','preserve'); T(all(...

environ 2 ans il y a | 1

Réponse apportée
How does indexing work when sorting a matrix?
For matrix R, sort(R) sorts each column and indsort are row indices. To reproduce the sorted matrix, you can convert those row ...

environ 2 ans il y a | 1

Réponse apportée
Better way to keep dimensions using reshape from extracted struct array?
load('data.mat') bb = vertcat(myData.data.b)

environ 2 ans il y a | 2

| A accepté

Réponse apportée
Interpolating between columns for an index
lookup = [ ... 550 750 950; ... 1 2 8; ... ]; data = [ ... 550 22; ... 580 21; ... 650 20; ... ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
setting range on colorbar in appliction designer
Replace c.clim ([minval maxval]);% <- causes error with app.UIAxes.CLim = [minval maxval];

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Hi coders! i'm facing a error. Error using contourf Z must be at least a 2x2 matrix.
d and g are both scalars d = 10; % ... g = 0.085 ; so su is a scalar su = round(4*d/g)+1 ; so r and p are both column ve...

environ 2 ans il y a | 0

Réponse apportée
Find strings within other strings then pull data from that point
filename = 'P0300.txt'; to_find = '01 3E'; str = fileread(filename); pat = strjoin(repmat({'[\dA-F]{2}'},1,3),' '); C = ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Help to create a continuous surface heatmap
I'm not sure what a 1D surface looks like. If Temperature is in the Y-direction, what variable should be used for the color of ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
how to plot contour of 3D variable
Example data: Salinity = rand(744,24,25); [Lat,Lon] = ndgrid(1:24,1:25); whos Lat Lon Salinity If you want a sequence of fil...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Transforming long panel data
Here's one way, where the form of resulting table Tnew closely matches the form of the table in the "after" image: T = readtabl...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Finding the closest coordinate from a surface plot based on a X, Y location
load slab_strike is_ok = ~isnan(z); [X,Y] = meshgrid(x,y); X = X(is_ok); Y = Y(is_ok); Z = z(is_ok); lon_GMM = -73.529...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
max value inside a circular region in grided data
% assuming sample data lat = -60:0; lon = 90:160; wind = randi(10, numel(lat), numel(lon)); % forcing max wind of 100m/s a...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How can I increase the number of decimal places displayed on app designer UITable?
Maybe some code is modifying the uitable after the startupFcn executes, because the code you've shown should work. Here it is w...

environ 2 ans il y a | 2

| A accepté

Réponse apportée
Finding NaN and Missing values from a mat cell matrix
load('example_global.mat') C = example_global As you said, the cell array in the attached mat file doesn't have any NaNs, so I...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
after input values and push preview doesn't display in UIAxes
Looks like you've got an extra PreviewButtonPushed function declaration: % Button pushed function: PreviewButton ...

environ 2 ans il y a | 0

Réponse apportée
Why i am getting Error using Phase1/UIAxesButtonDown Too many input arguments.
Sim takes 21 input arguments, but you are passing 22. Judging by their names, T_endD is the extra one. So, if T_endD really sho...

environ 2 ans il y a | 0

Réponse apportée
How to change in marker size in the global legend?
[leg,icons] = legend({'A','B','C'}); leg.Layout.Tile = 'North'; icons1=findobj(icons,'type','patch'); set(icons1,'MarkerSize'...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Why do I get Empty Plots during Optimization?
Specifying the OutputFcn rather than the PlotFcn seems to provide something like what was intended. options = optimoptions('ga'...

environ 2 ans il y a | 2

| A accepté

Réponse apportée
Help Needed: Fixing Indexing Error in MATLAB Random Name Generator Code
I'm not sure what the error is, but you should use curly braces {} to get the contents of a cell in a cell array. function rand...

environ 2 ans il y a | 0

Réponse apportée
Finding mode of each row in an array of Strings
str = ["Apple" "Banana" "Apple"; "Cherry" "Cherry" "Apple"; "Mango" "Mango" "Mango"] N = size(str,1); modes = strings(N,1); ...

environ 2 ans il y a | 0

Charger plus