Réponse apportée
How to write the results of createFit to a csv or txt file
Replace this: X = [xData(:), yData(:), zData(:)]; [~,F,~] = fileparts(X); with this: X = [xData(:), yData(:), fitresult(xDat...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to get heat maps (color the surface) in Matlab?
T = readtable('heat_map.xlsx','VariableNamingRule','preserve') nX = numel(unique(T.(1))); nY = numel(unique(T.(2))); X = resh...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Why is my errorbar legend not showing the proper colors?
errorbar(x,y,err), with vector x and y and scalar err, produces as many errorbar objects as there are elements in x (or y). In ...

environ 2 ans il y a | 0

Réponse apportée
PolarPlot Axes Shape Change
% data: th = deg2rad(50:10:140); r1 = 70+20*rand(size(th)); r2 = 50+20*rand(size(th)); % polaraxes setup: f = figure('Col...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How do I get rid of grid lines on a surface plot?
Use 'EdgeColor','none' or 'LineStyle','none' z = peaks(100); figure surface(z) % with grids figure surface(z,'EdgeColor','n...

environ 2 ans il y a | 0

Réponse apportée
Unit vector from the vector
Put the components in a vector: mean_U0_vector = [mean_speed_R, mean_speed_T, mean_speed_N]; % u_0 vector Then the unit vector...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How can I get the quiver arrows to 'line up'?
For the first question: Part of the reason for the quiver arrows being scattered is that the U and V calculation is incorrect. ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Are the rules for element by element matrix operation changed?
Yes, this behavior changed in R2016b. See: https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Problems overlaying contour on image in uifigure
Use hold(a2,'all') That is, you need to specify the axes you want to hold.

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Applying time axis limits to plots in UTC time
Here's an example of setting the axes x-limits using duration values: x = duration(1,1:30,0) % duration x y = rand(size(x)); %...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Deleting certain rows with partially duplicate values
I'll assume that's a table and the text entries are strings. T = table( ... [1;1;3;6;2;2], ... ["March-1st";"March-1s...

environ 2 ans il y a | 0

Réponse apportée
How can I put a number that changes according to how many times the question has been asked in a menu?
X = zeros(1,7); for i=1:7 X(i)=menu(sprintf("Did you feel good on day %d?",i),"Yes","No"); if X(i)==2 X(i)=0...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
I wanted to combine 100 csv files for plotting in Matlab. All the files have same number of columns and rows. Can anyone help?
your_folder = 'folder where the csv files are'; % absolute or relative path csvFiles = dir(fullfile(your_folder,'*.csv')) ; na...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
hi , i want to build a system that can calcuate the arc length where user can insert the equation, limit a and b . But i got an error, i dont know how to solve the error.
Use str2sym, like the error message says. The expression entered has to be valid MATLAB syntax or it's not going to work (e.g.,...

environ 2 ans il y a | 1

Réponse apportée
Creating an inset figure from an other fig file
% open the first figure fig1 = openfig('figure1.fig','visible'); % create the new axes ax2 = axes(fig1,'Units','normalized'...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Start date and end date uipicker = Having issue to plot it on UI Axes using excel data of particular selected start and end date
Please see the modified app attached. In keeping with the existing design where the plot is updated when the Generate Plot butt...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
conversion depth to time
velocities_data has only one row, so don't index velocities_m_per_s with i in the inner loop: %================================...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How can i restrict the cross cursor in ginput function into a specific UIAxes instead of it showing in the whole appdesigner figure?
You can modify ginput to do that. First make a copy of ginput.m, put it in your current folder and rename it to something like ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How can I decrease the runtime for a function (using cellfun or parfor)?
Before worrying about cellfun vs parfor to call the function, try to make the function itself more efficient. Compare the funct...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Plot with shaded standard deviation
It looks like your y_values_upper and y_values_lower are column vectors, so be sure to take that into account when creating the ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
Line Width and Style Will Not Change
Set the line width and style in the plot call, not the title call. t = 1:10; p = 2:11; plot(t,p,'LineWidth',5,'LineStyle','...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to plot this colormap correctly?
The difference between adjacent elements of depths is not constant. (Same for time.) load depth load temp load time % diff...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to revolve a polar contour plot of scalar to obtain sphere contours?
Extending your idea a little bit by specifying the FaceColor of each surface: r = 0.1:0.1:1; Nr = numel(r); cmap = flipud(par...

environ 2 ans il y a | 0

Réponse apportée
How to get larger font size for inputdlg, MATLAB ver 2019a
The Accepted Answer in the thread you linked to actually contains all the information you need. The only thing I would clarify ...

environ 2 ans il y a | 0

Réponse apportée
Error of Ploting the contour that satisfies a condition
Does using NaN instead of 0 give the desired result? See below. clear all close all clc Vo_max = 400; Pout = 1000; fs ...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Filtering data from interpolated points on patch
xy = [1 3.1 2.6 2.8 1.3 1.9 2.8 1.5 3.7 2.1 2 0.9]; Connectivity_matrix = [3 2 1 ...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
How to create a better 3D Discrete Plot?
Maybe a surface? Something like this: % Parameters numBases = 100; % Number of base pairs kappa = 0.1; % Elasticity constant ...

environ 2 ans il y a | 1

| A accepté

Réponse apportée
Trying to extract rows of a matrix where a given column equals a range of values
X = load('enlistcell_new_YFP_WithmCherry.mat').enlistcell_new_YFP_WithmCherry "2nd column ... equals a range of values (i.e., 3...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
multiple actions following @(src,event) in uicontrol
Define a function that has whatever code in it you want. Then make that function the button's callback: Button=uicontrol...

environ 2 ans il y a | 0

| A accepté

Réponse apportée
bar graph color and error
x = [1,2,3,4,5]; y = [5.03E-11 5.35E-11 4.55E-11 8.85E-11 6.26E-11; 5.03E-11 5.35E-11 4.58E-11 8.95E-11 6.26E-11; 3.7...

environ 2 ans il y a | 1

| A accepté

Charger plus