Réponse apportée
Making a list from two arrays
How about this? A = 'abcd'; B = [1 2 3 4]; fid = fopen('my_txt_file','w'); s = []; for i = 1:numel(A) s =...

presque 10 ans il y a | 0

Question


When zooming, 3D plotted data exceeds uipanel extent despite axes being clipped
I'm working with a GUI which has a number of uicontrols as well as a set of axes. I would like the user to be able to zoom in on...

presque 10 ans il y a | 4 réponses | 1

4

réponses

Réponse apportée
How do I update my slider using an edit text?
To make the slider update when the editbox is updated, put the update code in the editbox callback function myEditBox_Callb...

presque 10 ans il y a | 3

| A accepté

Réponse apportée
Evan, if I want to return back
Disclaimer: Not having experience with GAs myself, I can offer something that will make what you're wanting to do work, but I ha...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Dear all , I still need an answer
Is this what you mean? x = [0011741667,0003913892,0014488700,0008746350,0000349066]; s = regexprep(sprintf('%011.6f', ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Image analysis on multiple images
You can use *uigetfile* to load in multiple images at once help uigetfile If the images are all of the same resolution, ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Assign rename of structure with input command
You could use the *eval* command to do this, but *eval* can be problematic and usually should be avoided. If you were fine with ...

presque 10 ans il y a | 0

Réponse apportée
how to sum matrics inside a cell array?
Are all the matrices in your cell array the same size? If so, this should work: % Get random cell array with n cells. Here ...

presque 10 ans il y a | 2

Réponse apportée
creating numerical values from parts of a string read
Another option, using a lookaround operator. A = '0(07/24/2014 10:39:10.21304)' s = regexp(A,'(?<=:)\d+\.\d+','match'); ...

presque 10 ans il y a | 0

Réponse apportée
How can I plot two arrays with different number of columns in one figure with different colours?
Is this what you mean? A = [1:100;rand(1,100)]; % random example data B = [1:4;3*rand(1,4)]; plot(A(1,:),A(2,:),'-g',...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
image processing using Matlab
*For your first question:* Is this strictly for appearances? If so, does *medfilt2* do what you want? rawImg = rgb2gray(i...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to display warning message withing while loop?
How exactly do you want to display the warning message? Do you want a dialog box to appear? Do you just want a message to appear...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Indices to zeros in Matrix
[r,c] = find(A == 0) returns in r and c the row and column indices of *every single zero in the array*. Therefore, you're going ...

presque 11 ans il y a | 2

| A accepté

Réponse apportée
Read set framents of string.
>> s = 'abcdefghR12X478Y124'; >> X = str2double(regexp(s,'(?<=X)\d+','match')) X = 478 >> Y = str2double(regexp...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to count the number of coins in a image using erosion operator?
You might find Image Analyst's blobs demo to be helpful: http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segment...

presque 11 ans il y a | 1

Réponse apportée
How to convert a 1D vector in number?
>> barcode = [8 9 0 2 0 8 0 0 1 1 4 4 5]; >> n = polyval(barcode,10) n = 8902080011445 Or, without polyval: ...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Displaying Files using a Listbox in a GUIDE GUI.
Where exactly are you running into trouble? Posting your relevant code so far might help. As for displaying the files in the lis...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
indexing cell array of arrays
cellfun(@(x)x(1:K),C,'uni',0) %Where C is your original cell array

presque 11 ans il y a | 0

| A accepté

Réponse apportée
How to load MAt file into 3D matrix
The answer can be found in the documentation of the *load* function: _S = load(FILENAME) loads the variables from a MAT-file ...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
how can i simplify this for loop?
Here's how you can get rid of the nested loops: a = []; for i = 1:2 x(1:5) = i; y(1:5) = (1:5) + 1; t = ...

presque 11 ans il y a | 0

Réponse apportée
How do I preallocate this loop?
Here is the loop with preallocation: z = zeros(5,1) % preallocation for i = 1:1:5 z(i) = x(zipfind - 1 + i); ...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Read data from string
>> x='abc123(xyz456)'; >> regexp(x,'(?<=\().+(?=\))','match') ans = 'xyz456' This command uses <http://www.ma...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
How can I display the mirror image of text in a textbox?
Have you tried downloading and installing one of the "backwards" fonts available on many font sites and setting the 'FontName' p...

presque 11 ans il y a | 1

| A accepté

Réponse apportée
Problem including tolerance and finding value of a certain term
If you're checking for a certain tolerance, you can, after each iteration, see if the value of your most recently calculated ter...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Code formatting in the forum
Is there any way to have two levels of permissions for editing another user's question? At the moment, assuming there are no use...

presque 11 ans il y a | 1

Réponse apportée
Find number of zeros in a part of a matrix
A = [1 2 2 2 2 2 0 2 2 2 0 3 0 0 4 5 6 7 0 0 8]; numZeros = sum(~A(5:10));

presque 11 ans il y a | 1

Réponse apportée
How to repopulate popupmenu by deleting old data.
set(popup_handle,'String','') That should do the trick.

presque 11 ans il y a | 0

Réponse apportée
how to print output in gui
You could create a editbox in a figure and display the value there: Example: fh = figure; prompt = {1 3}; eh = uic...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
Problem with a matlab question
There are multiple ways you can do this. The first involves a *for loop* and, while it might require more lines of code, is prob...

presque 11 ans il y a | 0

| A accepté

Réponse apportée
importdata vs xlsread to read an excel file
If you want to find out, try timing the operation of each function: tic; xlsread('my_file.xlsx'); toc tic; importdat...

presque 11 ans il y a | 3

| A accepté

Charger plus