Réponse apportée
Create Mex files for Matlab, from .FOR files of Fortran
Which OS? For Linux, the GNU Fortran compiler is supported, for Windows and Mac only a recent version of the Intel compiler is ...

plus de 2 ans il y a | 0

Réponse apportée
calculate sum month and annual
Read up on retime and timetable which lead into readtable and table2timetable All are "modern" MATLAB tools; the time-honored a...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
how do i add line to a pie graph
subplot(2,2,1) txt=string({['Avoids' newline 'Objects'];['Middle of' newline 'sidewalk'];['Stops' newline 'Often']}); normal_b...

plus de 2 ans il y a | 0

Réponse apportée
Help using grid in nexttile and tiledlayout
The two lines set(gca,'YTick',[]); set(gca,'XTick',[]); remove the tick marks and thereby the ticklabels. Remove those and t...

plus de 2 ans il y a | 0

Réponse apportée
Modify the color of a scatter3 plot
https://www.mathworks.com/matlabcentral/answers/233084-changing-color-of-the-points-in-scatter3?s_tid=answers_rc1-3_p3_MLT#answe...

plus de 2 ans il y a | 0

Réponse apportée
How to fit lognormal distribution to a dataset which contains some zero values?
One analysis technique for daily rainfall modeling divides the problem into two parts -- a "wet-day" model that predicts rainfal...

plus de 2 ans il y a | 0

Réponse apportée
How to match the colors in the colorbars across two plots such that the datapoints can be inferred consistently?
Be easier if you had attached the code to generate the figures so could mung on it directly, but something like % create first ...

plus de 2 ans il y a | 0

Réponse apportée
FFT of the resultant vector of an accelerometer
The x,y,z data already have a direction; it depends upon whether you want the individual components or the overall magnitude and...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Error trying to fit data to gaussian function: Inf computed by model function, fitting cannot continue
d1=readmatrix('data_working.txt'); d2=readmatrix('data_error.txt'); plot([d1 d2]), xlim([1 numel(d1)]), legend('Working','Erro...

plus de 2 ans il y a | 1

Réponse apportée
Is it possible to create a bar graph with different x-Axis scale/labeling?
Set the first/last x values to min(x)-2/max(x)+2, respectively, then set the ticklabels for those two manually. y = [2 2 3; 2 5...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How can I wide the space between curves in the figure and between the numbers on the curves?
The only thing that can separate the lines more would be to have fewer of them; the data are what they are as far as the magnitu...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Matlab argument validation either specific vector size or empty
So far, I've found the arguments block more trouble than simply handling the conditions explicitly for something relatively simp...

plus de 2 ans il y a | 0

Réponse apportée
How to plot feature importance on x-axis and variable names on y-axis?
See barh and particularly <the example>. Use the second optional output from sort to get the order of the variables when you so...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Why the calculation error enhances as the phase angle increases when using atan2?
alpha1 = 0:pi/10:100*pi; alpha2=linspace(0,100*pi,numel(alpha1)); plot(abs(alpha1-alpha2),'r-') It's not where you think it i...

plus de 2 ans il y a | 0

Réponse apportée
Axis ticks stacked on top of eachother
imagesc uses the size of the image from 1:N in each direction for the x, y coordinates when only display the array. Note your t...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
I am having a horzcat error while I try to create a structure from smaller structures.
OK, I found where the tutorial <eeglab_data.set> had been uploaded to GitHub so could get a peek at it without downloading the e...

plus de 2 ans il y a | 0

Réponse apportée
How to filter columns and count data
At the most basic, if your table is "tData" for lack of better name and your particular variable used not provided, tG=groupcou...

plus de 2 ans il y a | 0

Réponse apportée
how to apply a friedman test on a database with NaN's in matlab?
The obvious would be to exclude the NaN observations but you may run into an issue that the number of replicates for each group ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How to setup serial port in base workspace and access from function workspace?
Simply pass the returned serial port object to the function(s) where it's needed. Best factorization would probably be to write...

plus de 2 ans il y a | 0

Réponse apportée
Adding saved figure to plot
See copyobj, There's a very recent (last few weeks) Answers Q? on precisely the topic addressing putting axes into subplots whe...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Understanding the following line of code regarding Gaussian distribution.
It does precisely what the comment ahead of it says it does -- generates a set of psuedo-random normally distributed values with...

plus de 2 ans il y a | 1

Réponse apportée
Delete 'ans' from the function's output
Sure. Follow the function call with the trailing semicolon, ";" Otherwise, MATLAB will always echo the result; ans is the def...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Need to change colormap on scatter after a hold on
Despite my gaffe in deleting the sample image, I think I can illustrate how to do what you're wanting... Z = 10 + peaks; ...

plus de 2 ans il y a | 0

Réponse apportée
stop minimizing GUI window after file selection through dialog window
See <LongStandingProblemThread>. This has been a bug for "since forever". There are some workarounds at the referenced link; y...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to properly display and work with int32 images?
whos -file imageSample.mat load imageSample.mat image(PerfImg) We don't know if that is what would be expected or not; note t...

plus de 2 ans il y a | 0

Réponse apportée
Creating for loop with an if statement
I'd go at this differently... ROOTDATADIR='MATLAB/matlab 2023/data/'; % separate out the data from the code PA...

plus de 2 ans il y a | 0

Réponse apportée
Separate numbers present within a cell on multiple rows
whos -file CountArray.mat load CountArray.mat N = 30; [values_rec,ix] = maxk(CountArray(:,2),N); matrix=CountArray(ix,1); m...

plus de 2 ans il y a | 1

Réponse apportée
How to draw multiple lines (plots) using semilogy() at once?
The answer will NOT be to use eval, but hold on and then make the adjustments you think needed. Without an example of what you ...

plus de 2 ans il y a | 0

Réponse apportée
How do I find the rows in one table that have certain string?
T.STATUS=categorical(T.STATUS); % more efficient for categorical-type variables isInact=(T.STATUS=="Inactive"); ...

plus de 2 ans il y a | 1

Réponse apportée
Select data from excel sheet from specific row to specific row
It's possible to specify rows to load by address,but NOT by cell content. You read the full file and then select the data desir...

plus de 2 ans il y a | 0

Charger plus