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

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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 ...

oltre 7 anni fa | 1

| accettato

Risposto
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 =...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

Risposto
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...

oltre 7 anni fa | 2

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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=...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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(...

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 2

Risposto
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...

oltre 7 anni fa | 1

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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 ...

quasi 8 anni fa | 0

| accettato

Risposto
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(...

quasi 8 anni fa | 1

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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); ...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 2

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

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
For uicontrol, why can't "UserData" property hold a structure but 'UserData' can?
One of the many places where using strings instead of char arrays will trip you up. I haven't searched for one, but I've never y...

quasi 8 anni fa | 0

| accettato

Carica altro