Answered
How to read txt file with complex number(with imaginary part) in matlab
Hi NeoBeaver A way to import your data is A=textread('B field_example.txt','%s') If you want to skip the header: ...

10 years ago | 1

| accepted

Answered
do not get Greek letters in a plot
missing '\' From the function text introductory example x = 0:pi/20:2*pi; y = sin(x); plot(x,y) t...

10 years ago | 1

Answered
How to create a checkerboard image without using the inbuilt function?
Deep P this works, no inbuilt functions: sx=1280;sy=960; bas=16 % length base square side % assume...

10 years ago | 0

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

10 years ago

Answered
How to create a checker box image of white and black pixels without using inbuilt function?
Deep this works sx=1280;sy=960; bas=16 % length base square side % assume sx and sy are multiples of base L...

10 years ago | 1

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

10 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

10 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

10 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

10 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

10 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

10 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

10 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

10 years ago

Answered
Why am I receiving 1 full integer less when dividing using fix()
Hi Jonathan Let me comment your lines 1.- .. for i = 1:size(change,2) in this case you don't need size(ch...

10 years ago | 0

Answered
polar distribution, CENTERED on the center of gravity?
A=imread('31.jpg'); figure(1);imshow(A); <</matlabcentral/answers/uploaded_files/56502/31.jpg>> [gc1 gc2]=C...

10 years ago | 0

| accepted

Answered
how can I calculate number of pixel in each angle of a circle??
Dear Zaafouri the previous script works, the result when applied to the second image you have supplied does not have identica...

10 years ago | 0

| accepted

Answered
Fine tuning a 3D figure without modifying the arguments of `view`
Leo what you want to do is to switch the camera option Projection from 'Perspective' to 'Orthographic'. launch the camera ...

10 years ago | 1

| accepted

Answered
Grid 2D matrix to xyz
Karem you have crossed x and y in the fprinf writing to file. Your code corrected: load trend.mat [lon,lat] = size(tr...

10 years ago | 0

| accepted

Answered
How to find all possible combination of a digits between first and last digits?
Beibit would you please be so kind to switch your accepted answer of this question to my answer. Following the answer to y...

10 years ago | 0

| accepted

Answered
how can I calculate number of pixel in each angle of a circle??
Hi Zaafouri You don't really need to go down to counting the pixels of the arcs closing each sector. 1.- acquire image ...

10 years ago | 0

Answered
how to calculate similarity between any two points using custom distance fuction
Hi Derrik Your approach ( sqrt( (i1-i2)^2+(j1-j2)^2+(k1-k2)^2 ) / Dmax ) × (|p1-p2| / Pmax) has a problem: while you ...

10 years ago | 1

Answered
Arrange a set of elements in an array
Soumyatha have you tried a circshift? A = 1.00 4.00 3.00 2.00 ...

10 years ago | 0

Answered
How can I fit a concave baseline curve to a spectrum?
I politely advocate less of Byzantine discussions and more coding of working scripts answering questions: What Mr Longridge a...

10 years ago | 0

| accepted

Answered
Is it possible to obtain the length of lines from graph object only?
Stefan find attached script that measures length circuit tracks. Explanation 1.- basic image processing: improve contra...

10 years ago | 0

| accepted

Answered
Taking data points in between multiple interval times times and outputting them in separate structural arrays
Heath spiketimes=spiketimes' % just to visualise horizontally [sz1_intervals sz2_intervals]=size(intervals) ...

10 years ago | 1

| accepted

Answered
remove null terms from a string and adjust signs
Now, I humbly claim my answer as accepted: str1='(G5)*((G6)*(G2+G4)+(G4)*(G2))+(G2)*((0)*(G4+G6)+(0)*(G3+G7)+(G4+G6)*(G1))+...

10 years ago | 0

| accepted

Answered
What's the purpose of doing fftshift twice?
Mark command fftshift is used to visualise the FFT within [-Fs/2 Fs/2] instead of [0 Fs] that is the interval that the FFT ta...

10 years ago | 1

| accepted

Answered
How do I overcome the "Subscript Indices" problem?
Thomas your are trying to index b with a null. In MATLAB matrix indices have to be >0, and in your for loop you are trying...

10 years ago | 1

| accepted

Answered
Perimeter of a part of an ellipse
Sibananda If you already have a and b, then you don't really need the ellipse centre point, or the ellipse tilt angle. The...

10 years ago | 0

| accepted

Answered
Assignment and accessing using indices
diag([0 1 1 0]) John jgb2012@sky.com

10 years ago | 1

Load more