Respondida
How to ignore not serializable variables when saving workspace
I get a warning not an error if I try to save a workspace with an non-serialisable java variable: >> socket = java.net.Datagram...

más de 7 años hace | 1

Respondida
Repeat operation and change values ​​of an array
As per Bob's comment, we have no idea what f and t are. Assuming they're constant, this is probably what you're after: P = ????...

más de 7 años hace | 0

Respondida
Efficient way to multiply an cell matrix with a scaler?
Since for your summation to succeed all the arrays in K11 must be the same size, convert that cell array to a 3D matrix. It will...

más de 7 años hace | 0

| aceptada

Respondida
How to make an array of pointers to a subset of values in an existing array?
No, it's not possible at all. Matlab does not have pointers and there is no mechanism to access slices of a matrix (even read-on...

más de 7 años hace | 0

| aceptada

Respondida
Is there any way to have an array which holds different function names?
Use a cell array in which you store function handles or anonymous functions: funarray = {@sin, @cos, @(v) v.^2}; %cell array c...

más de 7 años hace | 1

Respondida
How can I convert two channel 16-bit images to RGB 8-bit image?
You can't just do uint8(uint16imge). Any intensity from 256 to 65535 in the uint16 image would become 255 after the conversion. ...

más de 7 años hace | 0

Respondida
Command and Control vectors
A 'correct' version of your code, with all the pointless loops could be: t = [1, 2, 1, 2, 1, 3]; d = zeros(1, numel(t)*5); ...

más de 7 años hace | 0

| aceptada

Respondida
How to populate csv rows, rather than columns? This program creates a csv file with each vectorized image in a column, but i want to know if it's possible to store each vectorized image as a row instead.
It seems trivial to resolve to me: Either tranpose your matrix when you write it: csvwrite('imgdata.csv', vector_imag'); Or ...

más de 7 años hace | 0

| aceptada

Respondida
Reshape matrix adding columns of zeros at specific index
The simplest way to do what you want is to import the files as tables and let matlab do all the work of figuring out the format ...

más de 7 años hace | 1

| aceptada

Respondida
How to join 2 MATLAB tables based on similarity in values of first column?
Your description is that of an innerjoin, not an outerjoin. It's unclear why any one of the join wouldn't work. You must be doin...

más de 7 años hace | 1

| aceptada

Respondida
How to share attribue with several objects ?
I don't think you've grasped OOP yet. As Adam asked you need to explain what you're trying to do, with words, not code. As it i...

más de 7 años hace | 0

Respondida
From vector to matrix reshape every ith rows for each column
If you want to achieve what your code does instead of the result you show (see Stephen's comment): mat = reshape(arr, 3, []).' ...

más de 7 años hace | 0

Respondida
How to repeat rows in fields of structure
Note that practically, there is no difference between arrayfun, structfun, etc. and a loop. If anything, arrayfun can be slower ...

más de 7 años hace | 1

| aceptada

Respondida
Anonymous functions behavior is weird
I don't think the problem stems from anonymous function per se. I believe that the root of what you're seeing is that the chaini...

más de 7 años hace | 0

| aceptada

Respondida
Struct contents reference from a non-struct array object
You're using a global variable. We don't recommend using global variables as it's impossible to easily track what bit of code is...

más de 7 años hace | 0

| aceptada

Respondida
xlsread in matlab app designer
You probably need to learn a bit more about class design in matlab. Indeed, the code you have written cannot be put in the prope...

más de 7 años hace | 1

Respondida
Hi guys how can I put my-string in input of matlab?
As per my comment, your double for loop to compute the histogram of the characters can be replaced by: my_string = '@**.. @'; ...

más de 7 años hace | 0

Respondida
save a data in excel
There are several puzzling things in the code you've written, which makes me think you don't fully understand what you're doing....

más de 7 años hace | 0

Respondida
sort the matrix according to order of column
Result = sortrows(A, [2 1]) %sort first by 2nd column, then by 1st

más de 7 años hace | 0

| aceptada

Respondida
Matrix manipulation problem under MATLAB
Possibly, you're looking for blkdiag: A = [0 2 9; 5 7 3; 4 6 1]; C = [1 2 3; 4 5 6; 7 8 9]; B = blkdiag(A, C)

más de 7 años hace | 0

Respondida
How can i automate the following process for n times?
Never create numbered variables. It's a clear indication that you should be using an array, which can be easily indexed instead....

más de 7 años hace | 1

| aceptada

Respondida
assign the same vector to be the same cell
Can be done easily with findgroups (or the older unique) and splitapply (or the older accumarray), in just one line: A = [1 2;1...

más de 7 años hace | 0

Respondida
Binary search algorithm- find the bit error position
If you want to know the location(s) of the error, you need to keep track of your pivot point (floor(n/2)) and return that togeth...

más de 7 años hace | 0

| aceptada

Respondida
problem in imwrite new images into new directory
Note: when reporting an error always give us the full error message. In particular, you've removed the part that tells you which...

más de 7 años hace | 0

| aceptada

Respondida
how to concatenate two audio files of different matrix dimensions?
You're missing the column indexing in your y1(q*10+1:end), therefore it's converted into a row vector, which will have a differe...

más de 7 años hace | 0

| aceptada

Respondida
How can I convert high pass filtered image to grayscale image and save?
I've not tried to understand your code, but it appears to me that B2 is derived from I which is already a greyscale image. There...

más de 7 años hace | 1

| aceptada

Respondida
Selecting rows from a table using a column that includes Nan elements
The real question is why have you got NaN in a column of text. It's never a good idea to mix text with numeric. The best thing w...

más de 7 años hace | 0

| aceptada

Respondida
What are the extra subdirectories returned by dir function?
<rant mode on> They're absurd hold overs from a long gone era (DOS) where knowing that the current directory had a parent was so...

más de 7 años hace | 5

Respondida
can i run a .m file from my visual basic application (not excel)
On a computer that has matlab installed (and licensed), it's easy to call matlab functions from VB. See Matlab API for COM (COM ...

más de 7 años hace | 0

| aceptada

Respondida
For loop causing an Infinite loop
There are only two loops in your code, one with length(T) steps, one with numel(F)-1 steps. These values are guaranteed to be fi...

más de 7 años hace | 0

Cargar más