Answered
Draw an arc between two points --> (x1,y1,z1) and (x2,y2,z2)
function test_sphere n = 200; THETA = rand(1,n)*2*pi; PHI = rand(1,n)*2*pi; R = 1.1*ones(1,n); [x,y,z] = sph2ca...

ungefär 11 år ago | 0

Answered
solve the following system of 3 linear equation in unknowns x, y and z? How do I accomplish this?
A = [2 3 4; 5 6 7; 1 1 0]; B = [43; 65; 11]; V = A\B;

ungefär 11 år ago | 0

| accepted

Answered
how to move the plots when slider is dragged.
Heres a basic example, changing xlim via slider callback. function slider_example x = 0:pi/32:8*pi; y = cos(x).^5; ...

ungefär 11 år ago | 0

Answered
Need help with plotyy formatting
First legend input can be a vector of plot handles. figure x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*...

ungefär 11 år ago | 0

| accepted

Answered
Polynomial fitting of each pixel in an image without looping
Referring to your 256 sec calulation time: Got it to 1 sec and 0.8 with parfor. (on my cpu) dim = 256; C = mat2cell(r...

ungefär 11 år ago | 0

| accepted

Answered
How to read a text file and create a structure array?
Try to skip the second comma. C = textscan(fid, '%s%d8%*s%f32');

ungefär 11 år ago | 0

| accepted

Answered
Get max value and index of multidimensional array
Use 1D-Indexing: M = randn(10,10,10,10); [C,I] = max(M(:)); C M(I) This might be useful too: [I1,I2,I3,I4]...

ungefär 11 år ago | 11

Answered
how to evaluate a symbolic function in matlab
* doc subs * doc subexpr

ungefär 11 år ago | 1

Answered
Exporting data to excel every time a program is run
x = 1:100; a = x.^2; xlswrite('xls_test',a)

ungefär 11 år ago | 0

| accepted

Answered
Polynomial fitting of each pixel in an image without looping
Is the overall result just 5 scalar k values? X = cat(1,C{1,:}); Y = cat(1,C{2,:}); Z = cat(1,C{3,:}); M = [X(...

ungefär 11 år ago | 0

Answered
3x3 8-connected structuring element
ones(3)

ungefär 11 år ago | 1

Answered
centroid of image and value of pixel
Do you have Image Processing Toolbox? If yes, here you go: BW = imread('text.png'); s = regionprops(BW, 'centroid'); ...

ungefär 11 år ago | 0

Answered
Can I set explicit plot colors for specific values or value ranges
Yes its possible, only for contour3 its a bit fumbling. Surface function has an input for the colormatrix C. C is referring t...

ungefär 11 år ago | 0

| accepted

Answered
How to change a specific line in a text file?
# Loading txt into a cell. # Then do whatever you want with the cell. In this example, line 69 will be 99. # Then write the c...

ungefär 11 år ago | 15

| accepted

Answered
How do I get my string from a handle.text GUI HELP
Get String from text handle: get(handles.text,'String') Checking and breaking a loop: if strcmp(get(handles.text,'S...

ungefär 11 år ago | 0

Answered
can i use more than 1 function in same m. file ? because i want to use multiple function for adapting frequency
# The attempt having myeqd1, myeqd2, myeqd3, ... and then solve them with ode45(myeqd1,...); ode45(myeqd2,...); ... etc is bad i...

ungefär 11 år ago | 0

| accepted

Answered
Ubuntu - german umlaute in plots
I dont have Ubuntu but you can try this: title('Example \"a \"o \"u') title('Example ä ö ü','Interpreter','none')

ungefär 11 år ago | 0

| accepted

Answered
Running area under the curve at each time step.
Your input to trapz is a single point, you want to input a line. And for n = length(x) acceleration points you can only get n-1 ...

ungefär 11 år ago | 0

Answered
Fillm function paints all map instead of area inside polygon on map. How to solve this issue?
Your polygon is self-intersecting. You can see it, if you zoom in to the bottom corner. To fix it, define better points, eg: ...

ungefär 11 år ago | 0

Answered
How to pass values from one ode to another ode?
Write all equations in 1 function and make your state vector like this: 'x = [w;q]'. Tell me, if you need more details.

ungefär 11 år ago | 0

Answered
How to rotate the symblo only in the 3D map
Here is a simple basic part. n = 100; X = randi(n,30,1); Y = randi(n,30,1); Z = randi(n,30,1); r = 4; % factor for ...

ungefär 11 år ago | 0

Answered
imaqmontage(data); question about this code
data = getdata(obj,samples) samples - The number of samples to extract. If samples is not specified, the number of samples ...

ungefär 11 år ago | 0

| accepted

Answered
4D dicom matrix? Why not 3D?
"Is this the gray level intensity?" - Yes, color reserved dimensions. It's mostly not about the gray scale. These values just...

ungefär 11 år ago | 1

Answered
how to write a code for checkbox
Code for the checkboxes uicontrol: hax = [h1;h2;h3]; % axes handles hcb = [0;0;0]; % checkbox handle (preallocate) cb...

ungefär 11 år ago | 1

| accepted

Answered
am able to zoom only last plot ,how to zoom other plots.please help
The function |setAllowAxesZoom| will do the job. If you add this example to your code, you are zooming in axes h1. hz = zoo...

ungefär 11 år ago | 1

| accepted

Answered
x-labels do not show in bar3 graph
Try |hold on| befor the loop: X={1;2;3;4;5;6;7;8;9;10;11;12;13;14;15}; Y={2;3;2;3;4;2;3;4;2;3;4;2;3;4;5}; hold on ...

ungefär 11 år ago | 0

| accepted

Answered
How to identify contiguous regions between two thresholds?
[C,h] = contour(...) The ContourMatrix C contains directly the infomation you are looking for. Just look up ContourMatrix i...

ungefär 11 år ago | 0

| accepted

Answered
How to detect equal rows of a matrix compare with another matrix with a 10 per cent of margin?
m = 0.1; % margin A = [1 2 3; 4 5 6; 7 8 9]; B = [7 8 10; 4 5 12; 1.1 2.2 2.9; 1.101 2 3; 6.3 7.2 9.9]; k = 0; ...

ungefär 11 år ago | 0

| accepted

Answered
How can I adjust the position of a 'scattergroup' (scatter3) figure?
scrsz = get(0,'ScreenSize'); set(gcf,'OuterPosition',[scrsz(3)/2 scrsz(2) scrsz(3)/2 scrsz(4)]) n = 20; scatter3(rand...

ungefär 11 år ago | 0

| accepted

Answered
How can I adjust the position of a 'scattergroup' (scatter3) figure?
n = 20; scatter3(rand(n,1),rand(n,1),rand(n,1),[],randi(3,n,1),'filled') axp = get(gca,'Position'); set(gca,'Position...

ungefär 11 år ago | 0

Load more