回答済み
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)

4年以上 前 | 1

| 採用済み

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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=...

4年以上 前 | 0

回答済み
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 ...

4年以上 前 | 0

回答済み
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....

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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];

4年以上 前 | 0

| 採用済み

回答済み
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. ...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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 ...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

送信済み


JSON
Matlab/Octave JSON parser

4年以上 前 | ダウンロード 1 件 |

0.0 / 5

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

4年以上 前 | 1

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

回答済み
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"...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

さらに読み込む