Respondida
Combining 3 3D matrices
Use cat: A=rand(313,409,31); B=rand(313,409,28); C=rand(313,409,30); total=cat(3,A,B,C); size(total)

más de 4 años hace | 1

| aceptada

Respondida
Convert 3 greyscale images representing RGB to RGB image
Using the standard conventions: RGB=cat(3,red(:,:,1),green(:,:,1),blue(:,:,1)); The indexing is in there in case your in...

más de 4 años hace | 1

| aceptada

Respondida
Add an expression to the result
Appart from the other answer providing you with a solution to your question (i.e. to use fprintf), there is another issue: im=i...

más de 4 años hace | 0

Respondida
cube root of -1
The nth root of a value has n values: x=-1; root=3; R=abs(x); theta=angle(x); k=linspace(0,2,root+1);k(end)=[]; new_R=...

más de 4 años hace | 0

Respondida
Revert to default interactivity in Figure/axes
(untested idea) You could iteratively loop through the children objects of your figure, wiping all callback properties. That ...

más de 4 años hace | 0

Respondida
readstruct getting error when attempt to run function in background
Apparently it calls cd somewhere internally. You could try reading the file will xmlread and parse to a struct with parseXML....

más de 4 años hace | 0

Respondida
terminating a parfor loop early
I personally use the now function a lot. The number it returns is in days, so you will have to scale your max time to fractional...

más de 4 años hace | 1

Respondida
using output of one button as an input in another button
If you really want to, you can call the callback function like any other function. However, it makes much more sense to only us...

más de 4 años hace | 0

| aceptada

Respondida
function of readtable in matlab
You are misunderstanding what the Matlab path is. The Matlab path is where Matlab will look for functions. As a bonus you will a...

más de 4 años hace | 0

| aceptada

Respondida
How To Migrate / Connect an Uicontrol Spinner Function To GUI created by GUIDE
What you want is not possible with the builtin uispinner function. As its documentation states the parent can only be a uifigure...

más de 4 años hace | 0

| aceptada

Respondida
I have a loop containing about 6 operations, there is a logic statement that applies to 5/6 of the functions.
You are implementing several functions now. You should consider splitting up your function to several parts. You can use varargi...

más de 4 años hace | 0

Respondida
loading xn data signals of data.txt
No loops required: xn=rand(1000,1);%replace this with the code reading your text file X=[xn-1;xn-2];

más de 4 años hace | 0

| aceptada

Respondida
Using loops to perform vector functions
There is an mlint warning on line 7. If you hover your mouse over it, you will see a message that this input is not being used. ...

más de 4 años hace | 0

| aceptada

Respondida
program is not working
You didn't explicitly set a value to R. If you had pre-allocated it, that would have prevented an R from a previous run to affec...

más de 4 años hace | 0

| aceptada

Respondida
Taylor series for cos x
There are a few edits you should make to your function: % If you want a third input, just add it like this: % (don't forget to...

más de 4 años hace | 0

Respondida
please is there any inbuilt function for harmonic function?
There actually is a builtin that will give you the answer: inf As for implementing the function yourself, that is probably hom...

más de 4 años hace | 0

Respondida
Run MATLAB twice at the same time
You mean you want to have two separate instances of Matlab running? That is possible. Running the same function is also not a pr...

más de 4 años hace | 0

| aceptada

Respondida
Specifying several authors for a contribution
Please post this as a request here. There is Mathworks staff monitoring that thread, so that is the best way to make your voice ...

más de 4 años hace | 0

Respondida
Anybody knows how to do to this script goes faster?
Using ismember will already speed up your loop by a lot. The point is that you are analysing a lot of data, so it just will take...

más de 4 años hace | 1

| aceptada

Respondida
Pourquoi demander 2 fonctions
There isn't any fundamental (Matlab-related) reason. Maybe your teacher wants you to realize that you can implement eqi2tfx b...

más de 4 años hace | 0

Respondida
issue with 'intersect' function
Decimals are difficult for computers, since they work in binary, not base 10. Say I ask you to divide 1 by 3. You answer 0.33...

más de 4 años hace | 0

Respondida
Hi, may i know how to create a loop in this code for image subtraction? X is the reference image and variable in Y , I have 10 images in the folder
Use a for loop. You can use the sprintf function to generate the file name based on the iteration number, and you can use sub...

más de 4 años hace | 0

Enviada


JSON
Matlab/Octave JSON parser

más de 4 años hace | 1 descarga |

0.0 / 5

Respondida
The graph wont be appear
Do what the error message tells you to do: y= t.^2 .* cos(t);

más de 4 años hace | 1

Respondida
Change array elements that meet a condition - Multidimensional array case
I can think of two ways: # using a loop # replicating B in the third dimension to match the size of A I suspect the first...

más de 4 años hace | 0

Respondida
How I can convert from binary to character?
Your binary data seems to require some modification before it contains what you expect. data=[0 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0...

más de 4 años hace | 0

| aceptada

Respondida
Correct Magic Square to text file?
Your file is written row by row, while Matlab will read the data in B column by column. So while most people would not expect t...

más de 4 años hace | 0

Respondida
Is Live editor included in the Matlab licence or a separate program?
Live scripts (along with the live editor) were introduced in R2016a. They are a part of base Matlab (so it doesn't require any t...

más de 4 años hace | 0

Respondida
Finding the indices of the elements of one array in another
You muct have thought of this already (as it is one of your tags), but ismember does what you need: A = ["G1", "V2", "G3", "G4"...

más de 4 años hace | 0

| aceptada

Respondida
MATLAB GUI - how to make a button change a value then close window
If you add uiwait before the nested function, this will pause execution of the main function. This will give the user time to cl...

más de 4 años hace | 0

Cargar más