Answered
Get every 4 values of a vector and change values
Maybe something like this a = [1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0] b = repelem(any(reshape(a,4,[]),1),4) I'm ass...

19 days ago | 0

| accepted

Answered
How can I sort these number?
Try this a = [-4 4 -7 9 -2 -5 3 7]; b = sort(a,'descend'); [~,idx] = sort(abs(b),'descend'); b = b(idx)

19 days ago | 0

| accepted

Answered
Code that is working in console, not working in the script?
The values passed to axis() are setting the x-limits such that the bars are no longer in-frame (and such that the bottoms of the...

19 days ago | 1

| accepted

Answered
How can I make it so that the title is at the top rather than where it is?
If you're trying to get the tiles to show up in the uipanel, maybe this is a start: x = rand(1,20); mg = 0.05; p1 = uipanel...

19 days ago | 0

| accepted

Answered
If i have a specific feature as an image how do i extract that from a larger image in matlab
If you're talking about a very forgiving case where the smaller image is known to be a subset of the larger image itself, then y...

19 days ago | 0

Answered
How to check the MATRIX is flip or not
It's unclear what you're actually asking for, but I'm going to guess it's one of the two: A = [1 2 3 4 3 2 1 2 3 4 5 4 3 2...

19 days ago | 1

| accepted

Answered
Why is plot using range of values with increments not proper?
"In the above code, in the y axis output the values go above the normal sine range [-1,1] " No they don't. Look at the labels...

19 days ago | 0

| accepted

Answered
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.760379e-19.
Your table has 4 columns, but you only have two labels in the vector called "Variables". Depending on your intent, you can add ...

20 days ago | 0

Answered
How to set Image contrast using slider?
Personally, I find simple two-parameter linear brightness/contrast adjustment to be frustratingly inflexible, but it's popular i...

20 days ago | 0

Answered
Adding text programmatically to a figure
If you just want to put a title over multiple subplots, you can use sgtitle(). If you want text in a box with arbitrary locat...

20 days ago | 0

| accepted

Answered
HSV Image Intensity Restrictions
It's easy enough to find out. rgbpict = imread('peppers.png'); hsvpict = rgb2hsv(rgbpict); % threshold at 50% V hsvpict(:,...

20 days ago | 0

Answered
How I Can read 3 MSBs in RGB image
Depends what you want the output to be. It might be simple for scalar inputs: % assume uint8 pixel = uint8(250); % using d...

21 days ago | 0

| accepted

Answered
Extracting a range from a cell array.
How about x = {"a", "b", "c", "d", "e"} z = horzcat(x{3:end}) % or just z = [x{3:end}] To clarify, the expression x{3:end...

22 days ago | 0

| accepted

Answered
bwlabel (Bw) function return Wrong number of Connected Objects
Try this: inputImg = imread('money.png'); % the file has to be read c = rgb2gray(inputImg); % im2gray() is from where? imshow...

22 days ago | 1

| accepted

Answered
Im designing a game of battleship, but. im trying to use a code to prevent the user from placing a ship out of bounds
I generally can't stand things written to be so tediously interactive like this, but maybe this is a simplified start. % i as...

22 days ago | 0

Answered
How i can read Red channel in 3 RGB Image
This is how you can get the red channel % an RGB image rgbpict = imread('peppers.png'); % just the red channel R = rgbpict(:...

23 days ago | 0

| accepted

Answered
Why my value of MSE and PSNR have 3 values?
The images are RGB. The results are 1x1x3 -- one result per channel. If your goal were to get a single value for the whole ima...

24 days ago | 0

| accepted

Answered
How to select an area within a range around identified region?
Maybe this is a start radius = 5; % specify some radius % an image and a mask of some sort A = imread('eight.tif'); imshow...

25 days ago | 0

| accepted

Answered
create multi mask using ROI Freehand
The way you're doing this is causing objects to be overwritten. You can use the same method I showed in your prior question. ...

25 days ago | 0

| accepted

Answered
how to recoup a watermark image !
Try this. mat = imread('cameraman.tif'); % host image watermark = imread('cameraman.tif'); % payload image B2 = im2bw(water...

25 days ago | 1

| accepted

Answered
How to edit the font size and font name of y-labels while using the toolbox of addaxis?
It seems addaxis() is a bit in need of maintenance. The object handles are supposed to be stored in the userdata of the main ax...

25 days ago | 0

| accepted

Answered
Someone knows why this is happening? and it work a few days ago
You have a script called polar.m which is shadowing the builtin function polar(). Change the name of that script.

25 days ago | 1

| accepted

Answered
Save/Crop Figure (bmp) file without background
If you have a raster image displayed in a figure, don't save it from the figure. Use imwrite(). Doing this: A = imread('camer...

25 days ago | 1

| accepted

Answered
how can i bring 2 figures together?
If you look, the two x vectors are not the same. They differ in length by 1. You can reuse the latter x if you want. Either w...

25 days ago | 1

| accepted

Answered
RIO iteratively to create mask
This is a start im = imread("coloredChips.png"); numROI = 6; % create ROI objects and adjust them imshow(im); for k = 1:n...

26 days ago | 0

| accepted

Answered
How to project and fit a 2D path onto a 3D surface?
Something like N = 1000; nturns = 10; rmax = pi; zscale = 0.1; zoffset = 0.5; r = linspace(0,rmax,N); th = linspace(0,n...

26 days ago | 0

Answered
how can we increase a value until we get answer
This can be simplified, but let's start with the given approach. format long alpha = [510; 310; 78; 120; 350; 490; 53; 150...

26 days ago | 1

| accepted

Answered
How to read jpg in format CMYK?
If imread() can't read CMYK JPG files (as most things can't), then you'll obviously have to use something else to convert the im...

26 days ago | 0

Answered
How to extract data from a particular column of matrix?
Something like this should work: Y = A(20:3500,6);

27 days ago | 0

Answered
How can I multiply 2 signals?
Something like x = (-1 :.05 :1); % pay attention to scale and limits y = cos(2*pi*x).*exp(-5*x); % elementwise multiply with ....

28 days ago | 1

| accepted

Load more