Réponse apportée
Bringing arrays to the same length
There are two issues with the solution by Arif: It uses find on a logical array, but that is only used to index an array It as...

environ 4 ans il y a | 1

Réponse apportée
How to generate dataset automatically using MATLAB
Maybe you want this? total_samples_per_class=5e5; prfSTG = [200 400 800 1000 900 ]; n_pulsesSTG = [800 800 800 800 800 80...

environ 4 ans il y a | 0

Réponse apportée
I want to build aa matrix by choosing a random value of x1,x2 ... from -1to 1, 1000 times? Could anyone help?
Turn your numbered variables into an array. Then you can use randi to randomly select from those values.

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How can I use Loop to read multiple matrixes and sum rows?
You can load the mat file to a struct and loop through the fields. Now you also immediately see why numbered variables are a bad...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Plotting Multiple Box plot in same graph same x axis
You can group them in bins from 1 to 15 and tweak the x labels to match your needs. See the documentation for how to use 'Group...

environ 4 ans il y a | 0

Réponse apportée
How to list the directories of multiple folders?
base_path='C:\Users\Desktop\Stats\'; P=cell(5,1); for n=1:numel(P) P{n}=sprintf('%sID%03d_Stats',base_path,n); end P

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Adding a progress bar in App Designer inside a callback
To increase performance, Matlab does not automatically update graphics elements on the screen after a function call that modifie...

environ 4 ans il y a | 2

| A accepté

Réponse apportée
How to get Matlab C++ compiler name in my program?
If starting Matlab is fine, then this code will get you all the info you need: details=get_cpp_compiler_info function details=...

environ 4 ans il y a | 0

Réponse apportée
How can I find the line after the line containing the text I am looking for?
There are two general ways to this: Read the data all at once, then do your analysis on the full file, then write the complete ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to create GUI for Transmitting and receiving image using MATLAB
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. As @Benjamin Thompson...

environ 4 ans il y a | 0

Réponse apportée
coloration the pixels matlab
The easiest way to do this is to create an index image and then use ind2rgb to convert to a color image. im1=imread('https://ww...

environ 4 ans il y a | 0

Réponse apportée
How do I solve this matrix in a loop for different values for P?
I'm guessing you want a for loop like this: x1= linspace(-0.005,0.005,10); x2= linspace(-0.005,0.005,10); x3= linspace(-0.005...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
Guidelines for appropriate moderation?
Sorry, this post is not very structured, maybe I'll edit it if this thread gets more attention. What I personally tend to do ...

environ 4 ans il y a | 2

Réponse apportée
How can we write unsigned long value in matlab?
As I understand it, this would be a casting operation, equivalent to the Matlab function cast. (note that typecast changes the d...

environ 4 ans il y a | 0

Réponse apportée
What type of Build in function used for plot such graph? or how to plot such graph?
The plot3 function will do this. help plot3

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Boxplot how to make the box widths proportional to sample size
There is no function in Matlab that does this natively, but you can write it from scratch. If it is important to you that you...

environ 4 ans il y a | 0

Réponse apportée
How I can do auto-resized axes in App Designer?
You should confirm the units property of your axes is set to normalized. If this is not possible you will have to use a listener...

environ 4 ans il y a | 0

Réponse apportée
How to curve fit an equation that gets values from another equation?
There is probably something wrong with your loop, as you're using e both in the first part as an array, and in the second part. ...

environ 4 ans il y a | 0

Réponse apportée
Why two variables loading the same .mat file are not equal ?
I guess boldly: There might be a NaN value hidden somewhere in your data: isequal(NaN,NaN) You might be interested in my Comp...

environ 4 ans il y a | 3

| A accepté

Réponse apportée
Can I create function that use default input unless a user gives one?
The code you show is almost exactly what you describe (except for the <0 instead of <1): if the user doesn't provide an input, i...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
how do i plot a straight line and also change then range of the x axis and y axis ?
I suspect you want something like xline or yline: Vonew=45; Vonew2=15 vin=30; y=Vonew; %i get my Voutnew=45 x=Vonew2; plot...

environ 4 ans il y a | 0

Réponse apportée
Calculate min/max/mean value every 100 points
Reshape will work, but you have to pad with NaN values and set the 'omitnan' flag: data=rand(1,17999); data(end+(1:mod(-end,10...

environ 4 ans il y a | 1

Réponse apportée
a length of number times to a function
Apparently conv(ecg,h) returns a vector, meaning that you can't store it in ye(i). My guess would be that you would be willing ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Converting unix time to real time
I suspect you forgot to convert the char to a value: unix_time='1641031963.398125'; unix_time=str2double(unix_time); date_tim...

environ 4 ans il y a | 1

Réponse apportée
Combining .txt files and averaging data
You can get my readfile function from the FEX. If you are using R2017a or later, you can also get it through the AddOn-manager. ...

environ 4 ans il y a | 0

Réponse apportée
Assign a Sub Array to Array Knowing the Number of Dimensions at Run Time
There is probably a better way, but you can fill a cell array with the index vectors (simple loop with ndims), and then use this...

environ 4 ans il y a | 0

Réponse apportée
I need create a function for order pairs
You can create indices with meshgrid or ndgrid, no loop needed. [indA,indB]=ndgrid(1:numel(A),1:numel(B)); C=[A(indA(:)).'...

environ 4 ans il y a | 0

Réponse apportée
A Ghost Data In Matlab???
The way data is displayed and the way data is stored are separated in Matlab. If you take a look at this: [12345.1 2015] You w...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Plot a for-loop with if-statements inside
In this case you don't even need a loop: a = 1; b = 2; pv = 5*10^(-3); Q = pv*((4*pi*b^3)/3) - pv*((4*pi*a^3)/3); epsilon =...

environ 4 ans il y a | 0

Réponse apportée
I am facing one problem.I am creating a GUI.I have a string in a m. file.I want to show that string in my GUI .How can I do that?
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. The source of your e...

environ 4 ans il y a | 0

Charger plus