Answered
How to have a user prompt window to submit real time values
@Stelios, The questions I've seen from you today could easily be answered by thinking a bit more about what you're doing and act...

7 years ago | 0

| accepted

Answered
Cell array to matix
"i want to get all matix in the cell array as seprate martrix in workspace" The follow-ups to that question will be how do I cr...

7 years ago | 0

Answered
open a variable in a function
"the workspace in scope, which is the 'base' workspace during a callback" Not at all. The workspace in scope is that of the cal...

7 years ago | 0

Answered
Why I get this error of matrices not consistent? What's wrong?
The icon is the 3rd input of msgbox, not the second. In fact, if you want to specify a custom icon, you've used the completely w...

7 years ago | 1

| accepted

Answered
ismember for table rows gives error for NaN and string
"One condition I need is that if the row has more columns, I want the table to be amended by "NaN" or otherwise empty columns, s...

7 years ago | 0

| accepted

Answered
plot a cell array
Assuming that nae means name and that's what you want the legend to show for each row: hlines = plot(cell2mat(yourcellarray(:, ...

7 years ago | 0

Answered
How to average 5 rows of a vector recursively?
As long as the length of your vector is a multiple of 5: mean(reshape(yourvector, 5, []), 1) If the length is not a multiple o...

7 years ago | 1

Answered
multiple area access in cells
If you want to keep your data as cell arrays you don't have a choice but to use an explicit loop: for i = 1:numel(D) D{i...

7 years ago | 0

| accepted

Answered
extract elements from four matrices and create new matrix
If your 4 4x4 matrices are not already stored as 4x4x4 3D array, well why not? and make them so: matrices = cat(3, m1, m2, m3, ...

7 years ago | 0

Answered
Multiplying a matrix in a cell by another matrix in the same cell
Since each cell array contains matrices that are all the same size (in this case, column vectors), you would make your life much...

7 years ago | 2

| accepted

Answered
convert the binary matrix with correct position
Your code: % removing 3 lsbs from the image binimg=de2bi(binimg,5); That comment is completely wrong. binimg is already a bi...

7 years ago | 0

Answered
Undefined function 'datatype' for input arguments of type 'uint8'.
It looks like together with your extract function you should have a datatype function. That function is missing. It's for you to...

7 years ago | 0

| accepted

Answered
I need to know what function to use here?
Certainly, the problem is easy to solve using nsidedpoly. 5 lines of code (1 line for the anonymous function that converts wall ...

7 years ago | 1

| accepted

Answered
calculate iteration in cellfun
Ok, now it's clearer what you want to do. I'm assuming that the number of cells and the size of each cell in Y, returned by Test...

7 years ago | 0

| accepted

Answered
How do I find the nearest value to a number that is bigger than that number?
First, your command is overly complicated. arrayfun always pass scalar values to its function, so the x is your anonymous functi...

7 years ago | 1

| accepted

Answered
Matching index in 3rd column based on 1st and 2nd column
First, define a simple function: function [maxval, maxtime] = maxvaluetime(values, times) %find the maximum of values, a...

7 years ago | 1

Answered
Syntax question - renaming a variable
"I defined up=y(1) because I wish that matlab evaluates the diff(up) for every k and the syntax diff(y(1)) doesn't seem to work"...

7 years ago | 1

| accepted

Answered
how read acceleration data for BNO055
I doubt that anybody on this forum knows your particular sensor so I'm afraid the most likely answer would be: read (or re-read)...

7 years ago | 0

| accepted

Answered
How do I clear the screen after typing a part of for loop ?
Once you've started with a for (or while) statement at the command prompt, matlab waits for you to enter the corresponding end s...

7 years ago | 0

| accepted

Answered
Re-assigning numerical subjects IDs to string user IDs from experimental data
The 1st and 3rd output of unique is what you want. e.g.: %completely made up demo data. Using a table for neatness. It doesn't ...

7 years ago | 0

| accepted

Answered
How do I remove NaN and / or interpolated data?
A=[1 NaN 3 4 NaN 6 5 NaN NaN 0 NaN NaN 7 8 NaN 0 0 9] %remove columns with more than 4 nans A...

7 years ago | 0

| accepted

Answered
trouble importing multiple .csv files with strings in first row
csvread (and dlmread) can't read the headers of csv files. You can tell them to skip the header: data(i)=csvread(l(i).name, 1, ...

7 years ago | 2

| accepted

Answered
Use of handle in matlab 2013b
Does R2013b support function handles? Yes. Function handles have existed since before R2006a. Irrespective of that Is it a good...

7 years ago | 0

Answered
Stem plot inside a for loop
Numbered variables, fields, etc. are almost always a bad idea. You end up writing meta-code to manipulate the variable, field, w...

7 years ago | 1

| accepted

Answered
How to dynamically change a function to solve a list of problems?
In some ways your question is strange because the solution is to use an array of functions handles instead of an array of functi...

7 years ago | 0

| accepted

Answered
using strcmp on nested cell array (cell array within a cell array)
I'm not entirely clear if you want to look inside the inner cell arrays or not. If not: lookup = 'something'; rows = find(cel...

7 years ago | 3

| accepted

Answered
sorting a matrix then applying the sort to another matrix
"How do I use this data to create a new 3 column matrix where column 1 is elevation column 2 is azimuth, and each row is a uniqu...

7 years ago | 0

Answered
Reading raw data from binary file
I'm not sure what the problem is. After you've read the first header with your multiple fread just read the bytes of the remaini...

7 years ago | 0

Answered
grouping first (left column) and last (right column) of consecutive sequence of a Nx2 matrix
You haven't clearly defined what consecutive values means mathematically. I'm assuming a difference of 1. Also you haven't expla...

7 years ago | 0

| accepted

Answered
how to generate binary matrix of mxnxp
Your question is not very clear. The code you show generates a matrix of integer between 0 and 3 (included), not 0 and 1, becaus...

7 years ago | 0

Load more