Beantwortet
Generate random numbers per second
The code for your question might be like this. But I'm not sure why this kind of code is needed... (I would be happy if you coul...

mehr als 8 Jahre vor | 1

Beantwortet
grouping elements from a table
Assuming your table is |T|, the following code can generate what you want. [group, id] = findgroups(T.Week); func = @(p, q...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Plane fit (z=ax+by+c) to 3D point data
Assuming that your data is N-by-3 numeric array, say |yourData|, and each column corresponds to x, y and z, the following code c...

mehr als 8 Jahre vor | 4

| akzeptiert

Beantwortet
Compute the matrix of standard deviation of matrixs in cell array
If the size of all 100 images are the same (such as 51x51 pixel), you can easily obtain the std matrix with a few lines, like: ...

mehr als 8 Jahre vor | 0

Beantwortet
How to plot each matrix in a cell in 3d plot ?
I don't think it's better to plot 100 lines in one graph... But I believe the following code would be what you want to do. I hop...

mehr als 8 Jahre vor | 3

| akzeptiert

Beantwortet
Using a for loop how could I export my data values in an the same Excel sheet without overwitting?
I think there are 2 ways to do this, as shown in the following. If your data size is not so big, I prefer the first one. (1) ...

mehr als 8 Jahre vor | 0

Beantwortet
Removing like terms in a matrix
|ismember| function can do this more easily, like: A = [1 2 3 4 5 6 7 8 9]; B = [2 4 5 8 9]; idx = ismember(A,B); ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to do 2D interpolation
Looking at your data, curve fitting could be suitable to evaluate |y1| and |y2| at |x = 0.8, 8.3|. Here is the sample code to fi...

mehr als 8 Jahre vor | 2

Beantwortet
How to extract specific rows with requirements from multiple CSV files?
Hi Ziran-san, thank you for uploading some sample csv files. Thanks to these files, I could understand the point! Based on th...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
デジタルフィルタのボード線図
ボード線図の元となるデジタルフィルターの周波数応答は、関数 <https://jp.mathworks.com/help/signal/ref/freqz.html freqz> で出力することができます。横軸を周波数とするには、サンプリング周波数を指定す...

mehr als 8 Jahre vor | 3

Beantwortet
how can i plot a contour plot over a imagesc?
The solution would be as follows: I think you should adjust 'LineColor' to clearly visualize your contour plot over imagesc. ...

mehr als 8 Jahre vor | 1

Beantwortet
How to store corresponding two data to new matrix by using forloop?
I would recommend using |timetable| and |retime| function, like: % Convert data to datatable time1 = [0.82456; 0.84626; ...

mehr als 8 Jahre vor | 0

Beantwortet
I have an array with data(1,unknown).I want to split it number of rows but row wise not column wise as reshape do
The following would be one solution. But I'm not sure what to do when length of your data is not 5N (N = 1,2,3...). % Your ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Create Unique Randomsample 1000 times
Just in case, you can check the uniqueness by: % Make a variable 'a' a = zeros(1000, 50); for i =1:1000 a(i, :) ...

mehr als 8 Jahre vor | 0

Beantwortet
how can i show the x-values on the x-axis , for example i would like that the graph shows the value of 100 and 500 in the x-axis
Please arrange |XTick| property of axes handle, like: % Sample data x = [100; 500; 1000; 5000]; data = [x, exp(-0.001...

mehr als 8 Jahre vor | 0

Beantwortet
Subtracting Row and column vectors
I think the following would be one possible solution. By using zero-padding and transpose, I have adjusted A and B, C and D, to ...

mehr als 8 Jahre vor | 0

Beantwortet
Plot a cell array containing n matrices on same graph but with different color for each matrix.
Here is another way. By using |cellfun|, you don't need to use for-loop. % Sample 10-by-1 cell C = cell(10,1); for kk...

mehr als 8 Jahre vor | 2

Beantwortet
How can I compute histogram using three variable
The strait-forward way to do this will be like this (well, there should be more sophisticated way...). I hope it will be help yo...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Swaping data from 3 different columns in MATLAB
If my understanding is correct, the following code will achieve what you want to do. % Sample 4728x12 numeric array A = ...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
Delete specific rows from character array
Using the regular expression, it can be done easily, like: A ={'*8da9b9e39909762fb8044bfc9b90;',... '*5da9b9e30ba870;'...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
How to set bar beginning value?
If my understanding is correct, what you want to do would be like the following. Is it answering your question?? % Example ...

fast 9 Jahre vor | 4

Beantwortet
How to plot table values?
How about using bar chart, like: % Sample data YourTable = table({'hotspot1';'hotspot2';'hotspot3'},[10;20;30],... 'V...

fast 9 Jahre vor | 0

Beantwortet
How to blend image and label image
If you already have label matrix for your RGB image, the last part of the following example will help. -> <https://www.mathwo...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to extract every elements with different dimension at multiple cells in efficient manner?
How about using |cellfun| and |horzcat| functions as follows. In this code, each element in cell array dd is transposed by |cel...

fast 9 Jahre vor | 1

Beantwortet
I can't get the correct plot
This is due to the low sampling speed. Please try to use much higher sampling rate, like: t=linspace(-2,2,2000);

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
Element by element (xor) operation on cells.
I think |cellfun| would be suitable to this, like: load('Train&Test.mat'); Result = cell(numel(Test), numel(Train)); ...

fast 9 Jahre vor | 0

Beantwortet
How to make a distribution from array
Plotting histogram and obtaining its bin counts are simply done by |histogram| and |histcounts| functions, respectively, like: ...

fast 9 Jahre vor | 1

Beantwortet
When I am using A(:,9)= [ ]; for deletion, an error is shown (Matrix index is out of range for deletion.). What might the problem be?
If the size your numeric array |A| is 1x18, simply |A(9:18) = [];| will delete 9th~18th elements from the array.

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to find a value in matrix column and extract the another column equal to that value?
I think the code will be like: % Sample array data = randi([30,40],100,3); % Index where column-2 == 35 idx = da...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to set legend marker size
How about changing the marker size of your plot? Here is an example. plot(magic(4),'o','MarkerSize',10); l = legend('a'...

fast 9 Jahre vor | 0

Mehr laden