回答済み
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...

4年以上 前 | 1

回答済み
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...

4年以上 前 | 0

回答済み
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.

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 2

| 採用済み

回答済み
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=...

4年以上 前 | 0

回答済み
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 ...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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 ...

4年以上 前 | 2

回答済み
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...

4年以上 前 | 0

回答済み
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

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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. ...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 3

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

回答済み
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 ...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 1

回答済み
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. ...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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(:)).'...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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 =...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

さらに読み込む