Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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(:, ...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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, ...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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"...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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)...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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, ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Charger plus