Answered
i have used dwt2 function for my input image? for approximation level i am getting blank image. what sould i do ?
Your image is not white. |imshow| assumes your data is scaled from 0 to 1 if it is a double, while your data is clearly not from...

8 years ago | 0

| accepted

Answered
Encryption scheme operands?
You forgot a space in your definition: Alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '; numbers = [1,12,7,5,2;18,1,27,27,27]; ...

8 years ago | 0

| accepted

Answered
nearest tangent point from Ginput point to line ?
My <https://www.mathworks.com/matlabcentral/fileexchange/64396-point-to-line-distance FEX submission> should help here. Unlike w...

8 years ago | 0

| accepted

Answered
How to modify this code for true result?
Your algorithm might not always result in an optimal packing. You should start with the biggest box and go down in volume. That ...

8 years ago | 1

| accepted

Answered
Change matrix size for each successive experiment
Don't use |i| as a loop index, it may cause confusion/bugs and is trivial to avoid. m=1; for n = 101:100:2100 k =...

8 years ago | 0

Answered
Help me Understand why my First Array Index is invalid
You also have a warning in the lint on this line. The mlint is a very useful tool in debugging, so you should make sure you have...

8 years ago | 1

Answered
XTicklabels don‘t match
If you want full control over the ticks, you must set both the ticks and their labels explicitly. If you don't, it may depend on...

8 years ago | 2

| accepted

Answered
final result depending on the consistency of ones and zeros
out0 = [1111000011110000] out1 = [1111111111111111] convert_to_1_bit=@(vector) mean(vector)>0.5; convert_to_1_bit...

8 years ago | 0

Answered
how to randomly delete number
Your code looks like you want to randomly fill one location with a one, but it has a bias toward the middle. The code below does...

8 years ago | 0

| accepted

Answered
How To Amend Hints When Writing A Function
It is possible to do a lot if you are using the live editor. Otherwise it is very limited. Tab-completion tools have been doc...

8 years ago | 0

| accepted

Answered
my code continuously showing undefined variable or function
There are two main problems with the loops you have set up: you run the risk of not defining your variables (which is causing yo...

8 years ago | 0

| accepted

Answered
how to get summation of column-2 values by comparing column-1 values in matlab
You can use the |accumarray| function, although that will only work if the first column only contains non-zero integers. A=...

8 years ago | 0

Answered
How to ask for user's input in a program
You're already very close. You just need to follow the instructions: use |if| and |else|. You should be able to complete the res...

8 years ago | 0

| accepted

Answered
Why changing a specific element in a vector matrix makes the unchanged elements zero?!
It doesn't change the values to 0. You are adding values with |rand| without considering the magnitude of the rest of the values...

8 years ago | 0

| accepted

Answered
Matrix dimensions error must agree
If you edit your calls to |linspace| where you ask for a 4-element vector, the code exits without error. Since your code is a bi...

8 years ago | 0

Answered
Need helps with my unit step function
Your current code overwrites your output on every iteration. It looks like this is what you want: function [y] = unitstep(t...

8 years ago | 0

Answered
How to generate a 2D sphere matrix and not a disc
% r^2 = x^2+y^2+z^2 % so if you know r, and generate a field of x and y, you can calculate z r=200; [x,y]=ndgrid(...

8 years ago | 1

| accepted

Answered
Subfunction help with triangles
You need to provide the subfunctions with inputs. function getinputs=righttri A=input('Enter side A:'); B=input...

8 years ago | 2

Answered
How to run all codes in single .m file??
You can either have a function at the top that runs internal functions, or you can just put all the code in a single script or f...

8 years ago | 1

Answered
Hello, I have a matrix of order 768 X 256. How can I downsample every alternate column. So that, every second column in the matrix is downsampled. So that new matrix will have order 768 X 128?. Kindly help me out.
This works the same, but in reverse from your <https://www.mathworks.com/matlabcentral/answers/422047-hello-i-have-a-matrix-of-o...

8 years ago | 0

| accepted

Answered
Hello, I have a matrix of order 1664 X 128. How can I insert a column of zeros after every column. So that, every second column in the matrix is a zero column. So that new matrix will have order 1664 X 256?. Kindly help me out.
This should work. data=rand(1664,128);%generate data for example new_data=zeros(size(data,1),2*size(data,2)); new_dat...

8 years ago | 0

| accepted

Answered
I have 2 data points representing x,y (0,3) and (4,0). What code do I use to plot a line or carry out a linear interpolation?
There are many ways to determine the formula for the line that passes through two points. One of the ways I find the easiest is ...

8 years ago | 0

| accepted

Answered
Calling a function with 2 inputs using only a single input
You need to test for existence, not for being empty, as someone could still use an empty input. function out=function_name(...

8 years ago | 1

Answered
What does Windows 8.1 will not be supported after R2018b mean?
It means The Mathworks will offer very limited, if any, support for this release-OS-combination. Matlab 6.5 still runs on Window...

8 years ago | 0

| accepted

Answered
finde some maximum values of matrix without collision!!!!
I suspect there is a better way with the sort function, but I can't come up with now. This should work. data=rand(4,6); ...

8 years ago | 0

Answered
How to multiply arrays in struct file with a variable?
The |load| functions loads to a struct, where each variable is a field, even when you specify only a single variable. The code b...

8 years ago | 1

| accepted

Answered
Problem using function handles
Maybe you mean this? bisection(@f,0,2)

8 years ago | 2

Answered
I need a help?
You can set the y-scale to logarithmic with this set(gca,'YScale','log')

8 years ago | 0

| accepted

Answered
How can i check a 3D object is located inside or outside of another 3D object?
Because your data is two logical arrays, you can easily test if the smaller is inside the larger. Finding out if the smaller obj...

8 years ago | 0

| accepted

Load more