A résolu


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

presque 13 ans il y a

Réponse apportée
Solving constrained non linear system using fmincon doesn't work
Hi Pi Pi, Two things. Firstly, your specific error: User supplied objective function must return a scalar value. com...

presque 13 ans il y a | 1

Réponse apportée
Adding values in a for loop
Hi Andy, I'm not entirely clear what you mean by "output", but I'll presume that you mean the value assigned to the *g* varia...

presque 13 ans il y a | 2

Réponse apportée
interpolating the 2d line to make the new coordinates equi-distant
Hi Payam, try this: pathXY = [0 0; 1 1; 10 2; 12 3] stepLengths = sqrt(sum(diff(pathXY,[],1).^2,2)) stepLengths = [0;...

presque 13 ans il y a | 2

| A accepté

A soumis


Blended 3D poly2mask
Creates a 3D mask "lofted" or "tweened" (blended smoothly) from a set of planar polygons.

presque 13 ans il y a | 2 téléchargements |

5.0 / 5
Thumbnail

Réponse apportée
How can I vectorize/LUT this for loop ?
Hi Louis, This one's got a nice solution using *sub2ind* that lets you do the whole thing at once without a loop: img = ...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
How do I store a series of 5*5 arrays into a multidimensional array?
Bob, here's a fix to your loop: Agray=imread('rice.png'); [ar,ac]=size(Agray); v1=5; v2=5; r=ar-v1+1; c=ac-v...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
How to determine if two cones with vertices at origin, intersect?
Hi again Doc, First thing you can do is check the dot product between the normal vectors of both cones' planes. If the dot pr...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Zero-filling matricies but different dimensions
Hi Bran, I think this is what you're trying to do: A = [1 2 3; 4 5 6; 6 7 8; 11 12 13] B = [1 2 3; 4 5 6; 11 12 13] ...

presque 13 ans il y a | 0

| A accepté

Réponse apportée
Finding a circle enclosing data points in a tilted plane
Hi Doctor61, First, from your previous posts and this one I see that you're doing lots of stuff with 3d geometry. I think tha...

presque 13 ans il y a | 1

| A accepté

Réponse apportée
Interpolating matrices of different sizes to the same size
Hi Eliott, Do you have the image processing toolbox? If so, this will be quite easy: targetSize = [60 128]; Model_2_r...

environ 13 ans il y a | 2

| A accepté

Question


Can I make a spline both smoothing *and* periodic?
Hi all, I would like to make a smoothing spline through data, and enforce point and gradient equality at either end of my spl...

environ 13 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
imfindcircles doesn't work
imfindcircles is part of the image processing toolbox, I think it came into that toolbox in MATLAB version 2012a. Do you have...

environ 13 ans il y a | 0

Réponse apportée
How to determine if enter(return) was pressed ?
Hi Peter, I've found that it's often easier to supply an onKeyPress function like follows: function testme() figure('...

environ 13 ans il y a | 0

Réponse apportée
fprintf %E Leading zero
Interesting question Peter... Here's a solution I found, which pretty much involves brute force shifting of characters around...

plus de 13 ans il y a | 0

A résolu


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

plus de 13 ans il y a

Réponse apportée
best way in terms of performance to read a text file
If your text file has exactly what you've got there (numbers separated by spaces): ---== contents of test.txt ==--- 1 2 ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Set colorbar ranges in 3d graphs
Hi Eleftheria, You can use *caxis()* to set the colour limits (which is part of your problem... we'll get to the next bit). ...

plus de 13 ans il y a | 0

| A accepté

A résolu


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

plus de 13 ans il y a

Réponse apportée
How to produce isosurfaces
Hi Mikael, you're almost there. Isosurface cuts the data _above_ the isovalue you provide. You need to change your value to, say...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
How can I make matlab stop recognizing string as char?
I think the issue here is just a typo: "strcomp" is not a MATLAB function. I think you mean "strcmp". wavetype = 'sawtoo...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Make code faster for import and array creation
Hi Jenna, I bet this is a pre-allocation issue. When you build a big matrix one column at a time (such as is being done for *...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
how create a new matrix with values found in an another matrix
Hi Gianluca, Have you tried using the second output from find_ndim? [I, Imap] = find_ndim(A,3,'first'); B = A(Imap); ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
change the orientation of the xtick labels
There's no way to _directly_ change the orientation of the xtick labels (using plain old MATLAB). You can try a work-around: ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
find index on 3d matrix
Hi Gianluca, The MATLAB docs say "TriScatteredInterp is the recommended alternative to griddata as it is generally more effic...

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
How to replace multiple strings in a txt file
Hi Steven, Try this, it's basically 3 steps: # Read the file into a cell of strings (1 per line in the original file) # R...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
what is another logic that has execution time faster than randi?
I agree with Matt - I bet there are faster ways to run your loop, and we can probably help out if you can describe what the loop...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Load Column Data in Popup Menu Guide
Hi Amanda, fid = fopen('A.txt'); datas = textscan(fid,'%f %f','headerlines',1); fclose(fid); figure winterHan...

plus de 13 ans il y a | 0

| A accepté

A résolu


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

plus de 13 ans il y a

A résolu


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

plus de 13 ans il y a

Charger plus