Hi, I'm nobody.

I don't belong here, but I have nothing better to do.

Matlab used to be part of my work.

Now it's part of my hobbies.

That's pretty sad, really.

Answered

legend problem when plotting netcdf data

It's usually better to give legend the handles associated with the plots: h1=plot(x,thing1,'b'); hold on; h2=plot(x,thing2,'r'...

legend problem when plotting netcdf data

It's usually better to give legend the handles associated with the plots: h1=plot(x,thing1,'b'); hold on; h2=plot(x,thing2,'r'...

7 hours ago | 0

Answered

why my plot is not correct?

I'm not sure what you intend the correct number to be. You're doing the cube root of negative numbers. They're going to be com...

why my plot is not correct?

I'm not sure what you intend the correct number to be. You're doing the cube root of negative numbers. They're going to be com...

8 hours ago | 0

Answered

How can I take the value from an equation and plug it back into the same equation? (Newton-Raphson)

Something like this: function D = down(A, B, C, D, E, maxiter, tol) % things that are in the argument list don't get rewritt...

How can I take the value from an equation and plug it back into the same equation? (Newton-Raphson)

Something like this: function D = down(A, B, C, D, E, maxiter, tol) % things that are in the argument list don't get rewritt...

13 hours ago | 0

Answered

input window in matlab

