Respondida
i am trying to get volume of curve rotated but getting error using fill and error in volume curve(line 32)
syms x; % what is the value of requiring the user to manually re-enter data % every single time they run a script? % f=in...

casi 5 años hace | 0

Respondida
Counting x times zeros in a row on a given sequence
A = randi([0 1],1,1E3); % random vector of ones,zeros dA = [true diff(A) ~= 0]; % logical vector describing where A is changi...

casi 5 años hace | 0

Respondida
Random sequence of names
words = {'banana' 'orange' 'apple' 'peach' 'pear' 'cherry'}; randomizedwords = words(randperm(numel(words))); fprintf('%s\n',r...

casi 5 años hace | 0

Respondida
Indexing issue- using negative values in for loop calculations.
It's not clear why you're overwriting your results and then repeating the process 16 times anyway. If you want Z for all x and ...

casi 5 años hace | 0

| aceptada

Respondida
find index of value in array
A = randi(99,10,10) % test array x = 30; lessthanx = A(A<x) % all the numbers in A that are < x fprintf('%d',randi(1000,1,1))...

casi 5 años hace | 0

Respondida
Use combvec for pairs of values
If there's only two columns, what's wrong with just doing A = randi(9,20,2) B = A(:,[1 1 1 2 2 1 2 2])

casi 5 años hace | 0

Respondida
Please help me to fix error index exceeds matrix dimensions
Observe: index = 963689 + 16000*1.5 index > 987688 There are only numel(L) elements in L. There aren't numel(L)+24000 elemen...

casi 5 años hace | 0

| aceptada

Respondida
matrix interplation, increasing matrix elements 13 to 50
Your matrix does not have 13 columns. it has 8 columns. Decide whether you want to interpolate on rows or columns. Decide w...

casi 5 años hace | 0

Respondida
range isn't working
If you don't need to use a dimension input: A = [1 2 3; 4 5 6; 7 8 9]; range = @(x) max(x) - min(x); range(A) range(A(:)) ...

casi 5 años hace | 0

Respondida
The nested for loop is executed only according to the last result
The output is as the code dictates. The result for the last iteration is always the same. % constants rx = 4; ry = 8; rz = ...

casi 5 años hace | 0

Respondida
How can i obtain column vector from 3d matrx
Consider the example: % create an array s = [5 7 3]; A = reshape(1:prod(s),s) % create a vector containing all pages in the ...

casi 5 años hace | 0

Respondida
Getting NaN as the mean of a row that contains no NaN values, Inf values, 0/0 values
Not sure if that's really supposed to be a wide table. You say you're calculating row means, but you're calculating column mean...

casi 5 años hace | 0

| aceptada

Respondida
How to convert each HSI channels to 8-bit grayscale images?
You could use mat2gray() here, but you don't want to use the default syntax. Let's back up and explain why you would think yo...

casi 5 años hace | 1

| aceptada

Respondida
Why does my for loop only output the last-time result
Observe this expression: h_a1(ii,jj) = h_a1(ii,jj) + ((n+1) * A * (cos_alphaLOS ^ n) * cos_betaLOS * Ps) / 2 * pi * (DLOS ^ 2);...

casi 5 años hace | 0

| aceptada

Respondida
masure width of binary image object
Normally, if you're trying to remove small objects from a binary image, you do it by area. Toward that end, bwareaopen() can ...

casi 5 años hace | 0

Respondida
How to colorspace to RGB ?
Pascal Getreuer's Colorspace Transformations tools on the FEX are good, but they haven't been maintained for a decade now. Ther...

casi 5 años hace | 0

Respondida
Diameter of a droplet using image processing
A simple method that works at least for this image: A = rgb2gray(imread('https://www.mathworks.com/matlabcentral/answers/upload...

casi 5 años hace | 0

| aceptada

Respondida
Derive values of alphabet
For a numerical approach: https://www.mathworks.com/help/matlab/math/systems-of-linear-equations.html % coefficient matrix A ...

casi 5 años hace | 0

| aceptada

Respondida
I am doing a project in matlab,first time using it,and our prof sent us this code,can someone explain to me what thats doing? Thank you.
Without context, I doubt anyone can tell you anything more than a literal reading of the code. This is why documentation (a syn...

casi 5 años hace | 0

Respondida
How can I put this MSE equation into MATLAB?
You could use immse(), or you can do it manually: A = randi(100,10,1); B = A + randn(10,1); % use immse() mse1 = immse(A,B...

casi 5 años hace | 0

Respondida
How can match a digital image in the visible with a thermal image?
If they have the same aspect ratio, you can simply adjust the size with imresize(). If the aspect ratio differs, then you'll ha...

casi 5 años hace | 0

| aceptada

Respondida
Increase hue of image
You don't increase hue, you rotate hue. You can convert the image to a polar model and then add/subtract and mod() the result to...

casi 5 años hace | 0

Respondida
Imfuse with 3 images
The documentation for imfuse() is pretty transparent. The default mode is 'falsecolor', wherein two monochrome images (e.g. A a...

casi 5 años hace | 0

Respondida
Output argument not assigned on some execution paths
The problem occurs in these two cases: if N_Start_Freq<0 sprintf('%s','raise up f') return end if N_Stop_Freq>fs/2...

casi 5 años hace | 0

Respondida
for loop with three variables in 3d matrix
Try RH_ = 50 + 50*rand(100,4,3) % example data RH_excess_days = squeeze(sum(RH_ > 99,1))/24

casi 5 años hace | 0

Respondida
Customizing the color channels for fusing two images in
This is a basic image blending operation. As such, I am going to elect to do this with MIMT tools instead of native MATLAB/IPT....

casi 5 años hace | 0

| aceptada

Respondida
understanding an if statement
This isn't very clear usage and looks like invalid syntax at first glance. It would help to know what the surrounding code look...

casi 5 años hace | 1

| aceptada

Respondida
I am trying to the row number of '3/8' in a column of text data (52x1) n
Tube_data = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/780803/Copper%20Tubes.xls'); Column_1 = T...

casi 5 años hace | 0

Respondida
when i run the program, the line (202 column 1) is misplaced or improperly nested, why ?
That if/else structure is messed up and preventing ML from finding the end of the prior function scope. % "elseif" instead of...

casi 5 años hace | 0

| aceptada

Cargar más