Answered
How to obtain a cutsomized colorbar at certain color value range?
MyColBar = [0 0 0; 1 0 0; 1 0 0; 0 0 0]; You cannot have color sections of different widths, but you can duplicate colors. ...

3 years ago | 0

Answered
Sort columns of a table by the value corresponding
[~, idx] = sort(table2array(YourTable), 2, 'descend'); out = YourTable(:, idx) ; Note that this implementation will only ...

3 years ago | 1

| accepted

Answered
Meijjer G function implementation
When the G notation is used, then each of m, n, p, q are expected to be scalars, and z is expect to be scalar (or at least that...

3 years ago | 0

Answered
Arguments satisfy for a range of n when I use stepseq function
nlower is -40, nupper is +40. M1(3) = 50 is not in the range -40 to +40, so when you call stepseq(50, -40, +40) then you get th...

3 years ago | 0

Answered
Vectors must be the same length
if -50<= n <=50, MATLAB interprets that as if ((-50<= n) <=50) The first part compares every element in n to -50. You defined...

3 years ago | 0

Answered
How to plot 2D density plot with very large files?
You do not have a grid of lat and long: you have scattered data. You can see from the ratio of the number of unique elements to ...

3 years ago | 0

| accepted

Answered
How can I superimpose my contour plot to a map using usamap function?
contourm needs lat then long

3 years ago | 0

| accepted

Answered
why does data mean(data, 1) give differnt answer form finding mean of individual columns ,like mean_clm = mean(data( : ,1)) ?
For future reference: If mean() detects that the amount of data is below some internal size threshold, then it runs a straigh...

3 years ago | 0

Answered
Real term baud rate should be captured/ read by MATLAB
If you mean that you are using activex or .NET facilities to control a Realterm process from within matlab, then I do not know i...

3 years ago | 0

Answered
My assignment asked me to recreate this design. My question is how and where can i recreate it? And what each component is?
Modulating signal is the input signal to be transmitted, such as the current radiation level, or karaoke microphone of you singi...

3 years ago | 0

Answered
End real time video analysis loop after the key is pressed.
https://www.mathworks.com/help/matlab/matlab_prog/share-data-between-workspaces.html

3 years ago | 0

Answered
How do I plot a 3D graph of function that I have taken as input from the user?
z1 = subs(f, {x, y}, {X1, Y1}); You can only get away with subs(subs()) with scalars or with vectors with different orienta...

3 years ago | 0

Answered
I have trouble while loading dfield8 in my MATLAB R2022b version.
I just checked the source code. It is using findobj() to check for graphics objects with a particular "tag". That can include ob...

3 years ago | 0

Answered
Find the unique arrays in a list of arrays
find the maximum number of rows and columns and do a pass that pads each array with inf to maximum rows and columns and reshape ...

3 years ago | 0

Answered
JPEG Compression with 8x8 DCT Block
blockproc permits you to apply a function to blocks, either in a distinct block or sliding block manner. It also has options for...

3 years ago | 0

| accepted

Answered
Unique function with rows and 'first' as arguments
The code is locating the first row in which each combination of hour and minute occurs. There are other implementations, such a...

3 years ago | 1

Answered
For loop to store one matrix from multiple files to a structure
projectdir = 'C:\Users\Document\Data'; dinfo = dir(fullfile(projectdir, '*.mat')); filenames = fullfile( {dinfo.folder}, {dinf...

3 years ago | 1

| accepted

Answered
Why is 'Character#' not a valid mathlab variable name?
I looked up several different lists of the most popular programming languages, and checked reference documentation for each . ...

3 years ago | 0

Answered
Call a pcode file (of a character array) within a MatLab script
This is unusual, but possible. Code can examine the call-stack depth to determine whether it was called inside a function or scr...

3 years ago | 0

| accepted

Answered
How can I find out the index of the points here?
Subtract the center of mass. Rotate the result by +45 degrees. Now the combinations of sign() of the transformed x and y coordin...

3 years ago | 1

Answered
Build array from descriptive data without a loop
Array1 = [10,3,3;1000,178,4]; Array2 = cell2mat(arrayfun(@(Idx) Array1(Idx,1) + (0:Array1(Idx,3)-1).'*Array1(Idx,2), (1:size(Ar...

3 years ago | 1

| accepted

Answered
Dates and Times Refuse to Concatenate Into One Column
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1299205/example%20csv%20data.txt'; datecols = [1 9 ...

3 years ago | 1

| accepted

Answered
Reference to non-existent field 'syscolorfig'.
When the GUIDE initialization code is executed, the stored figure is retrieved from the .fig file. Then after some other things,...

3 years ago | 0

Answered
Errors with imshow function
There is no variable named image in your P2image.mat file, so your second line is being interpreted as imshow(image()) When yo...

3 years ago | 0

Answered
How to remove one step on command window?
To change part of what you previously typed, use up-arrow to retrieve the previous command; you can then use left and right arro...

3 years ago | 0

Answered
SOLVE-ONLY one solution
solve() will return multiple solutions only if the equations are simultaneous multinomials -- though in some cases it is able to...

3 years ago | 1

| accepted

Answered
May I download and install fminuit for MATLAB? I cannot find the file on the web.
https://github.com/shixnya/code-for-science It appears to be a mex file. I did not check for source code

3 years ago | 0

Answered
Can you change the color of new points without changing the color of an entire line?
No. The underlying graphics object only stores a single line color, not one color per point or group of points. You would need t...

3 years ago | 0

Answered
I have a function that takes an N X M array, A, and I want to take the sum of each column. The sum of the rows and sums of the two diagonals, the major diagonal first.
You can extract diagonals by using diag . And I see you already found sum . Be sure to read about the dim parameter of sum

3 years ago | 0

| accepted

Answered
Error i got for class a amplifier
See https://www.mathworks.com/help/simscape/ref/solverconfiguration.html You need to add a Solver Configuration Block to the m...

3 years ago | 1

| accepted

Load more