Answered
Inverse of C matrix is Inf when it shouldn't be. How do I fix the matrix? The formula to calculate C is correct. May be an issue with input c.
I have no idea about the details of the calculation but spot some of the issues stated as follows: clc; clear all; close all N...

4 years ago | 0

| accepted

Answered
Mesh and Surf graphics problem
You redo the meshgrid and re-sample the data via griddata may be the cause of your problem. Just remove all additional meshgrid...

4 years ago | 1

| accepted

Answered
Drawing lines with a handle
Note that link_colors is one of the input argument in function draw_links, so there is no need to define it inside the function ...

4 years ago | 0

| accepted

Answered
Assign a colormap to an array to plot with the nsidepoly function.
You may try the following: clear; clc; coord = [1 1;4 4;7 7;10 10]; a = 0.5; b = 1.5; r = (b-a).*rand(4, 1) + a; nLevel = ...

4 years ago | 0

| accepted

Answered
How do I create a table containing a character array if it has only one row?
Time = [1];Force = [12];ID = {'ab'}; T = table(Time,Force,ID) Actually, the error message tells you the solution. Time = [1];...

4 years ago | 0

| accepted

Answered
Change xticks intervals in heatmap
Refer to this link <https://www.mathworks.com/matlabcentral/answers/513971-how-can-i-modify-the-x-and-y-axis-tick-labels-for-a-h...

4 years ago | 0

| accepted

Answered
How to normalize data between 0 and 1
Another option is use function <https://www.mathworks.com/help/matlab/ref/rescale.html rescale>

4 years ago | 1

Answered
How to display R, G, B colours of an individual pixel in an image?
Use function <https://www.mathworks.com/help/images/ref/imsplit.html imsplit> [R,G,B] = imsplit(I)

4 years ago | 0

Answered
Matlab activation function list
Check this ink: MATLAB Functions

4 years ago | 0

Answered
Error Running Initialization Code. The error is as shown in the picture where it states it is unable to change current folder as the folder is nonexistent or not a folder
Would you please check the current folder in the Current Folder toolbar. Or type pwd to see what is your cuurent foloder. I su...

4 years ago | 1

| accepted

Answered
Index exceeds matrix dimensions.
Check the following first: In the following loop, you assign something to variable adjb if g(i,j)==k. However, if g(i,j)~=k, th...

4 years ago | 0

Answered
why I fully lose dicom image after adding noise to it?
imnoise expects pixel values of data type double and single to be in the range [0, 1]. You can use the rescale function to adjus...

4 years ago | 0

| accepted

Answered
Two ROI in one image and calculate mean for each ROI
You may try the following: clear; clc; rawdata = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/910580...

4 years ago | 1

| accepted

Answered
Use same scale for several quiver3 plots on a single figure
Adjust the scale manually for the combined quiver3 plot. However, since the residual ones are 100X shorter than the delta ones...

4 years ago | 0

| accepted

Answered
About "ismember" function
If you would like to use function ismember, then you may try the following: value = arrayfun(@(x) PD.Var2(ismember(PD.Var1,x)),...

4 years ago | 0

Answered
Is there a way to leave a blank space using the tiledlayout function?
Below shows an example where the plot appears on position 1,2,6,7,11 & 12 for a 3x4 layout. tiledlayout(3,4,'TileSpacing','comp...

4 years ago | 1

| accepted

Answered
Colour bar isn't correct for subplot contour
Below is only a workaround to use each colorbar for each subplot and finally hidden them. %Preamble clc clear all clear work...

4 years ago | 0

| accepted

Answered
How to add dashed line to RGB image
Add the following line: figure(14); set(gcf, 'MenuBar', 'none'); % Prevents mouse hover from activating context menu on top-ri...

4 years ago | 0

| accepted

Answered
Converting an image using radial profile
I don't have your original image and hence just crop a region as a demo. You may change the variables according to your require...

4 years ago | 0

Answered
Changing semi circle image from Cartesian to Polar coordinate
Determine the perimeter for half circle and then connecting the end points with a straight line. And you may change the angle o...

4 years ago | 0

| accepted

Answered
Stacked Bar chart using structure, displaying putting values on each bar
The positions of the text should be in a row or column vector. Hence reshape it and will work. While for the y-position of the ...

4 years ago | 0

| accepted

Answered
Adding a Warning Window/Message In Matlab App Designer
You may use function uialert to deliver a message to the user via a callback Please refer to the following example and modify u...

4 years ago | 1

Answered
How to determine a matrix presenting the number of times that element j appears at position i, and the number of times that element j appears immediately after k?
Use function ismember and create a counter to accumulate the number of occurance S = [11, 12, 13, 21, 22, 23]; X = [11 22 21 1...

4 years ago | 0

| accepted

Answered
How to plot heatmap using x y and z data
You may refer to the following example to make sure your variable x,y and z are in similar format. xcoord = 1.5:0.1:3; ...

4 years ago | 0

| accepted

Answered
How to define a circle in an image and calculate the percentage it is filled.
Some modification from your code as follows: (1) Use your code to detect the red circles (2) Generate convex hull image to cal...

4 years ago | 0

| accepted

Answered
Line inside a circle. Hold on not working
The line is too short and you are not able to see it. I make it to a blue dot with MarkerSize = 50, xlocs=[0 -67.4066 -67.5774...

4 years ago | 0

Answered
hi all, i'm Trying to use bwboundaries function to draw a boundary line around two object in binary image, but it applies only on the big one. how do i apply it on BOTH?
Modify as follows: boundary2=bwboundaries(final); % plot and show boundary figure(1);subplot(3,3,9), imshow(final); title('b...

4 years ago | 0

Answered
exponential form from the graphs
x=1:10; y=100000:100000:1000000; plot(x,y); ax=gca; ax.YTickLabel=num2str(ax.YTick');

4 years ago | 0

Answered
How can I interpolate across columns within a matrix where the dataset are different lengths and NaN values are at the end of the columns?
Use extrapolate in function interp1, the folloiwing use linear as the extrapolation method, you may choose other method, such as...

4 years ago | 0

| accepted

Answered
Slice 3D Volume into 2D Image along the specific axis
Actually you did it in the first plot, just add the following line in 2D sliced images plots. And use the original axis ranges....

4 years ago | 0

Load more