The dialog is the least of the problems. In general: rep = uigetdir; Imgs = dir(rep); thisname = Imgs(3).name; [path,name,e...

input window in matlab

The dialog is the least of the problems. In general: rep = uigetdir; Imgs = dir(rep); thisname = Imgs(3).name; [path,name,e...

14 hours ago | 0

Answered

Adding feasible region on a Contour plot

Like I mentioned, it depends how you want to represent the region. Let's say you want to represent the feasibility region withi...

Adding feasible region on a Contour plot

Like I mentioned, it depends how you want to represent the region. Let's say you want to represent the feasibility region withi...

15 hours ago | 0

| accepted

Answered

How can I fill the scratch after scratch detection?

Without knowing the original image content, you can probably do inpainting with regionfill() https://www.mathworks.com/help/ima...

How can I fill the scratch after scratch detection?

Without knowing the original image content, you can probably do inpainting with regionfill() https://www.mathworks.com/help/ima...

16 hours ago | 0

| accepted

Answered

divide a matrix into small matrices

Something like this: A=randi(89,9)+10 % make an example array B=mat2cell(A,[3 3 3],[3 3 3]) % split the array into 9 arrays ...

divide a matrix into small matrices

Something like this: A=randi(89,9)+10 % make an example array B=mat2cell(A,[3 3 3],[3 3 3]) % split the array into 9 arrays ...

16 hours ago | 0

| accepted

Answered

Dialog boxes to calculate functions

You'll get a numeric output from the menu call. Just do a switch-case structure, and calculate the answer using the correspondi...

Dialog boxes to calculate functions

You'll get a numeric output from the menu call. Just do a switch-case structure, and calculate the answer using the correspondi...

1 day ago | 0

Answered

how to convert sawtooth signal to a ramp signal

I imagine what you want is unwrap: t = linspace(0,3*2*pi,1000); raw = atan2(sin(t),cos(t)); unwrapped = unwrap(raw); plot(t,...

how to convert sawtooth signal to a ramp signal

I imagine what you want is unwrap: t = linspace(0,3*2*pi,1000); raw = atan2(sin(t),cos(t)); unwrapped = unwrap(raw); plot(t,...

1 day ago | 0

| accepted

Answered

newton raphson on matlab

I don't know why anyone would make you use x0=0 unless they wanted you to lose your hair. Think about where you are on the curv...

newton raphson on matlab

I don't know why anyone would make you use x0=0 unless they wanted you to lose your hair. Think about where you are on the curv...

1 day ago | 0

Answered

colormap including gray for out of range

You should be able to use colormapeditor to edit the current cmap or any of the presets. https://www.mathworks.com/help/matlab/...

colormap including gray for out of range

You should be able to use colormapeditor to edit the current cmap or any of the presets. https://www.mathworks.com/help/matlab/...

1 day ago | 0

Answered

what chroma subsampling does imwrite use for a jpg file, 4:4:4, 4:2:2, or something else?

I know this is an old question, but I just had to figure it out myself; I'm inclined to put answers where they belong. Imwrite ...

what chroma subsampling does imwrite use for a jpg file, 4:4:4, 4:2:2, or something else?

I know this is an old question, but I just had to figure it out myself; I'm inclined to put answers where they belong. Imwrite ...

1 day ago | 0

Answered

What chroma subsampling rate (e.g., 4:2:0 or 4:2:2) does imwrite use when saving a JPEG image?

I know this is an old question, but I just had to figure it out myself. Imwrite uses 4:2:0 chroma subsampling, and the default ...

What chroma subsampling rate (e.g., 4:2:0 or 4:2:2) does imwrite use when saving a JPEG image?

I know this is an old question, but I just had to figure it out myself. Imwrite uses 4:2:0 chroma subsampling, and the default ...

1 day ago | 0

Answered

How to Separate the RGB channels from an image and get the average of each RGB channel separetly

I'm feeling particularly lazy today, so I'm not going out of my way to make this solution avoid nonstandard tools. They could b...

How to Separate the RGB channels from an image and get the average of each RGB channel separetly

I'm feeling particularly lazy today, so I'm not going out of my way to make this solution avoid nonstandard tools. They could b...

1 day ago | 1

| accepted

Answered

Error Message: Array indices must be positive integers or logical values.

I'm not really sure what you're trying to do with the calculations, but this line: F(2*n:1+2*n) =+ Force(0); is going to resul...

Error Message: Array indices must be positive integers or logical values.

I'm not really sure what you're trying to do with the calculations, but this line: F(2*n:1+2*n) =+ Force(0); is going to resul...

1 day ago | 0

Answered

Combine Two .tiff Files into One Image

I'm not familiar with the registration and transformation tools, and I have a feeling that part of the problem is the fact that ...

Combine Two .tiff Files into One Image

I'm not familiar with the registration and transformation tools, and I have a feeling that part of the problem is the fact that ...

1 day ago | 1

| accepted

Answered

Cody Problem 25. Remove any row in which a NaN appears

Okay. Consider that isnan(A) returns a logical array, and that any() can work along a specified direction. B = A(~any(isnan(...

Cody Problem 25. Remove any row in which a NaN appears

Okay. Consider that isnan(A) returns a logical array, and that any() can work along a specified direction. B = A(~any(isnan(...

2 days ago | 1

| accepted

Answered

Warning: Integer operands are required for colon operator when used as index.

You need integers to do indexing operations. plot(f,Ak(1:floor((length(V2)+1)/2))); grid on

Warning: Integer operands are required for colon operator when used as index.

You need integers to do indexing operations. plot(f,Ak(1:floor((length(V2)+1)/2))); grid on

2 days ago | 0

Answered

Too many arguments error problem

Your function definition function Input_File(filename) specifies that this function takes one input argument and has zero out...

Too many arguments error problem

Your function definition function Input_File(filename) specifies that this function takes one input argument and has zero out...

2 days ago | 1

| accepted

Answered

Extracting Satellite streaks.

Here's my attempt: inpict = imread('sat.jpg'); bwpict = im2bw(inpict); bwpict = bwpropfilt(bwpict,'eccentricity',[0.95 1]); ...

Extracting Satellite streaks.

Here's my attempt: inpict = imread('sat.jpg'); bwpict = im2bw(inpict); bwpict = bwpropfilt(bwpict,'eccentricity',[0.95 1]); ...

2 days ago | 0

| accepted

Answered

I am trying to get predefined dialog boxes to calculate arcsine of an argument I will put in a dialogue list. Bu what I do not understand is how I will get the answer arcsine(arg) to be written out in a message box, msbox. Someone who can help? The c

Try something like this: Y = asin(str2num(A{:})) msgbox(sprintf('The arcsine of %s is %s',A{:},mat2str(Y,5))) And this way al...

I am trying to get predefined dialog boxes to calculate arcsine of an argument I will put in a dialogue list. Bu what I do not understand is how I will get the answer arcsine(arg) to be written out in a message box, msbox. Someone who can help? The c

Try something like this: Y = asin(str2num(A{:})) msgbox(sprintf('The arcsine of %s is %s',A{:},mat2str(Y,5))) And this way al...

2 days ago | 0

Answered

how to change the e+00 format

As far as anything that handles numeric data is concerned, 7.8651e+04 and 78651 are the same. The formatting is merely a matter...

how to change the e+00 format

As far as anything that handles numeric data is concerned, 7.8651e+04 and 78651 are the same. The formatting is merely a matter...

2 days ago | 1

| accepted

Answered

plot to the function

If you're using a relatively new version, this should work. Avoid loops where possible. In this case, you don't need any. r =...

plot to the function

If you're using a relatively new version, this should work. Avoid loops where possible. In this case, you don't need any. r =...

2 days ago | 0

Answered

Generate same array as what imwrite produces from a double array

I can answer that question, but I don't know that you mean to be doing the thing you're trying to do. Most IPT tools assume t...

Generate same array as what imwrite produces from a double array

I can answer that question, but I don't know that you mean to be doing the thing you're trying to do. Most IPT tools assume t...

2 days ago | 0

| accepted

Answered

Different Function Input Formats

For the case where looking for a specific string: varargin = {'aaa','bbb',13,{'a','b'},[12 34],'ccc'} % let's pretend we have s...

Different Function Input Formats

For the case where looking for a specific string: varargin = {'aaa','bbb',13,{'a','b'},[12 34],'ccc'} % let's pretend we have s...

2 days ago | 1

| accepted

Answered

Create binary matrix with some conditions (Matlab)

Well, I'm not exactly the guy to ask for elegant solutions to anything, but I'll take a stab at it. clc H=[1 1 1 1 1 1 0 0 0 0...

Create binary matrix with some conditions (Matlab)

Well, I'm not exactly the guy to ask for elegant solutions to anything, but I'll take a stab at it. clc H=[1 1 1 1 1 1 0 0 0 0...

2 days ago | 0

| accepted

Answered

Color objects with areas larger than a set value

I'm not familiar with the video IO tools, but isolating/coloring the large objects should be easy enough I = imread('dots.jpg')...

Color objects with areas larger than a set value

I'm not familiar with the video IO tools, but isolating/coloring the large objects should be easy enough I = imread('dots.jpg')...

3 days ago | 0

Answered

Please Help.. How can I display a certain value in my plot?

A simple way would be to use the legend itself, something like this: x=linspace(0,2*pi,100); y=sin(x); xmark=pi/4; clf pl...

Please Help.. How can I display a certain value in my plot?

A simple way would be to use the legend itself, something like this: x=linspace(0,2*pi,100); y=sin(x); xmark=pi/4; clf pl...

3 days ago | 0

Answered

Obtain cross section from a plot

The answer is going to vary depending on how complicated you actually need to make it. If all you really need is going to be an...

Obtain cross section from a plot

The answer is going to vary depending on how complicated you actually need to make it. If all you really need is going to be an...

3 days ago | 0

Answered

How to find the first element in ascending numbers that repeat?

You said you want the first instance where the next number is larger, but the desired output you gave [1 12 22] is all instances...

How to find the first element in ascending numbers that repeat?

You said you want the first instance where the next number is larger, but the desired output you gave [1 12 22] is all instances...

3 days ago | 0

| accepted