Réponse apportée
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)

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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=...

environ 4 ans il y a | 0

Réponse apportée
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 ...

environ 4 ans il y a | 0

Réponse apportée
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....

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 1

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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];

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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. ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

A soumis


JSON
Matlab/Octave JSON parser

environ 4 ans il y a | 1 téléchargement |

0.0 / 5

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

environ 4 ans il y a | 1

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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"...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 4 ans il y a | 0

Charger plus