Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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 ...

casi 4 años hace | 0

| aceptada

Respondida
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 = ...

casi 4 años hace | 0

| aceptada

Respondida
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];...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 1

Respondida
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)

casi 4 años hace | 0

Respondida
Matlab activation function list
Check this ink: MATLAB Functions

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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)),...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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 ...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 1

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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; ...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

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

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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....

casi 4 años hace | 0

Cargar más