Réponse apportée
Separating sgtitle(sprintf()) into three lines of code
Try the following to see whether this i swhat you want: sgtitle(["ECE 202 Exercise M7: Current, voltage, and power absorbed";.....

plus de 4 ans il y a | 0

Réponse apportée
Smoothed 2D histogram contour
Try this: data = readmatrix('xy.xlsx'); nbins=[200 200]; % You may adjust number of bin...

plus de 4 ans il y a | 0

Réponse apportée
Release a Message in GUI to user when calculation can't be performed
A sample example as follows, you may modify it to suit your purpose: A = [1 2 3 4; 2 3 4 5]; B = [3 4 5; 4 5 7]; fig = uifigu...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Calculating percentage of brown pixels over other colors in tumor
Define the tumor roi and then calculate the white pixels inside the roi: clear;clc; rawdata=imread('image.png'); BW = rgb2gra...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How can I make right axis off in Matlab plot?
Use function yyaxis and hide the right y-axis as follows: clear; clc; h = figure(1); hax = axes; y=randi(100,1,10); grid on...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
how can i correct this code and get rid of error? urgent help please
You need to specify the number of digits after the decimal point. For example, %.2f or %.4f for 2 and 4 digits after the deci...

plus de 4 ans il y a | 0

Réponse apportée
Assigning NaN to variables, inserting into a cellarray and then plotting Error
Suppose variable A is the data in your uitable. You may use function str2double B = str2double(A); Then plot it using B(:,...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
MATLAB function gives me error
Check the length of variable 'u'. Looks like there is only 1 element inside variable 'u', but the function request to find the ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
binary matrix to decimal number
Try this: A = logical([1 0 1 1 0 0 1 0]); B = bin2dec(num2str(A))

plus de 4 ans il y a | 1

Réponse apportée
How to sum values in a matrix which are in the specified distance from one value?
You may try the following where the mask indicates the pixel where its distance is 50 pixels from your preset center pixel. ...

plus de 4 ans il y a | 0

Réponse apportée
Dot indexing is not supported error
If there exist a variable name mat_files.name, you are not allowed to use another variable with name mat_files. You may need ...

plus de 4 ans il y a | 0

Réponse apportée
How to add a column to a UItable in AppDesigner
I think it is better to record the number of columns in the uitable before you added a new column and assign the name to the new...

plus de 4 ans il y a | 0

Réponse apportée
Y data on the bar plot
Why not using the example in the documentation by getting the EndPoints as follows: clear; clc; x = [25 50 75]; vals = [6000...

plus de 4 ans il y a | 1

Réponse apportée
Why won't this function plot?
No need to use the for loop, Just use the following: plot(c1_exp)

plus de 4 ans il y a | 0

Réponse apportée
how to fit ylabel for the plots?
You may also experiment with the InnerPosition of 'gca'. Following shows an example: Nz = 100; A = randi(100,1,Nz); figure(...

plus de 4 ans il y a | 0

Réponse apportée
plotting Y data on scatter plot
Another option as follows: for i = 1:6 text(X(i),Y(i),sprintf('(%.0f)',Y(i))) end

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
how to convert dicom RT structure to binary mask
It uses world coordinates in x,y & z axis which is shown in your attached png file. So you need to capture the axis information ...

plus de 4 ans il y a | 0

Réponse apportée
How to plot unequal time series with same x-axis
You may try the following: T = readtable('data.csv'); % Read csv file as entire table TT2 = table2timetable(T(:,4:5))...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to iterate matrix multiple times?
Write your code as a function and save it as a m-file (or use the attached file): function Lj = processLa(La) H = [1 1 1 ...

plus de 4 ans il y a | 1

Réponse apportée
Can anyone help me?
Varaible a becomes a character array after you use function num2str, so it is comparing a 'character' instead of a number. On t...

plus de 4 ans il y a | 1

Réponse apportée
How to I find the intersection point between y=x*exp(x)/(exp(x)-1) and y=3? I can't seem to have the intersection point displayed.
Use function fzero to help you to find the intersection. x = 1:1:10; f = @(x) x.*exp(x); g = @(x) exp(x)-1; y_1 = @(x) f(x)....

plus de 4 ans il y a | 0

Réponse apportée
How to check in one loop for multiple values V1,V2,V3... I have write the code but I am not getting value multiplied in answer
One possible way is to use a cell array instead of different variables as following: Use only one variable V. V(1) = {char(937...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Creating an Image from a Textfile Data using Matlab
Try the followings: (with editing below) Normalization just divide by 255 for uint8 image. [Ny,Nx,Nc] = size(input_image_3D); ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Superimposing Graphs with large difference in Y-axis values
Try function <https://www.mathworks.com/help/matlab/ref/yyaxis.html yyaxis>

plus de 4 ans il y a | 1

Réponse apportée
How to create a custom grayscale colormap between white and black?
You may use 'colormapeditor' as follows to create a custom colormap:

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
plot in logarithmic scale
I think you may need to use function contour3. Then you can set the Z-axis scale to log by set(gca,'ZScale','log')

plus de 4 ans il y a | 0

Réponse apportée
changing dicom-dict.txt has no effect
You may refer to the following and try to create a new DICOM tag and write it to a new DICOM image. After that, the DICOM heade...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
What would be the MatLab code to get the output from the input image?.
Try the following: rawdata = num2cell((randi(10,10,4))); index = [2 2 2 1 2 3 4 2 1 2]'; singlecell = cellfun(@(x,y) x(y), nu...

plus de 4 ans il y a | 0

Réponse apportée
How can I save the result obtained from the For loop in one variable ?
You may assign another variable with index which stores the result within the loop for i = 1:10 %.... %.... [centers, r...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
How to convert cell to matrix
Try this, where A is your 100001x2 cell: cell2mat(cellfun(@(x) x,A))

plus de 4 ans il y a | 0

Charger plus