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

circa 9 anni fa | 1

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 3

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 4

| accettato

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

circa 9 anni fa | 3

| accettato

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

circa 9 anni fa | 2

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 2

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 4

| accettato

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

circa 9 anni fa | 3

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

circa 9 anni fa | 0

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

circa 9 anni fa | 1

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

circa 9 anni fa | 2

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

circa 9 anni fa | 2

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

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

circa 9 anni fa | 1

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

circa 9 anni fa | 1

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 1

| accettato

Carica altro