Beantwortet
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: ...

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 1

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
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))+...

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

Mehr laden