Answered

continue despite the error

you can use try...catch doc try

continue despite the error

you can use try...catch doc try

plus de 7 ans ago | 2

| accepted

Answered

How to get the selected variable in the workspace ?

I'm not aware of any such function. However, you can simply drag and drop the variable in the command window. If it's for pl...

How to get the selected variable in the workspace ?

I'm not aware of any such function. However, you can simply drag and drop the variable in the command window. If it's for pl...

plus de 7 ans ago | 0

Answered

cell to vector transformation

idx = cellfun(@isnumeric,d); %find the numeric values in cellarray out = [d{idx}]; %retrieve values from cell array

cell to vector transformation

idx = cellfun(@isnumeric,d); %find the numeric values in cellarray out = [d{idx}]; %retrieve values from cell array

plus de 7 ans ago | 0

| accepted

Answered

WHY THIS ERROR OCCUR ''??? Subscript indices must either be real positive integers or logicals."" IN 14TH LINE OF MY PROGRAM.PLEASE HELP ME .....THANKING YOU

You are trying to retrieve values from ybus using n1 and nr, which are derived from zdata. However, zdata contains values that a...

WHY THIS ERROR OCCUR ''??? Subscript indices must either be real positive integers or logicals."" IN 14TH LINE OF MY PROGRAM.PLEASE HELP ME .....THANKING YOU

You are trying to retrieve values from ybus using n1 and nr, which are derived from zdata. However, zdata contains values that a...

plus de 7 ans ago | 0

Answered

Time Comparison and Tic Toc

With tic toc you measure the time elapsed between the 'tic' and 'toc' command. So for instance tic %you code here ela...

Time Comparison and Tic Toc

With tic toc you measure the time elapsed between the 'tic' and 'toc' command. So for instance tic %you code here ela...

plus de 7 ans ago | 0

Answered

Using IF to remove upper and lower boundaries

So you want to continue if theta1 > 0.7297 or if theta < -0.7297? Then you could test for both in the if statement: if (the...

Using IF to remove upper and lower boundaries

So you want to continue if theta1 > 0.7297 or if theta < -0.7297? Then you could test for both in the if statement: if (the...

plus de 7 ans ago | 0

| accepted

Answered

"If sentence" error

In your code, n is a string (you make it a string with num2str). In the if statement, you compare n with a number, so it will al...

"If sentence" error

In your code, n is a string (you make it a string with num2str). In the if statement, you compare n with a number, so it will al...

plus de 7 ans ago | 0

| accepted

Answered

Obtaining pixel value from image in GUI

You could use imtool for that if you have the image processing toolbox.

Obtaining pixel value from image in GUI

You could use imtool for that if you have the image processing toolbox.

plus de 7 ans ago | 0

Answered

how to limit which uicontrols are stretched when a GUI window is resized

If you place all your uicontrols in a uipanel, you only have to change the position of your uipanel in the resizeFcn. Saves you ...

how to limit which uicontrols are stretched when a GUI window is resized

If you place all your uicontrols in a uipanel, you only have to change the position of your uipanel in the resizeFcn. Saves you ...

plus de 7 ans ago | 0

| accepted

Answered

Variables not saved after function completes. Help needed

The cleanest (and probably fastest) method is to let load(filename) store into a variable, and let the function return this vari...

Variables not saved after function completes. Help needed

The cleanest (and probably fastest) method is to let load(filename) store into a variable, and let the function return this vari...

plus de 7 ans ago | 1

| accepted

Answered

How can I use input() in a standalone Executable?

I guess this is because input needs the command window. Loren explained how input behaves in deployed programs. http://blogs.mat...

How can I use input() in a standalone Executable?

I guess this is because input needs the command window. Loren explained how input behaves in deployed programs. http://blogs.mat...

plus de 7 ans ago | 1

Answered

Memory during a loop

sure, you can just clear the variable: clear varname check: doc clear

Memory during a loop

sure, you can just clear the variable: clear varname check: doc clear

plus de 7 ans ago | 2

Answered

Indexing Based On Cell Array

a is an matrix of 1 row and 50 columns. And like doc sortrow states: "If A is an m-by-n matrix, then B = A(index,:)." So, i...

Indexing Based On Cell Array

a is an matrix of 1 row and 50 columns. And like doc sortrow states: "If A is an m-by-n matrix, then B = A(index,:)." So, i...

plus de 7 ans ago | 1

| accepted

Answered

Sorting the variables in cells

sortrows can sort cell arrays. This should work: out = cellfun(@(x) sortrows(x,2),r,'uniformOutput',false) the only pr...

Sorting the variables in cells

sortrows can sort cell arrays. This should work: out = cellfun(@(x) sortrows(x,2),r,'uniformOutput',false) the only pr...

plus de 7 ans ago | 0

Answered

Am trying to run a program using Duo Core2 processor. I am getting errors which I donot know to solve.

You probably forgot to copy the function called statsizechk from the other computer, or it is not on your matlab search pad. Cop...

Am trying to run a program using Duo Core2 processor. I am getting errors which I donot know to solve.

You probably forgot to copy the function called statsizechk from the other computer, or it is not on your matlab search pad. Cop...

plus de 7 ans ago | 0

Answered

change gui components properties from command window or other m file

Check out Doug's guide on interaction between different GUIs. You can easily share variables (and in your case probably the hand...

change gui components properties from command window or other m file

Check out Doug's guide on interaction between different GUIs. You can easily share variables (and in your case probably the hand...

plus de 7 ans ago | 0

Answered

While loop is continuous.

You're not changing the value of deposit in the loop, but always setting it at 300000/5. So deposit is always smaller than 30000...

While loop is continuous.

You're not changing the value of deposit in the loop, but always setting it at 300000/5. So deposit is always smaller than 30000...

plus de 7 ans ago | 0

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

plus de 7 ans ago

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

plus de 7 ans ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

plus de 7 ans ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

plus de 7 ans ago

Solved

Back and Forth Rows

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

plus de 7 ans ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

plus de 7 ans ago

Solved

Swap the input arguments

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

plus de 7 ans ago

Solved

Reverse the vector

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

plus de 7 ans ago

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

plus de 7 ans ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

plus de 7 ans ago

Solved

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

plus de 7 ans ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

plus de 7 ans ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus de 7 ans ago