Answered
How to fit an ellipse to a blob in binary image?
Keep in mind that most tools for morphological operations assume that the foreground (i.e. the "objects" ) are white. In order ...

5 years ago | 2

| accepted

Answered
How can I convert x, y, and z which are functions of theta to theta function of x, y, and z?
Something like this syms theta1 theta2 theta3 x y z L l c b a eqn1 = 2*L*(y+a)*cos(theta1) + 2*z*L*sin(theta1) + x^2 + y^2 + z...

5 years ago | 1

| accepted

Answered
How do I create a script to calculate the intensity vs a specific wavelength?
If you're just asking how to write the expression: % i'm assuming these are the inputs T=Matlabhw5.Temperature lambda=Matlabh...

5 years ago | 0

Answered
Passing a multi-variable function into quiver function
Maybe you meant this: u = (-1.5*(x.^2))-((1/3)*x.^3); % u velocity function v = (3*x.*y)+(y.*x.^2); % u velocity functi...

5 years ago | 1

| accepted

Answered
How to import different data in for loop ?
Perhaps something like this: % i'm assuming that first filename has an extension fnames={'M3_MSAP_hairpin_2layers_265_500_180_...

5 years ago | 0

Answered
How can i plot multiple objects in same 3D space i.e. plot3 ?
Something like this? center = [0.5 0 0.4]; %[x y z] radius = 0.1; dt = 0.25; t = (0:dt:10)'; theta = t*(2*pi/t(end))-(pi/2)...

5 years ago | 0

Answered
How do I get a graph to spiral
Well it would be a straight line, wouldn't it? Since there's a direct linear relationship between r and theta and that's what y...

5 years ago | 1

| accepted

Answered
call a input variable in a function
The function definition indicates that A is the output array. function A = heat (B,~) But at least from what's shown here, A...

5 years ago | 0

Answered
Hi isnt do I get this error ‘ operator ‘*’ is not supported for operands of type struct’
The problem is with the line t(K + 1) = t(K) * Time.In; I have no idea what you're trying to even do here. Both t and Time a...

5 years ago | 1

| accepted

Answered
Importing a "Large (2.5GB)" TIFF file with 'imread' function
This problem will occur when you only select one file. In that case, the variable filename is a single char array instead of a ...

5 years ago | 0

Answered
3-bit Counter - Using solely (nested) for loops
I guess the simple way would be something like this: % i'm going to assume your counter goes [R G B] % i.e. B is the least sig...

5 years ago | 1

| accepted

Answered
marge cells in excel file
Well let's start with this: [N T R]=xlsread('testspreasheet.xls'); N=num2str(N); N=mat2cell(N,ones(1,size(N,1)),size(N,2)...

5 years ago | 0

Answered
Error : Index in position 1 is invalid
Don't go changing loop iterators inside the loop unless you want to cause problems. It's entirely unnecessary here anyway. If ...

5 years ago | 0

| accepted

Answered
Pass function which has different variable to another function
There is probably a more accepted method of doing this, but I'm not the guy to ask for best practices. I threw together an exam...

5 years ago | 0

| accepted

Answered
How to do while loop on arrays?
It looks like you're doing some sort of basic demonstration of exponential behavior, but I'm not really sure how you're trying t...

5 years ago | 1

| accepted

Answered
my newton code is not working for fing root of f = 2.5- 1/x
Well, it is working, but you're operating near a singularity with particularly problematic symmetry. If you pick a large in...

5 years ago | 0

Answered
Can I take a random variable and put in into imread so I can have it pull out different files from the same function?
Sure thing x=randperm(52,1) inpict=imread(sprintf('%d.jpg',x))

5 years ago | 0

| accepted

Answered
Loop for matrix summation
I'm not sure what tw1r1 is supposed to be. I'm going to substitute something there. mytestnumber=37; mtr11w1s=zeros(3,3); ...

5 years ago | 1

| accepted

Answered
my code is runing but I can not get the plot out
You're trying to plot things inside a loop. That usually ends up just creating headaches. Store the results to vectors and the...

5 years ago | 0

Answered
Generate the exponential equation with given table of values
Let's try this again. For the moment, I'm going to assume this is classwork. If this is a more practical data modeling problem...

5 years ago | 0

Answered
How to display a matrix form command window to GUI edit text box or table?
Still not quite sure what you're building or how you want to prompt the behavior. This answer isn't going to be definitive and ...

5 years ago | 0

| accepted

Answered
Every 1,5,9,13..... marker point should be of same color. Similarly 2,6,10...... and 3,7,11...... and 4,9,12.... should be of same color
Try something like this: len = 1000; % dataset length x = linspace(0,10,len); y = exp(x/10).*sin(4*x); colors=[1 0 0; ... ...

5 years ago | 1

| accepted

Answered
How to trim(remove) plot
Try something like this: x=0:300; y=-0.008*x.^2 + 2*x + 1.5; y(y<0)=NaN; Anything that's NaN won't be plotted. Alternat...

5 years ago | 1

| accepted

Answered
How to crop set of images?
If all the images have the same geometry, you can do it directly: inpict=imread('explot.jpg'); % i renamed the image croppedpi...

5 years ago | 0

Answered
Conversion of .slx file to .mdl format?
I don't know if there are specific version dependencies between R2011a and R2011b, so I just did both. I didn't try to run any ...

5 years ago | 0

Answered
2D convolution with same dimensions
Your code works for the padded case. Comparing the results to the default syntax for conv2: example=conv2(a,b); the MSE for m...

5 years ago | 1

| accepted

Answered
Squared matrix with elements of the sums of its indices
Do you mean to generate a square matrix whose elements are the sum of its subscripts? If so: If you're using R2016b or newer, ...

5 years ago | 0

Answered
How to use Eulers Algorithm to solve half life decay on matlab
I posted a comment already, but I'll make some assumptions and throw down an attempt at an answer. Let's assume that you're onl...

5 years ago | 0

| accepted

Answered
What is unit J/K in battery(table) block?? is it J/Kg-K or J/g-K.
The terminology varies by context, but what we're basically talking about is the specific heat capacity of the material. Or rat...

5 years ago | 0

Answered
empty figure for a given code
I'm not sure what your formulae should be for your tasks, but keep in mind the geometry of your variables. While a0 is a scalar...

5 years ago | 0

Load more