Answered
Getting rid of for loop in one-liner code
this x = zeros(1,10); x(1) = 2; for k = 1: 9 x(k+1) = 10 *x(k); end x = Columns 1 through ...

9 years ago | 1

Answered
How do I read these arrays into the function to input more than just one answer?
Sean a start point could be function x=f1(a,alpha,beta) x=a*(tand(beta)./(tand(beta)-tand(alpha))) ...

9 years ago | 1

| accepted

Answered
Find n random points with a minimum distance r inside a 2D rectangular box
Hi Jaydeep just completed a couple functions that may help with your question 1. download the functions *scatter_points...

9 years ago | 3

Answered
How to change the 7th least significant of a binary code?
Hi Himanshu Nailwal binary codes can be represented with characters (translating numeric values with dec2bin) or also with lo...

9 years ago | 1

| accepted

Answered
finding times on graph when it goes from 0 to 1
Grant randData = randi([0 1],1,51); this is the amount of times the button is pressed numel(nonzeros(randData)) ...

9 years ago | 0

| accepted

Answered
How to write a prorgram to compute sin(x) without using trigonometric function that uses taylor series?
Hi Stringfellow 1. Many hand held calculators use the CORDIC algorithm <</matlabcentral/answers/uploaded_files/69605/c...

9 years ago | 0

Answered
hi, i'm trying to flip an image without any built in commands that is using for loops.
To saisps hmm to flip images vertically or horizontally, there is no need for for loops and indeed any advanced function, jus...

9 years ago | 4

| accepted

Answered
calculate area and parameter cell
Hizyan Hanum Hi Murk Hassan Memon Hi let me try answer your question. If you want me to further develop any specific...

9 years ago | 3

| accepted

Answered
Get current rotation of a surf plot
campos returns the camera position for instance, these axes <</matlabcentral/answers/uploaded_files/69541/axes1.jpg>> ...

9 years ago | 2

Answered
Need Help with fixing "Error using vertcat Dimensions of matrices being concatenated are not consistent" for my matrix
another way would be (let me call j now j0) syms j0 P2(j0)=3*j0^2-2*j0+.5 P2(j0) = 3*j0^2 - 2*j0 + 1/2 >> P3(j...

9 years ago | 0

| accepted

Answered
store values from a for loop in a column vector?
may be you want to keep the for loop because there may be more omitted lines in the loop x=0.01:0.01:5 b0=10; K=2; ...

9 years ago | 0

Answered
Filling in Matrix (Interpolation
Hi Suki A=[ 10 20 1 0 0 0 0 0 0 40 80 4 0 0 ...

9 years ago | 2

Answered
can anybody tell me the code how to find sum of series for a complex function?
Hi Vinod Kumar Govindu this is John BG ( <jgb2012@sky.com> ) having faced similar problem, I found out the following poin...

9 years ago | 0

| accepted

Answered
plot the amplitude spectrum of this transformed function X(w)=2a *(sin (wa)/(wa))
Hi Riothunder 1. check MATLAB help for plot options, that has many, but a start point would be . w=[-15:.01:15];...

9 years ago | 0

| accepted

Answered
How do I create a function and run it.
function xc=bisect(f,a,b,tol) if sign(f(a))*sign(f(b)) >= 0 error('f(a)f(b)<0 not satisfied!') %ceases exe...

9 years ago | 0

Answered
Why the dimensions of my picture in pixels is reduced when I save my image?
if the *bpass* function is removing samples to low band pass filter, then the resulting image is going to be smaller. have yo...

9 years ago | 0

Answered
Slicing 2D array based on conditions specified in a seperate list
Hi Sharf 1. Input matrices A = [1 0 0 1 0; 0 1 0 1 0 ; 1 0 0 1 1; 0 0 0 1 1] L = ['A1' ;'C4'; 'F7'; 'E5'] 2...

9 years ago | 0

| accepted

Answered
How to generate a non periodic Chirp signal ?
Hallo Herr Müller 1. my preferred way to generate signal 'trains' is with command *repmat* clear all fs = 150000;...

9 years ago | 4

| accepted

Answered
RandomPoints &condition distance
Marwen please test the following clear all;clc; format bank rng('Shuffle') figure;ax=gca;ax.DataAspectRati...

9 years ago | 3

Answered
if i have two vectors that result in a matrix that is 40x5 but i want the dimensions flipped, how would i do that
if size(z) = 5 5 size(y) = 5 40 then size(z*y) = 5 40 and siz...

9 years ago | 0

Answered
N-Term Approximation for Matrices
1. init sum to all zeros same size as resulting coefficients by replacing sum=0; with sum=zeros([size(A),N]); ...

9 years ago | 1

Answered
How to show an image axes in pixeles?
axis ij does precisely invert the Y axis placing 0 up left. . if you find this answer useful would you please be so...

9 years ago | 2

Answered
Form an image of vertical ramp having a ramp values from 0 to 255 and dimension 256x256.
Pravin this is ramp A=uint8(repmat([0:1:255]',1,256)) imshow(A) <</matlabcentral/answers/uploaded_files/68227/001....

9 years ago | 2

| accepted

Answered
Moving window with cumulative sum less than a ref value and excluding certain windows
Ranji This is John BG <jgb2012@sky.com> , all together in one block load Array.mat; tic A2=cumsum(A); numA=...

9 years ago | 0

| accepted

Answered
issues extracting sub matrix
Because (min(x)+5<max(x)-6) = 0 With a positive step, unless you provide the initial element of the range sma...

9 years ago | 0

Answered
Moving window with cumulative sum less than a ref value and excluding certain windows
Ranji This is John BG jgb2012@sky.com I have corrected the sum and managed to reduce run time below 2 seconds, please have...

9 years ago | 1

Answered
Moving window with cumulative sum less than a ref value and excluding certain windows
Let me split the question into 2: 1. generating window indices A= [ 0.5 0.6 .45 .56 .056 .16 .18 .10 .15 .45 .36] ...

9 years ago | 1

Answered
Concatenate arrays in foor loop. Torque problem
Alexander Stephen is right, solving your question is about using the indices correctly. Have you considered using a cell f...

9 years ago | 0

| accepted

Answered
Stepwise substraction of all elements of a vector
Hi Christian The Star Strider answer wouldn't catch a narrow (negative) notch on a fairly flat signal because it would give a...

9 years ago | 1

| accepted

Answered
Matlab how can I make this inequality?
There are different ways to display a graph as you are asking, one of the most basic ones being 1. define the base vector ...

9 years ago | 1

| accepted

Load more