Respondida
3D Rectangle with 8 points (four corners and one midpoint on each edge)
The points aren't remotely coplanar. It's not a rectangle. It is a set of points which lie above the boundary of a rectangular...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to rectify the error in this code?
It's just a typo thetaest3 instead of theatest3

alrededor de 5 años hace | 0

Respondida
Is there anyway to make a for loop variable global?
If the variable time is not defined after the loop exits, then that's because it was never defined in the loop. Ask yourself wh...

alrededor de 5 años hace | 1

Respondida
error finding placement of specific number in a vector
Does the vector contain 120? Does the vector contain exactly 120? If it's floating point, the answer might not be what you t...

alrededor de 5 años hace | 0

| aceptada

Respondida
mean and peak for all sample
What is "the entire sample"? Is it the entirety of pz3? Is it each row? Is it z.*pz3? I'm going to just assume that you ...

alrededor de 5 años hace | 0

Respondida
Matrix values represented as colormap
Why do caxis([-max(E_superimposed(:)) max(E_superimposed(:))]) instead of caxis([min(E_superimposed(:)) max(E_superimposed(:...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to rename many files in a folder simultaneoulsy using matlab
Not everything has to be done with Matlab. If you're using *nix: rename 's/501\(//;s/\)//' 501*.jpg But considering that yo...

alrededor de 5 años hace | 0

Respondida
How to plot the graphs by fixing constants of your choice
C = [1 2 3] % pick some constants x = linspace(0,50,100); % pick an interval y = C(1)*exp(-x*(9/(4*(37/8 - 10^(1/2))^(1/3)) ...

alrededor de 5 años hace | 0

| aceptada

Respondida
NMSE and SNR for image restoration algorithms
If you have IPT: refpict = imread('tire.tif'); outpict = imnoise(refpict,'gaussian'); % calculate NMSE mse = immse(refpict...

alrededor de 5 años hace | 0

| aceptada

Respondida
To find the occurences
You could use image processing tools easily enough: Since this appears to be using 8-connectivity: A = [1 1 1 1 1; 2 1 1 ...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to quickly assign the values of a matrix using a given array?
Here is one way: A = [2 9; 1 5; 8 3] s = [size(A,1) 10]; % you're going to have to specify the output width B = zeros(s); ...

alrededor de 5 años hace | 0

| aceptada

Respondida
Matlab Error graphing a plane 'Z must be a matrix, not a scalar or vector'
Try something like this: a = 1; b = 2; c = 3; % i don't know what these were syms x y z f=(a*x)+(b*y)+(c*z)+(x*y*z); fx=di...

alrededor de 5 años hace | 1

| aceptada

Respondida
How to calculate the size (area) in pixels f or each object
Something like this: Reduce the image to a logical mask which describes the object(s) of interest Use bwarea(), regionprops() ...

alrededor de 5 años hace | 0

Respondida
concatenating the rows to have a column wise data
This could almost certainly be simplified, but I think this is at least readable: % data arranged as groups of 4 row vectors A...

alrededor de 5 años hace | 0

| aceptada

Respondida
How can I scales the entries of an array to the interval [0,1] in matlab version 2014a?
Something like this: A = rand(5)*10-4 % some random test array mn = min(A(:)); mx = max(A(:)); B = (A - mn) ./ (mx-mn) That...

alrededor de 5 años hace | 0

Respondida
For loop with two array
Perhaps you're trying to calculate wind direction and trying to conditionally deal with the fact that atan() has a limited domai...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to detect and count kiwi fruit on a tree?
Let us assume the subject is a spherical red kiwi tree in an evenly illuminated vacuum. You might begin your attempt by choos...

alrededor de 5 años hace | 0

Respondida
I want to change the background to white, can someone help me pls
Well, I'm not sure where this is going, so I'll just throw out some things. I=imread('Fig2.jpg'); I2=imread('Fig3.jpg'); I3...

alrededor de 5 años hace | 0

Respondida
Increase RGB image saturation.
Out of boredom and self-interest, I'll add the convenient but nonstandard way of doing this with MIMT. Base MATLAB/IPT doesn't ...

alrededor de 5 años hace | 2

Respondida
Emulate gimp screen effect in rgb image
I know this is old, but I'm bored and browsing, so I'll leave answers that interest me where they may help the next person. T...

alrededor de 5 años hace | 0

Respondida
How to design this type of triangular matrix
Maybe something like N = 10; kh = 2; C = 10; dv = [0 0 (1:N)*kh^2]; dv(1:3) = dv(1:3)+[C -2*C C]; D = zeros(N); for d =...

alrededor de 5 años hace | 0

Respondida
Combine logical cell array based on 'or' condition
Maybe something like this: % test array C{1,1} = logical([1;0;0;0;0]); C{1,2} = logical([0;1;0;0;0]); C{1,3} = logical([0;0;...

alrededor de 5 años hace | 3

| aceptada

Respondida
inserting matrix into matlab
Maybe I'm missing something, but that description looks ambiguous. At one end, you have 1 on the 0th diagonal and 2 on the next...

alrededor de 5 años hace | 1

Respondida
If and elseif is not collapsable
Code folding options are in preferences under Editor>Code Folding; however, (as far as I know) that only allows the entire if/el...

alrededor de 5 años hace | 0

| aceptada

Respondida
Zeros and ones vector
I don't know of a nice way to do this, and I'm not known for being clever or elegant, so take this with a grain of salt. Depe...

alrededor de 5 años hace | 0

Respondida
Remove Black Background from segmented binary image
I'm still not sure what you're after or how you intend to use the results, so I'll just try a few things. I'm going to use an e...

alrededor de 5 años hace | 0

| aceptada

Respondida
Extracting the comments and the line of comments from a matlab script
Normally, I'd just use sed sed -n -e 's/^[[:blank:]]*//' -e '/^%/p' myscriptfile.m > pileofcomments.txt I guess you could also...

alrededor de 5 años hace | 0

Respondida
visualization of huge matrix
It may be that part of the issue you're having with display is the fact that these view tools do nearest-neighbor interpolation ...

alrededor de 5 años hace | 0

Respondida
Evaluating an array with another array?
That would be the use of linear indices: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html ...

alrededor de 5 años hace | 0

Respondida
Drawing contour under a fitted surface curve in MATLAB
If you can plot it, I don't see how it matters whether it's a fit or any other form of data. The only big question I see is how...

alrededor de 5 años hace | 0

Cargar más