Risposto
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)

oltre 4 anni fa | 1

| accettato

Risposto
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...

oltre 4 anni fa | 1

| accettato

Risposto
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...

oltre 4 anni fa | 0

Risposto
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=...

oltre 4 anni fa | 0

Risposto
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 ...

oltre 4 anni fa | 0

Risposto
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....

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 1

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

Risposto
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];

oltre 4 anni fa | 0

| accettato

Risposto
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. ...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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 ...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 1

| accettato

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

Inviato


JSON
Matlab/Octave JSON parser

oltre 4 anni fa | 1 download |

0.0 / 5

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

oltre 4 anni fa | 1

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

Risposto
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...

oltre 4 anni fa | 0

Risposto
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"...

oltre 4 anni fa | 0

| accettato

Risposto
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...

oltre 4 anni fa | 0

Carica altro