Answered
Compare two vectors in matlab n*m
You mean like this? A=[1 2 3 4 5 6 7 8 9 10]; B=4; result=zeros(size(A));%pre-allocate L= A<B ;result(L)=1; L= A==B;resul...

ongeveer 2 maanden ago | 0

| accepted

Answered
Gui problem with workspace
Why do you want to use evalin? Just have your functions return outputs. Every function has its own workspace. To share data bet...

ongeveer 2 maanden ago | 0

Answered
How can I plot a lot of data sets quickly?
Make sure you load the data to an array instead of numbered variables. That way you can use a simple for loop and indexing. htt...

ongeveer 2 maanden ago | 0

Answered
Backward compatible functionSignatures.json
In that case my proposed solution would be implementing something like Jan suggested in his answer. Write a function similar to...

ongeveer 2 maanden ago | 1

| accepted

Answered
Utilizing sqrt and square, "Check for incorrect argument data type or missing argument in call to function 'sqrt'"
As Stephen mentioned, the sqrt function expects either single or double. So you will have to convert it to either of those data ...

2 maanden ago | 0

Answered
How to assign the size of a k-th column of a cell to the k+1-th?
When you execute this line: sbc{k}=size(cycles{k+1}) the k+1 element of cycles doesn't exist yet. You will have to make ...

2 maanden ago | 0

Answered
How to store values from nested for loop
The first step to implement a summation in Matlab is very easy: just use a for loop. It is often possible to do this with a matr...

2 maanden ago | 1

| accepted

Answered
How to create a matrix with nested for loop for fraction entries?
Why use loops at all? y=1; ii=0.5:.1:.7; jj=.4:.1:.6; [ii,jj]=ndgrid(ii,jj); mat=ii.*y.*jj; disp(mat)

2 maanden ago | 1

Answered
Having error when ploting bars with filled pattern
Download the applyhatch_plusC function from the FileExchange here and add it to your path somewhere (or your current folder). N...

2 maanden ago | 0

Answered
Appending a file with a string output and a numeric output
Use the 'a', 'a+', or 'A' flags in fopen to append data. This should work for text files as well. You don't really need the 't' ...

2 maanden ago | 1

Submitted


ifversion
Determine if the current version satisfies a version restriction

2 maanden ago | 3 downloads |

Answered
mex - setup FORTRAN can't install for 2017b or 2021a for windows 10
MinGW is only for C an C++, not Fortran. The linked page looks like you need the Intel Parallel Studio XE. The 2017 version s...

2 maanden ago | 0

Answered
why the command "figure(gcf+1)" gives error?????
The gcf get the handle to the current figure. In old releases this used to be a double, but since several years ago it has been ...

2 maanden ago | 0

| accepted

Submitted


JSON
Matlab/Octave JSON parser

2 maanden ago | 12 downloads |

Answered
How to vectorize nested for loops
ndgrid will do the trick: rowsA=59; pix = 25.4/600; R = 2.5; ht = 1.5; A=abs(-rowsA:rowsA); % e.g. 5 4 3 2 1 0 1 2 3 4 5 size...

2 maanden ago | 0

| accepted

Answered
New. to Matlab, can you help me with the code?
A much better solution is to learn Matlab with a tutorial. You may consider doing the Onramp tutorial (which is provided for fre...

2 maanden ago | 1

Answered
Have problem in solution
It looks like you want different things to happen depending on the value of Erf: for every element smaller than 2 you want y to ...

2 maanden ago | 0

| accepted

Answered
How can I obtain the permutation of 3 binary variables?
The easiest way to do this is with bin2dec. You can loop from 0 to 2^n-1 to get all combinations. To convert the character array...

2 maanden ago | 0

| accepted

Answered
how to find the answer of:
Use the inverse of tan: atan B=atan(log10(50)/exp(0.53))

2 maanden ago | 0

| accepted

Answered
How to create an independent loop?
If you want something to be independent, you need to use a function: for n=1:200 my_fun(n,struct_with_your_other_variables...

2 maanden ago | 1

| accepted

Answered
How to unstructure the structure data?
If you use the normal dot indexing with a struct array, that will generate a comma separated list. You can put that between bra...

2 maanden ago | 1

| accepted

Answered
find function using wildcards
You can use the patterns introduced in R2020b: str={'/* GeoForschungsZentrum Potsdam ...

2 maanden ago | 1

| accepted

Answered
How can I use fprintf to print matrix by column?
fprintf tranverses the input in a column-major order. If you want to change that, you can't, so you will have to flip the array ...

3 maanden ago | 0

Answered
I wrote this code and it didn't work and its gave me " Unrecognized function or variable 'seq' " error , What I can do to sole this error??
Apparently your code doesn't guarantee the creation of the seq variable. Since it only occurs in block starting with Test=='T', ...

3 maanden ago | 0

Answered
How to check for data normality using kstest?
If you want to test if your data is from a standard normal distribution you should not change it before calling kstest. If yo...

3 maanden ago | 0

| accepted

Answered
How can I mouse pick up and move
You can do this with the WindowButtonDownFcn (or the equivalent for uifigures: ButtonDownFcn). Inside that callback you can ret...

3 maanden ago | 0

Answered
How can i read in a .txt file without the first column gets saved?
I prefer not to mix tasks. I first read my file, then I do the processing. It is generally a lot easier to remove parts of char ...

3 maanden ago | 0

| accepted

Answered
Mathmatica saving Matlab files as Wolfram Mathmatica Package files
Your files have not changed, only the description your OS displays. You should look up a guide for your specific OS. On windo...

3 maanden ago | 0

| accepted

Answered
graph with two formulas
You probably want the errorbar function: x = 1:10:100; y = [20 30 45 40 60 65 80 75 95 90]; err = 8*ones(size(y)); errorbar(...

3 maanden ago | 0

| accepted

Solved


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

3 maanden ago

Load more