Answered

Rescale values based on a particular value

Try the following: data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/925044/w3.csv'); rescale_...

Rescale values based on a particular value

Try the following: data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/925044/w3.csv'); rescale_...

2 months ago | 1

| accepted

Answered

error while executing boundingbox method

Function imshow shows a cropped image 'imcrp' from original image 'b', so the size of the displayed image is smaller. However, ...

error while executing boundingbox method

Function imshow shows a cropped image 'imcrp' from original image 'b', so the size of the displayed image is smaller. However, ...

2 months ago | 0

Answered

New here, i cannot figure it out ( Index exceeds the number of array elements (2). )

The labeledImage is based on 'bwn1' and I think you should also use 'bwn1' instead of 'bw' when finding their boundaries. [~, c...

New here, i cannot figure it out ( Index exceeds the number of array elements (2). )

The labeledImage is based on 'bwn1' and I think you should also use 'bwn1' instead of 'bw' when finding their boundaries. [~, c...

2 months ago | 0

Answered

Diagonal cross section of function z(x,y) for x=y

Easier to assign some values where x=y in function meshgrid as follows: If the assigned values for x and y are different, then ...

Diagonal cross section of function z(x,y) for x=y

Easier to assign some values where x=y in function meshgrid as follows: If the assigned values for x and y are different, then ...

2 months ago | 0

Answered

Get clim values from colormap and adjust them in real time

Use clim(app.UIAxes2_5,[cmin cmax])

Get clim values from colormap and adjust them in real time

Use clim(app.UIAxes2_5,[cmin cmax])

2 months ago | 0

Answered

Probing a plot based on colormap information

Try function datatip & dataTipTextRow if your MATLAB version is after 2019b. [x,y] = meshgrid(1:15,1:15); z = peaks(15); T = ...

Probing a plot based on colormap information

Try function datatip & dataTipTextRow if your MATLAB version is after 2019b. [x,y] = meshgrid(1:15,1:15); z = peaks(15); T = ...

2 months ago | 1

| accepted

Answered

When using two separate edit fields in Matlab app designer, how to save both into a text file?

Use Writemode with append: writematrix(value, 'feedback.txt', 'WriteMode','append')

When using two separate edit fields in Matlab app designer, how to save both into a text file?

Use Writemode with append: writematrix(value, 'feedback.txt', 'WriteMode','append')

2 months ago | 0

Answered

How to save to a csv file?

Try the following: writetable(Dot1.Stats, 'sq_Dot1.csv','WriteMode','Append');

How to save to a csv file?

Try the following: writetable(Dot1.Stats, 'sq_Dot1.csv','WriteMode','Append');

2 months ago | 0

| accepted

Answered

Plotting a heatmap with collected data

Use function pcolor is another option. clear;clc; im = imread('map.png'); [Ny,Nx,Nc] = size(im); f = figure(1); ax = gca; ...

Plotting a heatmap with collected data

Use function pcolor is another option. clear;clc; im = imread('map.png'); [Ny,Nx,Nc] = size(im); f = figure(1); ax = gca; ...

2 months ago | 1

| accepted

Answered

Transform table to another format

Use function stack is another option. clear;clc; Headers = ["Fund1";"Fund2";"Fund3"]; Fund1 = [1;0.1;0.2]; Fund2 = [0.3;1;0....

Transform table to another format

Use function stack is another option. clear;clc; Headers = ["Fund1";"Fund2";"Fund3"]; Fund1 = [1;0.1;0.2]; Fund2 = [0.3;1;0....

2 months ago | 1

| accepted

Answered

convert cell array to double error: Dimensions of arrays being concatenated are not consistent.

Use function str2double

convert cell array to double error: Dimensions of arrays being concatenated are not consistent.

Use function str2double

2 months ago | 0

| accepted

Answered

Heatmap - multiple values in same cell

Not writing data to the same cell, but writing to separate cells as a workaround: Manually change the YDisplayLabel to let the ...

Heatmap - multiple values in same cell

Not writing data to the same cell, but writing to separate cells as a workaround: Manually change the YDisplayLabel to let the ...

2 months ago | 0

Answered

Fit curve edge and determine curvature

Use function polyfit with higher degree. data = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/918279/5...

Fit curve edge and determine curvature

Use function polyfit with higher degree. data = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/918279/5...

2 months ago | 0

Answered

how to copy a specific files from one folder to another folder?

Try the following: filePattern = fullfile('E:\SNR-Dataset\DATA-11-time\time-data-training\8PSK\8PSK', '*.mat'); dest = 'E:\SNR...

how to copy a specific files from one folder to another folder?

Try the following: filePattern = fullfile('E:\SNR-Dataset\DATA-11-time\time-data-training\8PSK\8PSK', '*.mat'); dest = 'E:\SNR...

2 months ago | 0

Answered

Greetings dear friends, I am trying to change some variables in the indicated code to get the waves that can be seen in the 3D graph, thanks for your help!

Better to check the limits to generate your sample figure. Looks like from -3pi to 3pi as shown below: As the limits goes to in...

Greetings dear friends, I am trying to change some variables in the indicated code to get the waves that can be seen in the 3D graph, thanks for your help!

Better to check the limits to generate your sample figure. Looks like from -3pi to 3pi as shown below: As the limits goes to in...

2 months ago | 0

| accepted

Answered

intersection of 3d convex hull

Have a quick look on the function and I suspect you should use transpose of V{1} and V{2} as the input arguments S=(intersectio...

intersection of 3d convex hull

Have a quick look on the function and I suspect you should use transpose of V{1} and V{2} as the input arguments S=(intersectio...

2 months ago | 0

| accepted

Answered

Does regionprops function work in Matlab App designer

You are extracting something less than or equals to the lower bound (example < 100), and then extracting the resulting image wit...

Does regionprops function work in Matlab App designer

You are extracting something less than or equals to the lower bound (example < 100), and then extracting the resulting image wit...

2 months ago | 0

| accepted

Answered

How to read Harvard Medical MRI images which are in .gif format?

Save it as png file and open it data = imread('1.png'); imshow(data)

How to read Harvard Medical MRI images which are in .gif format?

Save it as png file and open it data = imread('1.png'); imshow(data)

2 months ago | 0

Answered

how to store each for loop values in multidimensional matrix?

Try to use a cell array to store the result as follows: zn = 3; % no. of planes zmax = 200; % z max zmin = 100; % z min zA =...

how to store each for loop values in multidimensional matrix?

Try to use a cell array to store the result as follows: zn = 3; % no. of planes zmax = 200; % z max zmin = 100; % z min zA =...

3 months ago | 0

| accepted

Answered

How a table columns are named using MATALB

Something like the following may be similar to what you want. clear; clc; combine_vector = randi(10,5,10); Title1 = array2tab...

How a table columns are named using MATALB

Something like the following may be similar to what you want. clear; clc; combine_vector = randi(10,5,10); Title1 = array2tab...

3 months ago | 0

| accepted

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

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

3 months 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...

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

3 months 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 ...

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

3 months 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 = ...

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

3 months 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];...

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

3 months 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...

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

3 months 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>

How to normalize data between 0 and 1

Another option is use function <https://www.mathworks.com/help/matlab/ref/rescale.html rescale>

3 months 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)

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)

3 months 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...

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

3 months ago | 1

| accepted